REGRESSION (r171239): Much more time spent taking snapshots during the PLT
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jul 2014 21:46:43 +0000 (21:46 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Jul 2014 21:46:43 +0000 (21:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135177
<rdar://problem/17764847>

Reviewed by Dan Bernstein.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
(WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
(WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
* WebProcess/WebPage/WebPage.h:
Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
Only send it when the current history item for the main frame changes.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h

index ef7cbe818b6d5db6e23e237aa454c5fe623d1f69..12d5abb2ec47479995f306a11ae3f3e61b0ef29c 100644 (file)
@@ -1,3 +1,25 @@
+2014-07-22  Timothy Horton  <timothy_horton@apple.com>
+
+        REGRESSION (r171239): Much more time spent taking snapshots during the PLT
+        https://bugs.webkit.org/show_bug.cgi?id=135177
+        <rdar://problem/17764847>
+
+        Reviewed by Dan Bernstein.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
+        (WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
+        (WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
+        * WebProcess/WebPage/WebPage.h:
+        Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
+        Only send it when the current history item for the main frame changes.
+
 2014-07-22  Oliver Hunt  <oliver@apple.com>
 
         Add accountsd access to network sandbox profile
index 7f584a3ded24263c34b84cc00939bb805cb4ed87..b5af385291272b0f452ecbd2e174c298253f8493 100644 (file)
@@ -5171,7 +5171,7 @@ void WebPageProxy::navigationGestureSnapshotWasRemoved()
     m_isShowingNavigationGestureSnapshot = false;
 }
 
-void WebPageProxy::willChangeCurrentHistoryItem()
+void WebPageProxy::willChangeCurrentHistoryItemForMainFrame()
 {
     recordNavigationSnapshot();
 }
index be2707db56f8a7fa111a7bea07c278e18fd1e517..0d4e003af15b75cb9fa69b0025e5f8338fed32e1 100644 (file)
@@ -1031,7 +1031,7 @@ private:
     void didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& pageURLString, bool replacementObscured);
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
     void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; }
-    void willChangeCurrentHistoryItem();
+    void willChangeCurrentHistoryItemForMainFrame();
 
     void reattachToWebProcess();
     uint64_t reattachToWebProcessWithItem(WebBackForwardListItem*);
index b0f19bfad12e979660d4948bf573d8621d37ce40..f80252f1db5e201f02bd7bcc8b590f506c4ad7a2 100644 (file)
@@ -404,7 +404,7 @@ messages -> WebPageProxy {
     DidFinishLoadForQuickLookDocumentInMainFrame(WebKit::QuickLookDocumentData data)
 #endif
 
-    WillChangeCurrentHistoryItem()
+    WillChangeCurrentHistoryItemForMainFrame()
 
 #if USE(CONTENT_FILTERING)
     ContentFilterDidBlockLoadForFrame(WebCore::ContentFilter contentFilter, uint64_t frameID)
index f550eb581c7628ce9549bae5a8a3d3010ef890c2..6dc288c53eed6942796a6b9c8c9c52d4c1cf09cd 100644 (file)
@@ -1626,8 +1626,10 @@ void WebFrameLoaderClient::willChangeCurrentHistoryItem()
     WebPage* webPage = m_frame->page();
     if (!webPage)
         return;
+    if (!m_frame->isMainFrame())
+        return;
 
-    webPage->willChangeCurrentHistoryItem();
+    webPage->willChangeCurrentHistoryItemForMainFrame();
 }
 
 #if USE(CONTENT_FILTERING)
index 1c2ed8ae086fb01947bf5fa11a95f45278370457..3f010aee7609754e9f0c9f33bb407b559283456c 100644 (file)
@@ -4848,9 +4848,9 @@ void WebPage::didChangeScrollOffsetForFrame(Frame* frame)
     updateMainFrameScrollOffsetPinning();
 }
 
-void WebPage::willChangeCurrentHistoryItem()
+void WebPage::willChangeCurrentHistoryItemForMainFrame()
 {
-    send(Messages::WebPageProxy::WillChangeCurrentHistoryItem());
+    send(Messages::WebPageProxy::WillChangeCurrentHistoryItemForMainFrame());
 }
 
 } // namespace WebKit
index fbffb2367e1e714c918cbbbc3d72a81e8bb115fb..8a1072b2b729dbb410e8aad2312b96ad0e082967 100644 (file)
@@ -842,7 +842,7 @@ public:
 
     void didChangeScrollOffsetForFrame(WebCore::Frame*);
 
-    void willChangeCurrentHistoryItem();
+    void willChangeCurrentHistoryItemForMainFrame();
 
 private:
     WebPage(uint64_t pageID, const WebPageCreationParameters&);