提交 6ccb1e6b 编写于 作者: C Chinmay Garde

sky/engine and sky/services updates for Mac target

上级 3256b1f0
...@@ -80,7 +80,7 @@ static const char* kDartArgs[] = { ...@@ -80,7 +80,7 @@ static const char* kDartArgs[] = {
"--enable_type_checks", "--enable_type_checks",
"--error_on_bad_type", "--error_on_bad_type",
"--error_on_bad_override", "--error_on_bad_override",
#if WTF_OS_IOS #if WTF_OS_IOS || WTF_OS_MACOSX
"--no-profile" "--no-profile"
#endif #endif
#endif #endif
......
...@@ -242,8 +242,6 @@ source_set("platform") { ...@@ -242,8 +242,6 @@ source_set("platform") {
"fonts/opentype/OpenTypeSanitizer.cpp", "fonts/opentype/OpenTypeSanitizer.cpp",
"fonts/opentype/OpenTypeSanitizer.h", "fonts/opentype/OpenTypeSanitizer.h",
"fonts/opentype/OpenTypeTypes.h", "fonts/opentype/OpenTypeTypes.h",
"fonts/opentype/OpenTypeVerticalData.cpp",
"fonts/opentype/OpenTypeVerticalData.h",
"fonts/skia/FontCacheSkia.cpp", "fonts/skia/FontCacheSkia.cpp",
"fonts/skia/FontCustomPlatformDataSkia.cpp", "fonts/skia/FontCustomPlatformDataSkia.cpp",
"fonts/skia/FontPlatformDataSkia.cpp", "fonts/skia/FontPlatformDataSkia.cpp",
...@@ -514,6 +512,13 @@ source_set("platform") { ...@@ -514,6 +512,13 @@ source_set("platform") {
"weborigin/SecurityPolicy.h", "weborigin/SecurityPolicy.h",
] ]
if (!is_mac) {
sources += [
"fonts/opentype/OpenTypeVerticalData.cpp",
"fonts/opentype/OpenTypeVerticalData.h",
]
}
if (is_ios || is_mac) { if (is_ios || is_mac) {
sources += [ "fonts/apple/FontPlatformDataApple.cpp" ] sources += [ "fonts/apple/FontPlatformDataApple.cpp" ]
} }
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
@interface URLLoaderConnectionDelegate : NSObject<NSURLConnectionDataDelegate> @interface URLLoaderConnectionDelegate : NSObject<NSURLConnectionDataDelegate>
@property(nonatomic) mojo::URLLoaderImpl::StartCallback startCallback; @property(nonatomic) mojo::URLLoaderImpl::StartCallback startCallback;
@property(nonatomic, retain) NSURLRequest *originalRequest;
@end @end
...@@ -20,13 +21,14 @@ ...@@ -20,13 +21,14 @@
} }
@synthesize startCallback = _startCallback; @synthesize startCallback = _startCallback;
@synthesize originalRequest = _originalRequest;
- (void)connection:(NSURLConnection*)connection - (void)connection:(NSURLConnection*)connection
didReceiveResponse:(NSHTTPURLResponse*)response { didReceiveResponse:(NSHTTPURLResponse*)response {
_response = mojo::URLResponse::New(); _response = mojo::URLResponse::New();
_response->status_code = response.statusCode; _response->status_code = response.statusCode;
_response->url = _response->url =
mojo::String(connection.originalRequest.URL.absoluteString.UTF8String); mojo::String(self.originalRequest.URL.absoluteString.UTF8String);
mojo::DataPipe pipe; mojo::DataPipe pipe;
_response->body = pipe.consumer_handle.Pass(); _response->body = pipe.consumer_handle.Pass();
_producer = pipe.producer_handle.Pass(); _producer = pipe.producer_handle.Pass();
...@@ -61,7 +63,7 @@ ...@@ -61,7 +63,7 @@
if (_response.is_null()) { if (_response.is_null()) {
_response = mojo::URLResponse::New(); _response = mojo::URLResponse::New();
_response->url = mojo::String( _response->url = mojo::String(
connection.originalRequest.URL.absoluteString.UTF8String); self.originalRequest.URL.absoluteString.UTF8String);
} }
_response->error = mojo::NetworkError::New(); _response->error = mojo::NetworkError::New();
...@@ -95,6 +97,7 @@ ...@@ -95,6 +97,7 @@
} }
- (void)dealloc { - (void)dealloc {
[_originalRequest release];
DCHECK(_response.is_null()); DCHECK(_response.is_null());
DCHECK(_startCallback.is_null()); DCHECK(_startCallback.is_null());
_producer.reset(); _producer.reset();
...@@ -128,10 +131,6 @@ void URLLoaderImpl::Start(URLRequestPtr request, ...@@ -128,10 +131,6 @@ void URLLoaderImpl::Start(URLRequestPtr request,
req.HTTPMethod = @(request->method.data()); req.HTTPMethod = @(request->method.data());
if (request->bypass_cache) {
req.cachePolicy = NSURLRequestReloadIgnoringLocalCacheData;
}
URLLoaderConnectionDelegate* delegate = URLLoaderConnectionDelegate* delegate =
(URLLoaderConnectionDelegate*)connection_delegate_; (URLLoaderConnectionDelegate*)connection_delegate_;
...@@ -139,6 +138,7 @@ void URLLoaderImpl::Start(URLRequestPtr request, ...@@ -139,6 +138,7 @@ void URLLoaderImpl::Start(URLRequestPtr request,
[NSURLConnection connectionWithRequest:req delegate:delegate]; [NSURLConnection connectionWithRequest:req delegate:delegate];
delegate.startCallback = callback; delegate.startCallback = callback;
delegate.originalRequest = req;
[connection start]; [connection start];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册