Title: [184497] branches/safari-601.1.32.2-branch/Source/WebKit2
Revision
184497
Author
[email protected]
Date
2015-05-18 10:01:13 -0700 (Mon, 18 May 2015)

Log Message

Merge r184399. rdar://problem/20939743

Modified Paths

Diff

Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/ChangeLog (184496 => 184497)


--- branches/safari-601.1.32.2-branch/Source/WebKit2/ChangeLog	2015-05-18 17:01:09 UTC (rev 184496)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/ChangeLog	2015-05-18 17:01:13 UTC (rev 184497)
@@ -1,3 +1,41 @@
+2015-05-18  Matthew Hanson  <[email protected]>
+
+        Merge r184399. rdar://problem/20939743
+
+    2015-05-15  Chris Dumez  <[email protected]>
+
+            [WK2][Cocoa] Back swipe tab snapshot takes a long time to be removed on bing.com
+            https://bugs.webkit.org/show_bug.cgi?id=145061
+            <rdar://problem/20939743>
+
+            Reviewed by Tim Horton.
+
+            When swiping back from a video search result to the list of video
+            search results on bing.com, the back swipe gesture tab snapshot takes
+            ~3 seconds to be removed, even though the page gets loaded almost
+            instantly from PageCache. The tab snapshot should be removed as soon as
+            the load is done.
+
+            The issue is that we only cleared the back swipe gesture tab snapshot
+            after PageClient::didFinishLoadForMainFrame() has been called. However,
+            PageClient::didFinishLoadForMainFrame() was only being called by
+            WebPageProxy if the main frame loaded *without* error. In case the main
+            frame loaded with an error, only WebPageProxy::didFailLoadForFrame() is
+            called, not WebPageProxy::didFinishLoadForFrame() and we would fail to
+            remove the gesture snapshot until the 3 seconds timeout.
+
+            This patch calls PageClient::didFinishLoadForMainFrame() from
+            WebPageProxy::didFailLoadForFrame() so we remove the snapshot in the
+            error case as well.
+
+            The reason didFailLoadForFrame() is being called on bing.com video
+            search results is because a "ping" load is aborted when the page is
+            entering PageCache. Aborting any kind of resource load sets a
+            "cancellation" error on the main document.
+
+            * UIProcess/WebPageProxy.cpp:
+            (WebKit::WebPageProxy::didFailLoadForFrame):
+
 2015-05-13  Babak Shafiei  <[email protected]>
 
         Merge r183976.

Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp (184496 => 184497)


--- branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp	2015-05-18 17:01:09 UTC (rev 184496)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp	2015-05-18 17:01:13 UTC (rev 184497)
@@ -3021,6 +3021,11 @@
             m_navigationClient->didFailNavigationWithError(*this, *frame, navigation.get(), error, m_process->transformHandlesToObjects(userData.object()).get());
     } else
         m_loaderClient->didFailLoadWithErrorForFrame(*this, *frame, navigation.get(), error, m_process->transformHandlesToObjects(userData.object()).get());
+
+    // Notify the PageClient that the main frame finished loading. The WebView / GestureController need to know the load has
+    // finished (e.g. to clear the back swipe snapshot).
+    if (frame->isMainFrame())
+        m_pageClient.didFinishLoadForMainFrame();
 }
 
 void WebPageProxy::didSameDocumentNavigationForFrame(uint64_t frameID, uint64_t navigationID, uint32_t opaqueSameDocumentNavigationType, const String& url, const UserData& userData)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to