]> git.saurik.com Git - cydia.git/commitdiff
Do not update webviews that are not rendered.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 7 Mar 2011 22:05:47 +0000 (14:05 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 8 Mar 2011 09:50:59 +0000 (01:50 -0800)
CyteKit/WebViewController.mm

index 520faa254bfe5c4257ffa88d62dbc0a7b73c86ac..4dc94ef663ec065f4a9e55cdd95b6e20b33cbfa5 100644 (file)
@@ -775,6 +775,9 @@ float CYScrollViewDecelerationRateNormal;
         [preferences setJavaScriptCanOpenWindowsAutomatically:YES];
         [preferences setOfflineWebApplicationCacheEnabled:YES];
 
+        if ([webview respondsToSelector:@selector(setShouldUpdateWhileOffscreen:)])
+            [webview setShouldUpdateWhileOffscreen:NO];
+
 #if LogMessages
         if ([document respondsToSelector:@selector(setAllowsMessaging:)])
             [document setAllowsMessaging:YES];