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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2127463002: Revert of Move UndoStack from Page to Editor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 24 matching lines...) Expand all
35 #include "core/loader/FrameLoader.h" 35 #include "core/loader/FrameLoader.h"
36 36
37 #include "bindings/core/v8/DOMWrapperWorld.h" 37 #include "bindings/core/v8/DOMWrapperWorld.h"
38 #include "bindings/core/v8/ScriptController.h" 38 #include "bindings/core/v8/ScriptController.h"
39 #include "bindings/core/v8/SerializedScriptValue.h" 39 #include "bindings/core/v8/SerializedScriptValue.h"
40 #include "core/HTMLNames.h" 40 #include "core/HTMLNames.h"
41 #include "core/dom/Document.h" 41 #include "core/dom/Document.h"
42 #include "core/dom/Element.h" 42 #include "core/dom/Element.h"
43 #include "core/dom/ViewportDescription.h" 43 #include "core/dom/ViewportDescription.h"
44 #include "core/editing/Editor.h" 44 #include "core/editing/Editor.h"
45 #include "core/editing/commands/UndoStack.h"
45 #include "core/events/GestureEvent.h" 46 #include "core/events/GestureEvent.h"
46 #include "core/events/KeyboardEvent.h" 47 #include "core/events/KeyboardEvent.h"
47 #include "core/events/MouseEvent.h" 48 #include "core/events/MouseEvent.h"
48 #include "core/events/PageTransitionEvent.h" 49 #include "core/events/PageTransitionEvent.h"
49 #include "core/fetch/ResourceFetcher.h" 50 #include "core/fetch/ResourceFetcher.h"
50 #include "core/fetch/ResourceLoader.h" 51 #include "core/fetch/ResourceLoader.h"
51 #include "core/frame/FrameHost.h" 52 #include "core/frame/FrameHost.h"
52 #include "core/frame/FrameView.h" 53 #include "core/frame/FrameView.h"
53 #include "core/frame/LocalDOMWindow.h" 54 #include "core/frame/LocalDOMWindow.h"
54 #include "core/frame/LocalFrame.h" 55 #include "core/frame/LocalFrame.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 { 262 {
262 NavigationCounterForUnload counter; 263 NavigationCounterForUnload counter;
263 264
264 // If the frame is unloading, the provisional loader should no longer be 265 // If the frame is unloading, the provisional loader should no longer be
265 // protected. It will be detached soon. 266 // protected. It will be detached soon.
266 m_protectProvisionalLoader = false; 267 m_protectProvisionalLoader = false;
267 saveScrollState(); 268 saveScrollState();
268 269
269 if (m_frame->document() && !SVGImage::isInSVGImage(m_frame->document())) 270 if (m_frame->document() && !SVGImage::isInSVGImage(m_frame->document()))
270 m_frame->document()->dispatchUnloadEvents(); 271 m_frame->document()->dispatchUnloadEvents();
272
273 if (Page* page = m_frame->page())
274 page->undoStack().didUnloadFrame(*m_frame);
271 } 275 }
272 276
273 void FrameLoader::didExplicitOpen() 277 void FrameLoader::didExplicitOpen()
274 { 278 {
275 // Calling document.open counts as committing the first real document load. 279 // Calling document.open counts as committing the first real document load.
276 if (!m_stateMachine.committedFirstRealDocumentLoad()) 280 if (!m_stateMachine.committedFirstRealDocumentLoad())
277 m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad ); 281 m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad );
278 282
279 // Only model a document.open() as part of a navigation if its parent is not done 283 // Only model a document.open() as part of a navigation if its parent is not done
280 // or in the process of completing. 284 // or in the process of completing.
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); 1618 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String());
1615 return tracedValue; 1619 return tracedValue;
1616 } 1620 }
1617 1621
1618 inline void FrameLoader::takeObjectSnapshot() const 1622 inline void FrameLoader::takeObjectSnapshot() const
1619 { 1623 {
1620 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); 1624 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value());
1621 } 1625 }
1622 1626
1623 } // namespace blink 1627 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/UndoStack.cpp ('k') | third_party/WebKit/Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698