Title: [203010] trunk/Source/WebKit2
- Revision
- 203010
- Author
- [email protected]
- Date
- 2016-07-08 17:15:16 -0700 (Fri, 08 Jul 2016)
Log Message
Mail messages don't start loading until scrolling completes
https://bugs.webkit.org/show_bug.cgi?id=159585
<rdar://problem/27088405>
Reviewed by Andy Estes.
* UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
(-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:connection:]):
When scrolling, NSDefaultRunLoopMode isn't run, but NSRunLoopCommonModes are.
CFNetwork uses NSDefaultRunLoopMode if we tell NSURLConnection to "start immediately",
but we can instead schedule our NSURLConnection into NSRunLoopCommonModes
and start it ourselves, ensuring that it will be able to do work while scrolling is happening.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (203009 => 203010)
--- trunk/Source/WebKit2/ChangeLog 2016-07-09 00:04:32 UTC (rev 203009)
+++ trunk/Source/WebKit2/ChangeLog 2016-07-09 00:15:16 UTC (rev 203010)
@@ -1,3 +1,18 @@
+2016-07-08 Tim Horton <[email protected]>
+
+ Mail messages don't start loading until scrolling completes
+ https://bugs.webkit.org/show_bug.cgi?id=159585
+ <rdar://problem/27088405>
+
+ Reviewed by Andy Estes.
+
+ * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
+ (-[WKCustomProtocolLoader initWithCustomProtocolManagerProxy:customProtocolID:request:connection:]):
+ When scrolling, NSDefaultRunLoopMode isn't run, but NSRunLoopCommonModes are.
+ CFNetwork uses NSDefaultRunLoopMode if we tell NSURLConnection to "start immediately",
+ but we can instead schedule our NSURLConnection into NSRunLoopCommonModes
+ and start it ourselves, ensuring that it will be able to do work while scrolling is happening.
+
2016-07-08 Andy Estes <[email protected]>
[Content Filtering] Load blocked pages more like other error pages are loaded
Modified: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm (203009 => 203010)
--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm 2016-07-09 00:04:32 UTC (rev 203009)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm 2016-07-09 00:15:16 UTC (rev 203010)
@@ -68,7 +68,9 @@
_storagePolicy = NSURLCacheStorageNotAllowed;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- _urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:YES];
+ _urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO];
+ [_urlConnection scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
+ [_urlConnection start];
#pragma clang diagnostic pop
return self;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes