Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(935)

Unified Diff: sky/engine/core/frame/LocalDOMWindow.cpp

Issue 873973002: Remove window.history (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/frame/LocalDOMWindow.h ('k') | sky/engine/core/frame/Window.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/frame/LocalDOMWindow.cpp
diff --git a/sky/engine/core/frame/LocalDOMWindow.cpp b/sky/engine/core/frame/LocalDOMWindow.cpp
index 0e7557a45e8423dc58858425af8249cee458b2e7..3ef1fc190dbcb97fbd45057914836de9da43687f 100644
--- a/sky/engine/core/frame/LocalDOMWindow.cpp
+++ b/sky/engine/core/frame/LocalDOMWindow.cpp
@@ -53,13 +53,11 @@
#include "sky/engine/core/events/EventListener.h"
#include "sky/engine/core/events/HashChangeEvent.h"
#include "sky/engine/core/events/PageTransitionEvent.h"
-#include "sky/engine/core/events/PopStateEvent.h"
#include "sky/engine/core/frame/Console.h"
#include "sky/engine/core/frame/DOMWindowLifecycleNotifier.h"
#include "sky/engine/core/frame/FrameConsole.h"
#include "sky/engine/core/frame/FrameHost.h"
#include "sky/engine/core/frame/FrameView.h"
-#include "sky/engine/core/frame/History.h"
#include "sky/engine/core/frame/LocalFrame.h"
#include "sky/engine/core/frame/Location.h"
#include "sky/engine/core/frame/Screen.h"
@@ -270,8 +268,6 @@ void LocalDOMWindow::documentWasClosed()
{
dispatchWindowLoadEvent();
enqueuePageshowEvent(PageshowEventNotPersisted);
- if (m_pendingStateObject)
- enqueuePopstateEvent(m_pendingStateObject.release());
}
void LocalDOMWindow::enqueuePageshowEvent(PageshowEventPersistence persisted)
@@ -287,25 +283,6 @@ void LocalDOMWindow::enqueueHashchangeEvent(const String& oldURL, const String&
enqueueWindowEvent(HashChangeEvent::create(oldURL, newURL));
}
-void LocalDOMWindow::enqueuePopstateEvent(PassRefPtr<SerializedScriptValue> stateObject)
-{
- // FIXME: https://bugs.webkit.org/show_bug.cgi?id=36202 Popstate event needs to fire asynchronously
- dispatchEvent(PopStateEvent::create(stateObject, &history()));
-}
-
-void LocalDOMWindow::statePopped(PassRefPtr<SerializedScriptValue> stateObject)
-{
- if (!frame())
- return;
-
- // Per step 11 of section 6.5.9 (history traversal) of the HTML5 spec, we
- // defer firing of popstate until we're in the complete state.
- if (document()->isLoadCompleted())
- enqueuePopstateEvent(stateObject);
- else
- m_pendingStateObject = stateObject;
-}
-
LocalDOMWindow::~LocalDOMWindow()
{
ASSERT(m_hasBeenReset);
@@ -404,7 +381,6 @@ void LocalDOMWindow::resetDOMWindowProperties()
m_properties.clear();
m_screen = nullptr;
- m_history = nullptr;
m_console = nullptr;
m_location = nullptr;
m_media = nullptr;
@@ -433,13 +409,6 @@ Screen& LocalDOMWindow::screen() const
return *m_screen;
}
-History& LocalDOMWindow::history() const
-{
- if (!m_history)
- m_history = History::create(m_frame);
- return *m_history;
-}
-
Console& LocalDOMWindow::console() const
{
if (!m_console)
« no previous file with comments | « sky/engine/core/frame/LocalDOMWindow.h ('k') | sky/engine/core/frame/Window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698