Changeset 162653 in webkit
- Timestamp:
- Jan 23, 2014 3:22:47 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r162650 r162653 1 2014-01-23 Anders Carlsson <andersca@apple.com> 2 3 Remove an unneeded synchronous back/forward message 4 https://bugs.webkit.org/show_bug.cgi?id=127516 5 6 Reviewed by Tim Horton. 7 8 * UIProcess/WebLoaderClient.cpp: 9 * UIProcess/WebLoaderClient.h: 10 * UIProcess/WebPageProxy.cpp: 11 (WebKit::WebPageProxy::initializeLoaderClient): 12 * UIProcess/WebPageProxy.h: 13 * UIProcess/WebPageProxy.messages.in: 14 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 15 (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem): 16 * WebProcess/WebPage/WebPage.cpp: 17 (WebKit::WebPage::WebPage): 18 * WebProcess/WebPage/WebPage.h: 19 * WebProcess/WebPage/WebPage.messages.in: 20 1 21 2014-01-23 Anders Carlsson <andersca@apple.com> 2 22 -
trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp
r162629 r162653 251 251 } 252 252 253 bool WebLoaderClient::shouldGoToBackForwardListItem(WebPageProxy* page, WebBackForwardListItem* item)254 {255 // We should only even considering sending the shouldGoToBackForwardListItem() client callback256 // for version 0 clients. Later versioned clients should get willGoToBackForwardListItem() instead,257 // but due to XPC race conditions this one might have been called instead.258 if (m_client.base.version > 0 || !m_client.shouldGoToBackForwardListItem)259 return true;260 261 return m_client.shouldGoToBackForwardListItem(toAPI(page), toAPI(item), m_client.base.clientInfo);262 }263 264 253 void WebLoaderClient::willGoToBackForwardListItem(WebPageProxy* page, WebBackForwardListItem* item, API::Object* userData) 265 254 { -
trunk/Source/WebKit2/UIProcess/WebLoaderClient.h
r162629 r162653 96 96 97 97 void didChangeBackForwardList(WebPageProxy*, WebBackForwardListItem* addedItem, Vector<RefPtr<API::Object>>* removedItems); 98 bool shouldGoToBackForwardListItem(WebPageProxy*, WebBackForwardListItem*);99 98 void willGoToBackForwardListItem(WebPageProxy*, WebBackForwardListItem*, API::Object*); 100 99 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r162639 r162653 417 417 if (milestones) 418 418 m_process->send(Messages::WebPage::ListenForLayoutMilestones(milestones), m_pageID); 419 420 m_process->send(Messages::WebPage::SetWillGoToBackForwardItemCallbackEnabled(loadClient->version > 0), m_pageID);421 419 } 422 420 … … 834 832 { 835 833 m_loaderClient.didChangeBackForwardList(this, added, removed); 836 }837 838 void WebPageProxy::shouldGoToBackForwardListItem(uint64_t itemID, bool& shouldGoToBackForwardItem)839 {840 WebBackForwardListItem* item = m_process->webBackForwardItem(itemID);841 shouldGoToBackForwardItem = item && m_loaderClient.shouldGoToBackForwardListItem(this, item);842 834 } 843 835 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r162639 r162653 401 401 void tryRestoreScrollPosition(); 402 402 void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<RefPtr<API::Object>>* removedItems); 403 void shouldGoToBackForwardListItem(uint64_t itemID, bool& shouldGoToBackForwardListItem);404 403 void willGoToBackForwardListItem(uint64_t itemID, IPC::MessageDecoder&); 405 404 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r162629 r162653 183 183 BackForwardForwardListCount() -> (int32_t count) 184 184 BackForwardClear() 185 ShouldGoToBackForwardListItem(uint64_t itemID) -> (bool shouldGoToBackForwardListItem)186 185 WillGoToBackForwardListItem(uint64_t itemID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic 187 186 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r162597 r162653 943 943 return false; 944 944 945 if (webPage->willGoToBackForwardItemCallbackEnabled()) { 946 webPage->send(Messages::WebPageProxy::WillGoToBackForwardListItem(itemID, InjectedBundleUserMessageEncoder(userData.get()))); 947 return true; 948 } 949 950 if (!webPage->sendSync(Messages::WebPageProxy::ShouldGoToBackForwardListItem(itemID), Messages::WebPageProxy::ShouldGoToBackForwardListItem::Reply(shouldGoToBackForwardListItem))) 951 return false; 952 953 return shouldGoToBackForwardListItem; 945 webPage->send(Messages::WebPageProxy::WillGoToBackForwardListItem(itemID, InjectedBundleUserMessageEncoder(userData.get()))); 946 return true; 954 947 } 955 948 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r162644 r162653 276 276 , m_isShowingContextMenu(false) 277 277 #endif 278 , m_willGoToBackForwardItemCallbackEnabled(true)279 278 #if PLATFORM(IOS) 280 279 , m_shouldReturnWordAtSelection(false) -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r162568 r162653 623 623 void recomputeShortCircuitHorizontalWheelEventsState(); 624 624 625 bool willGoToBackForwardItemCallbackEnabled() const { return m_willGoToBackForwardItemCallbackEnabled; }626 627 625 void setVisibilityStatePrerender(); 628 626 void updateVisibilityState(bool isInitialState = false); … … 770 768 void didRemoveBackForwardItem(uint64_t); 771 769 772 void setWillGoToBackForwardItemCallbackEnabled(bool enabled) { m_willGoToBackForwardItemCallbackEnabled = enabled; }773 774 770 void setDrawsBackground(bool); 775 771 void setDrawsTransparentBackground(bool); … … 1040 1036 #endif 1041 1037 1042 bool m_willGoToBackForwardItemCallbackEnabled;1043 1044 1038 #if PLATFORM(IOS) 1045 1039 RefPtr<WebCore::Node> m_assistedNode; -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
r162568 r162653 100 100 101 101 DidRemoveBackForwardItem(uint64_t backForwardItemID) 102 SetWillGoToBackForwardItemCallbackEnabled(bool willGoToBackForwardItemEnabled)103 102 104 103 DidReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
Note: See TracChangeset
for help on using the changeset viewer.