Title: [240574] branches/safari-607-branch/Source/WebKit
Revision
240574
Author
[email protected]
Date
2019-01-28 01:41:20 -0800 (Mon, 28 Jan 2019)

Log Message

Cherry-pick r240542. rdar://problem/47586850

    REGRESSION (r238818): Snapshot is removed too late after swiping back on Twitter
    https://bugs.webkit.org/show_bug.cgi?id=193860
    <rdar://problem/47535022>

    Reviewed by Antti Koivisto.

    * UIProcess/Cocoa/ViewGestureController.cpp:
    (WebKit::ViewGestureController::didStartProvisionalOrSameDocumentLoadForMainFrame):
    (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
    (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
    * UIProcess/Cocoa/ViewGestureController.h:
    Treat provisional load and same document load the same: they already both
    unpause the snapshot removal tracker, request render tree size notifications,
    but same-document navigation was missing the call to dispatchAfterEnsuringDrawing
    and thus would get stuck waiting for RepaintAfterNavigation.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240542 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-607-branch/Source/WebKit/ChangeLog (240573 => 240574)


--- branches/safari-607-branch/Source/WebKit/ChangeLog	2019-01-28 09:41:17 UTC (rev 240573)
+++ branches/safari-607-branch/Source/WebKit/ChangeLog	2019-01-28 09:41:20 UTC (rev 240574)
@@ -1,5 +1,46 @@
 2019-01-28  Babak Shafiei  <[email protected]>
 
+        Cherry-pick r240542. rdar://problem/47586850
+
+    REGRESSION (r238818): Snapshot is removed too late after swiping back on Twitter
+    https://bugs.webkit.org/show_bug.cgi?id=193860
+    <rdar://problem/47535022>
+    
+    Reviewed by Antti Koivisto.
+    
+    * UIProcess/Cocoa/ViewGestureController.cpp:
+    (WebKit::ViewGestureController::didStartProvisionalOrSameDocumentLoadForMainFrame):
+    (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
+    (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
+    * UIProcess/Cocoa/ViewGestureController.h:
+    Treat provisional load and same document load the same: they already both
+    unpause the snapshot removal tracker, request render tree size notifications,
+    but same-document navigation was missing the call to dispatchAfterEnsuringDrawing
+    and thus would get stuck waiting for RepaintAfterNavigation.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-01-25  Tim Horton  <[email protected]>
+
+            REGRESSION (r238818): Snapshot is removed too late after swiping back on Twitter
+            https://bugs.webkit.org/show_bug.cgi?id=193860
+            <rdar://problem/47535022>
+
+            Reviewed by Antti Koivisto.
+
+            * UIProcess/Cocoa/ViewGestureController.cpp:
+            (WebKit::ViewGestureController::didStartProvisionalOrSameDocumentLoadForMainFrame):
+            (WebKit::ViewGestureController::didStartProvisionalLoadForMainFrame):
+            (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
+            * UIProcess/Cocoa/ViewGestureController.h:
+            Treat provisional load and same document load the same: they already both
+            unpause the snapshot removal tracker, request render tree size notifications,
+            but same-document navigation was missing the call to dispatchAfterEnsuringDrawing
+            and thus would get stuck waiting for RepaintAfterNavigation.
+
+2019-01-28  Babak Shafiei  <[email protected]>
+
         Cherry-pick r240497. rdar://problem/47586863
 
     iOS: inputmode="none" disables hardware keyboard's globe key

Modified: branches/safari-607-branch/Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp (240573 => 240574)


--- branches/safari-607-branch/Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp	2019-01-28 09:41:17 UTC (rev 240573)
+++ branches/safari-607-branch/Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp	2019-01-28 09:41:20 UTC (rev 240574)
@@ -145,7 +145,7 @@
     return !!backForwardList.forwardItem();
 }
 
-void ViewGestureController::didStartProvisionalLoadForMainFrame()
+void ViewGestureController::didStartProvisionalOrSameDocumentLoadForMainFrame()
 {
     m_snapshotRemovalTracker.resume();
 #if PLATFORM(MAC)
@@ -152,10 +152,15 @@
     requestRenderTreeSizeNotificationIfNeeded();
 #endif
 
-    if (auto provisionalLoadCallback = WTFMove(m_provisionalLoadCallback))
-        provisionalLoadCallback();
+    if (auto loadCallback = WTFMove(m_loadCallback))
+        loadCallback();
 }
 
+void ViewGestureController::didStartProvisionalLoadForMainFrame()
+{
+    didStartProvisionalOrSameDocumentLoadForMainFrame();
+}
+
 void ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame()
 {
     if (!m_snapshotRemovalTracker.eventOccurred(SnapshotRemovalTracker::VisuallyNonEmptyLayout))
@@ -201,10 +206,7 @@
 
 void ViewGestureController::didSameDocumentNavigationForMainFrame(SameDocumentNavigationType type)
 {
-    m_snapshotRemovalTracker.resume();
-#if PLATFORM(MAC)
-    requestRenderTreeSizeNotificationIfNeeded();
-#endif
+    didStartProvisionalOrSameDocumentLoadForMainFrame();
 
     bool cancelledOutstandingEvent = false;
 

Modified: branches/safari-607-branch/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h (240573 => 240574)


--- branches/safari-607-branch/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h	2019-01-28 09:41:17 UTC (rev 240573)
+++ branches/safari-607-branch/Source/WebKit/UIProcess/Cocoa/ViewGestureController.h	2019-01-28 09:41:20 UTC (rev 240574)
@@ -157,6 +157,8 @@
     void willBeginGesture(ViewGestureType);
     void didEndGesture();
 
+    void didStartProvisionalOrSameDocumentLoadForMainFrame();
+
     class SnapshotRemovalTracker {
     public:
         enum Event : uint8_t {
@@ -321,7 +323,7 @@
     bool m_isConnectedToProcess { false };
 
     SnapshotRemovalTracker m_snapshotRemovalTracker;
-    WTF::Function<void()> m_provisionalLoadCallback;
+    WTF::Function<void()> m_loadCallback;
 };
 
 } // namespace WebKit

Modified: branches/safari-607-branch/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm (240573 => 240574)


--- branches/safari-607-branch/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm	2019-01-28 09:41:17 UTC (rev 240573)
+++ branches/safari-607-branch/Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm	2019-01-28 09:41:20 UTC (rev 240574)
@@ -316,7 +316,7 @@
 
     uint64_t pageID = m_webPageProxy.pageID();
     GestureID gestureID = m_currentGestureID;
-    m_provisionalLoadCallback = [this, pageID, gestureID] {
+    m_loadCallback = [this, pageID, gestureID] {
         auto drawingArea = m_webPageProxy.provisionalDrawingArea();
         if (!drawingArea) {
             removeSwipeSnapshot();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to