Changeset 170404 in webkit


Ignore:
Timestamp:
Jun 24, 2014 4:33:55 PM (10 years ago)
Author:
mrowe@apple.com
Message:

WKContextHistoryClient::didNavigateWithNavigationData is passed incorrect URL when history.pushState is used
<https://webkit.org/b/134271> / <rdar://problem/16270167>

Reviewed by Brady Eidson.

Source/WebCore:
Tests: http/tests/globalhistory/history-delegate-pushstate.html

http/tests/globalhistory/history-delegate-replacestate.html

  • page/History.cpp:

(WebCore::History::stateObjectAdded): Call HistoryController after updating the document's URL so that the
URL will reflect the destination of the navigation when FrameLoaderClient::updateGlobalHistory is called.

LayoutTests:

  • http/tests/globalhistory/history-delegate-pushstate-expected.txt: Added.
  • http/tests/globalhistory/history-delegate-pushstate.html: Added.
  • http/tests/globalhistory/history-delegate-replacestate-expected.txt: Added.
  • http/tests/globalhistory/history-delegate-replacestate.html: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r170398 r170404  
     12014-06-24  Mark Rowe  <mrowe@apple.com>
     2
     3        WKContextHistoryClient::didNavigateWithNavigationData is passed incorrect URL when history.pushState is used
     4        <https://webkit.org/b/134271> / <rdar://problem/16270167>
     5
     6        Reviewed by Brady Eidson.
     7
     8        * http/tests/globalhistory/history-delegate-pushstate-expected.txt: Added.
     9        * http/tests/globalhistory/history-delegate-pushstate.html: Added.
     10        * http/tests/globalhistory/history-delegate-replacestate-expected.txt: Added.
     11        * http/tests/globalhistory/history-delegate-replacestate.html: Added.
     12
    1132014-06-24  Yusuke Suzuki  <utatane.tea@gmail.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r170402 r170404  
     12014-06-24  Mark Rowe  <mrowe@apple.com>
     2
     3        WKContextHistoryClient::didNavigateWithNavigationData is passed incorrect URL when history.pushState is used
     4        <https://webkit.org/b/134271> / <rdar://problem/16270167>
     5
     6        Reviewed by Brady Eidson.
     7
     8        Tests: http/tests/globalhistory/history-delegate-pushstate.html
     9               http/tests/globalhistory/history-delegate-replacestate.html
     10
     11        * page/History.cpp:
     12        (WebCore::History::stateObjectAdded): Call HistoryController after updating the document's URL so that the
     13        URL will reflect the destination of the navigation when FrameLoaderClient::updateGlobalHistory is called.
     14
    1152014-06-24  Myles C. Maxfield  <mmaxfield@apple.com>
    216
  • trunk/Source/WebCore/page/History.cpp

    r165676 r170404  
    148148    }
    149149
    150     if (stateObjectType == StateObjectType::Push)
    151         m_frame->loader().history().pushState(data, title, fullURL.string());
    152     else if (stateObjectType == StateObjectType::Replace)
    153         m_frame->loader().history().replaceState(data, title, fullURL.string());
    154            
    155150    if (!urlString.isEmpty())
    156151        m_frame->document()->updateURLForPushOrReplaceState(fullURL);
    157152
    158     if (stateObjectType == StateObjectType::Push)
     153    if (stateObjectType == StateObjectType::Push) {
     154        m_frame->loader().history().pushState(data, title, fullURL.string());
    159155        m_frame->loader().client().dispatchDidPushStateWithinPage();
    160     else if (stateObjectType == StateObjectType::Replace)
     156    } else if (stateObjectType == StateObjectType::Replace) {
     157        m_frame->loader().history().replaceState(data, title, fullURL.string());
    161158        m_frame->loader().client().dispatchDidReplaceStateWithinPage();
     159    }
    162160}
    163161
Note: See TracChangeset for help on using the changeset viewer.