Changeset 162653 in webkit


Ignore:
Timestamp:
Jan 23, 2014 3:22:47 PM (10 years ago)
Author:
andersca@apple.com
Message:

Remove an unneeded synchronous back/forward message
https://bugs.webkit.org/show_bug.cgi?id=127516

Reviewed by Tim Horton.

  • UIProcess/WebLoaderClient.cpp:
  • UIProcess/WebLoaderClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::initializeLoaderClient):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
Location:
trunk/Source/WebKit2
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r162650 r162653  
     12014-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
    1212014-01-23  Anders Carlsson  <andersca@apple.com>
    222
  • trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp

    r162629 r162653  
    251251}
    252252
    253 bool WebLoaderClient::shouldGoToBackForwardListItem(WebPageProxy* page, WebBackForwardListItem* item)
    254 {
    255     // We should only even considering sending the shouldGoToBackForwardListItem() client callback
    256     // 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 
    264253void WebLoaderClient::willGoToBackForwardListItem(WebPageProxy* page, WebBackForwardListItem* item, API::Object* userData)
    265254{
  • trunk/Source/WebKit2/UIProcess/WebLoaderClient.h

    r162629 r162653  
    9696
    9797    void didChangeBackForwardList(WebPageProxy*, WebBackForwardListItem* addedItem, Vector<RefPtr<API::Object>>* removedItems);
    98     bool shouldGoToBackForwardListItem(WebPageProxy*, WebBackForwardListItem*);
    9998    void willGoToBackForwardListItem(WebPageProxy*, WebBackForwardListItem*, API::Object*);
    10099
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r162639 r162653  
    417417    if (milestones)
    418418        m_process->send(Messages::WebPage::ListenForLayoutMilestones(milestones), m_pageID);
    419 
    420     m_process->send(Messages::WebPage::SetWillGoToBackForwardItemCallbackEnabled(loadClient->version > 0), m_pageID);
    421419}
    422420
     
    834832{
    835833    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);
    842834}
    843835
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r162639 r162653  
    401401    void tryRestoreScrollPosition();
    402402    void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<RefPtr<API::Object>>* removedItems);
    403     void shouldGoToBackForwardListItem(uint64_t itemID, bool& shouldGoToBackForwardListItem);
    404403    void willGoToBackForwardListItem(uint64_t itemID, IPC::MessageDecoder&);
    405404
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in

    r162629 r162653  
    183183    BackForwardForwardListCount() -> (int32_t count)
    184184    BackForwardClear()
    185     ShouldGoToBackForwardListItem(uint64_t itemID) -> (bool shouldGoToBackForwardListItem)
    186185    WillGoToBackForwardListItem(uint64_t itemID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
    187186
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r162597 r162653  
    943943        return false;
    944944   
    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;
    954947}
    955948
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r162644 r162653  
    276276    , m_isShowingContextMenu(false)
    277277#endif
    278     , m_willGoToBackForwardItemCallbackEnabled(true)
    279278#if PLATFORM(IOS)
    280279    , m_shouldReturnWordAtSelection(false)
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h

    r162568 r162653  
    623623    void recomputeShortCircuitHorizontalWheelEventsState();
    624624
    625     bool willGoToBackForwardItemCallbackEnabled() const { return m_willGoToBackForwardItemCallbackEnabled; }
    626 
    627625    void setVisibilityStatePrerender();
    628626    void updateVisibilityState(bool isInitialState = false);
     
    770768    void didRemoveBackForwardItem(uint64_t);
    771769
    772     void setWillGoToBackForwardItemCallbackEnabled(bool enabled) { m_willGoToBackForwardItemCallbackEnabled = enabled; }
    773    
    774770    void setDrawsBackground(bool);
    775771    void setDrawsTransparentBackground(bool);
     
    10401036#endif
    10411037   
    1042     bool m_willGoToBackForwardItemCallbackEnabled;
    1043 
    10441038#if PLATFORM(IOS)
    10451039    RefPtr<WebCore::Node> m_assistedNode;
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in

    r162568 r162653  
    100100
    101101    DidRemoveBackForwardItem(uint64_t backForwardItemID)
    102     SetWillGoToBackForwardItemCallbackEnabled(bool willGoToBackForwardItemEnabled)
    103102
    104103    DidReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
Note: See TracChangeset for help on using the changeset viewer.