Diff
Modified: trunk/Source/WebCore/ChangeLog (161592 => 161593)
--- trunk/Source/WebCore/ChangeLog 2014-01-09 23:59:13 UTC (rev 161592)
+++ trunk/Source/WebCore/ChangeLog 2014-01-10 00:02:51 UTC (rev 161593)
@@ -1,3 +1,19 @@
+2014-01-09 Anders Carlsson <[email protected]>
+
+ 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:
+
2014-01-09 Daniel Bates <[email protected]>
Attempt to fix the Mountain Lion Release (32-bit) build following <http://trac.webkit.org/changeset/161589>
Modified: trunk/Source/WebCore/bindings/js/JSHistoryCustom.cpp (161592 => 161593)
--- trunk/Source/WebCore/bindings/js/JSHistoryCustom.cpp 2014-01-09 23:59:13 UTC (rev 161592)
+++ trunk/Source/WebCore/bindings/js/JSHistoryCustom.cpp 2014-01-10 00:02:51 UTC (rev 161593)
@@ -161,7 +161,7 @@
}
ExceptionCode ec = 0;
- impl().stateObjectAdded(historyState.release(), title, url, History::StateObjectPush, ec);
+ impl().stateObjectAdded(historyState.release(), title, url, History::StateObjectType::Push, ec);
setDOMException(exec, ec);
m_state.clear();
@@ -187,7 +187,7 @@
}
ExceptionCode ec = 0;
- impl().stateObjectAdded(historyState.release(), title, url, History::StateObjectReplace, ec);
+ impl().stateObjectAdded(historyState.release(), title, url, History::StateObjectType::Replace, ec);
setDOMException(exec, ec);
m_state.clear();
Modified: trunk/Source/WebCore/loader/HistoryController.cpp (161592 => 161593)
--- trunk/Source/WebCore/loader/HistoryController.cpp 2014-01-09 23:59:13 UTC (rev 161592)
+++ trunk/Source/WebCore/loader/HistoryController.cpp 2014-01-10 00:02:51 UTC (rev 161593)
@@ -855,7 +855,6 @@
addVisitedLink(page, URL(ParsedURLString, urlString));
m_frame.loader().client().updateGlobalHistory();
-
}
void HistoryController::replaceState(PassRefPtr<SerializedScriptValue> stateObject, const String& title, const String& urlString)
Modified: trunk/Source/WebCore/page/History.cpp (161592 => 161593)
--- trunk/Source/WebCore/page/History.cpp 2014-01-09 23:59:13 UTC (rev 161592)
+++ trunk/Source/WebCore/page/History.cpp 2014-01-10 00:02:51 UTC (rev 161593)
@@ -147,17 +147,17 @@
return;
}
- if (stateObjectType == StateObjectPush)
+ if (stateObjectType == StateObjectType::Push)
m_frame->loader().history().pushState(data, title, fullURL.string());
- else if (stateObjectType == StateObjectReplace)
+ else if (stateObjectType == StateObjectType::Replace)
m_frame->loader().history().replaceState(data, title, fullURL.string());
if (!urlString.isEmpty())
m_frame->document()->updateURLForPushOrReplaceState(fullURL);
- if (stateObjectType == StateObjectPush)
+ if (stateObjectType == StateObjectType::Push)
m_frame->loader().client().dispatchDidPushStateWithinPage();
- else if (stateObjectType == StateObjectReplace)
+ else if (stateObjectType == StateObjectType::Replace)
m_frame->loader().client().dispatchDidReplaceStateWithinPage();
}
Modified: trunk/Source/WebCore/page/History.h (161592 => 161593)
--- trunk/Source/WebCore/page/History.h 2014-01-09 23:59:13 UTC (rev 161592)
+++ trunk/Source/WebCore/page/History.h 2014-01-10 00:02:51 UTC (rev 161593)
@@ -57,9 +57,9 @@
bool stateChanged() const;
bool isSameAsCurrentState(SerializedScriptValue*) const;
- enum StateObjectType {
- StateObjectPush,
- StateObjectReplace
+ enum class StateObjectType {
+ Push,
+ Replace
};
void stateObjectAdded(PassRefPtr<SerializedScriptValue>, const String& title, const String& url, StateObjectType, ExceptionCode&);