Changeset 161593 in webkit


Ignore:
Timestamp:
Jan 9, 2014 4:02:51 PM (10 years ago)
Author:
andersca@apple.com
Message:

History::StateObjectType should be a strong enum
https://bugs.webkit.org/show_bug.cgi?id=126725

Reviewed by Beth Dakin.

  • bindings/js/JSHistoryCustom.cpp:

(WebCore::JSHistory::pushState):
(WebCore::JSHistory::replaceState):

  • loader/HistoryController.cpp:

(WebCore::HistoryController::pushState):

  • page/History.cpp:

(WebCore::History::stateObjectAdded):

  • page/History.h:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r161592 r161593  
     12014-01-09  Anders Carlsson  <andersca@apple.com>
     2
     3        History::StateObjectType should be a strong enum
     4        https://bugs.webkit.org/show_bug.cgi?id=126725
     5
     6        Reviewed by Beth Dakin.
     7
     8        * bindings/js/JSHistoryCustom.cpp:
     9        (WebCore::JSHistory::pushState):
     10        (WebCore::JSHistory::replaceState):
     11        * loader/HistoryController.cpp:
     12        (WebCore::HistoryController::pushState):
     13        * page/History.cpp:
     14        (WebCore::History::stateObjectAdded):
     15        * page/History.h:
     16
    1172014-01-09  Daniel Bates  <dabates@apple.com>
    218
  • trunk/Source/WebCore/bindings/js/JSHistoryCustom.cpp

    r160208 r161593  
    162162
    163163    ExceptionCode ec = 0;
    164     impl().stateObjectAdded(historyState.release(), title, url, History::StateObjectPush, ec);
     164    impl().stateObjectAdded(historyState.release(), title, url, History::StateObjectType::Push, ec);
    165165    setDOMException(exec, ec);
    166166
     
    188188
    189189    ExceptionCode ec = 0;
    190     impl().stateObjectAdded(historyState.release(), title, url, History::StateObjectReplace, ec);
     190    impl().stateObjectAdded(historyState.release(), title, url, History::StateObjectType::Replace, ec);
    191191    setDOMException(exec, ec);
    192192
  • trunk/Source/WebCore/loader/HistoryController.cpp

    r161127 r161593  
    856856    addVisitedLink(page, URL(ParsedURLString, urlString));
    857857    m_frame.loader().client().updateGlobalHistory();
    858 
    859858}
    860859
  • trunk/Source/WebCore/page/History.cpp

    r156550 r161593  
    148148    }
    149149
    150     if (stateObjectType == StateObjectPush)
     150    if (stateObjectType == StateObjectType::Push)
    151151        m_frame->loader().history().pushState(data, title, fullURL.string());
    152     else if (stateObjectType == StateObjectReplace)
     152    else if (stateObjectType == StateObjectType::Replace)
    153153        m_frame->loader().history().replaceState(data, title, fullURL.string());
    154154           
     
    156156        m_frame->document()->updateURLForPushOrReplaceState(fullURL);
    157157
    158     if (stateObjectType == StateObjectPush)
     158    if (stateObjectType == StateObjectType::Push)
    159159        m_frame->loader().client().dispatchDidPushStateWithinPage();
    160     else if (stateObjectType == StateObjectReplace)
     160    else if (stateObjectType == StateObjectType::Replace)
    161161        m_frame->loader().client().dispatchDidReplaceStateWithinPage();
    162162}
  • trunk/Source/WebCore/page/History.h

    r156550 r161593  
    5858    bool isSameAsCurrentState(SerializedScriptValue*) const;
    5959
    60     enum StateObjectType {
    61         StateObjectPush,
    62         StateObjectReplace
     60    enum class StateObjectType {
     61        Push,
     62        Replace
    6363    };
    6464    void stateObjectAdded(PassRefPtr<SerializedScriptValue>, const String& title, const String& url, StateObjectType, ExceptionCode&);
Note: See TracChangeset for help on using the changeset viewer.