Title: [223082] trunk/Source/WebKit
Revision
223082
Author
[email protected]
Date
2017-10-09 16:27:35 -0700 (Mon, 09 Oct 2017)

Log Message

[iOS][WK2] Tiles outsides the viewport are sometimes missing after relaunching a crashes WebProcess
https://bugs.webkit.org/show_bug.cgi?id=178095
<rdar://problem/34415016>

Reviewed by Simon Fraser.

Make sure we reset WKWebView._hasScheduledVisibleRectUpdate to NO in WKWebView._processDidExit.
_scheduleVisibleContentRectUpdateAfterScrollInView would otherwise return early because
WKWebView._hasScheduledVisibleRectUpdate is always YES. Normally,
_addUpdateVisibleContentRectPreCommitHandler sets a CATransaction commit handler that
resets _hasScheduledVisibleRectUpdate to NO, but it does not do so when ![webView _isValid]
(which is true when the WebProcess has crashed.

Also reset WKWebView._commitDidRestoreScrollPosition to NO in WKWebView._processDidExit even
though it does not seem to be the cause of this bug. It seems to make sense to reset this member
when the process crashes.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _processDidExit]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (223081 => 223082)


--- trunk/Source/WebKit/ChangeLog	2017-10-09 23:14:46 UTC (rev 223081)
+++ trunk/Source/WebKit/ChangeLog	2017-10-09 23:27:35 UTC (rev 223082)
@@ -1,3 +1,25 @@
+2017-10-09  Chris Dumez  <[email protected]>
+
+        [iOS][WK2] Tiles outsides the viewport are sometimes missing after relaunching a crashes WebProcess
+        https://bugs.webkit.org/show_bug.cgi?id=178095
+        <rdar://problem/34415016>
+
+        Reviewed by Simon Fraser.
+
+        Make sure we reset WKWebView._hasScheduledVisibleRectUpdate to NO in WKWebView._processDidExit.
+        _scheduleVisibleContentRectUpdateAfterScrollInView would otherwise return early because
+        WKWebView._hasScheduledVisibleRectUpdate is always YES. Normally,
+        _addUpdateVisibleContentRectPreCommitHandler sets a CATransaction commit handler that
+        resets _hasScheduledVisibleRectUpdate to NO, but it does not do so when ![webView _isValid]
+        (which is true when the WebProcess has crashed.
+
+        Also reset WKWebView._commitDidRestoreScrollPosition to NO in WKWebView._processDidExit even
+        though it does not seem to be the cause of this bug. It seems to make sense to reset this member
+        when the process crashes.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _processDidExit]):
+
 2017-10-09  Youenn Fablet  <[email protected]>
 
         Add quota to cache API

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (223081 => 223082)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2017-10-09 23:14:46 UTC (rev 223081)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2017-10-09 23:27:35 UTC (rev 223082)
@@ -1520,6 +1520,9 @@
     _firstTransactionIDAfterPageRestore = 0;
     _resizeAnimationTransformTransactionID = std::nullopt;
 
+    _hasScheduledVisibleRectUpdate = NO;
+    _commitDidRestoreScrollPosition = NO;
+
     _avoidsUnsafeArea = YES;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to