cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [33/43] ios commit: Changes in CDVUIWebViewEngine for new changes in CDVWebViewEngineProtocol.
Date Sat, 07 Mar 2015 00:18:46 GMT
Changes in CDVUIWebViewEngine for new changes in CDVWebViewEngineProtocol.

Made protocol implementation explicit, instead of forwarded (removed pragma). Style fix-ups.


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/a11803a9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/a11803a9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/a11803a9

Branch: refs/heads/4.0.x
Commit: a11803a9bd40cd09c200f333e9bd89acdf143c7d
Parents: 8dcdde8
Author: Shazron Abdullah <shazron@apache.org>
Authored: Wed Nov 12 07:04:04 2014 -0800
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Wed Nov 12 07:04:04 2014 -0800

----------------------------------------------------------------------
 CordovaLib/Classes/CDVUIWebViewEngine.m | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a11803a9/CordovaLib/Classes/CDVUIWebViewEngine.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVUIWebViewEngine.m b/CordovaLib/Classes/CDVUIWebViewEngine.m
index f2594ad..cc15d52 100644
--- a/CordovaLib/Classes/CDVUIWebViewEngine.m
+++ b/CordovaLib/Classes/CDVUIWebViewEngine.m
@@ -30,9 +30,6 @@
 
 @end
 
-// see forwardingTargetForSelector: selector comment for the reason for this pragma
-#pragma clang diagnostic ignored "-Wprotocol"
-
 @implementation CDVUIWebViewEngine
 
 @synthesize engineWebView = _engineWebView;
@@ -64,21 +61,23 @@
 
 - (void)evaluateJavaScript:(NSString*)javaScriptString completionHandler:(void (^)(id, NSError*))completionHandler
 {
-    NSString* ret = [(UIWebView*)_engineWebView stringByEvaluatingJavaScriptFromString:javaScriptString];
+    NSString* ret = [(UIWebView*)_engineWebView stringByEvaluatingJavaScriptFromString :
javaScriptString];
 
     if (completionHandler) {
         completionHandler(ret, nil);
     }
 }
 
-- (void)loadFileURL:(NSURL*)url allowingReadAccessToURL:(NSURL*)readAccessURL
+- (id)loadRequest:(NSURLRequest*)request
 {
-    __weak CDVUIWebViewEngine* weakSelf = self;
+    [(UIWebView*)_engineWebView loadRequest : request];
+    return nil;
+}
 
-    // UIKit operations have to be on the main thread. This method does not need to be synchronous
-    dispatch_async(dispatch_get_main_queue(), ^{
-        [weakSelf loadRequest:[NSURLRequest requestWithURL:url]];
-    });
+- (id)loadHTMLString:(NSString*)string baseURL:(NSURL*)baseURL
+{
+    [(UIWebView*)_engineWebView loadHTMLString : string baseURL : baseURL];
+    return nil;
 }
 
 - (void)updateSettings:(NSDictionary*)settings
@@ -113,7 +112,7 @@
     }
 
     NSString* decelerationSetting = [settings cordovaSettingForKey:@"UIWebViewDecelerationSpeed"];
-    if (![@"fast" isEqualToString:decelerationSetting]) {
+    if (![@"fast" isEqualToString : decelerationSetting]) {
         [uiWebView.scrollView setDecelerationRate:UIScrollViewDecelerationRateNormal];
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message