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

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

Issue 2110543008: Move UndoStack from Page to Editor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix layout test 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 NavigationCounterForUnload counter; 263 NavigationCounterForUnload counter;
264 264
265 // 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
266 // protected. It will be detached soon. 266 // protected. It will be detached soon.
267 m_protectProvisionalLoader = false; 267 m_protectProvisionalLoader = false;
268 saveScrollState(); 268 saveScrollState();
269 269
270 if (m_frame->document() && !SVGImage::isInSVGImage(m_frame->document())) 270 if (m_frame->document() && !SVGImage::isInSVGImage(m_frame->document()))
271 m_frame->document()->dispatchUnloadEvents(); 271 m_frame->document()->dispatchUnloadEvents();
272 272
273 if (Page* page = m_frame->page()) 273 // TODO(xiaochengh): can the undo stack be used again after frame unloading?
yosin_UTC9 2016/07/01 09:21:21 TL;DR: No, we don't use undo stack after frame unl
Xiaocheng 2016/07/04 06:29:23 I agree. Removed.
274 page->undoStack().didUnloadFrame(*m_frame); 274 // If not, we can simply remove |UndoStack::didUnloadFrame()|.
275 m_frame->editor().undoStack().didUnloadFrame();
275 } 276 }
276 277
277 void FrameLoader::didExplicitOpen() 278 void FrameLoader::didExplicitOpen()
278 { 279 {
279 // Calling document.open counts as committing the first real document load. 280 // Calling document.open counts as committing the first real document load.
280 if (!m_stateMachine.committedFirstRealDocumentLoad()) 281 if (!m_stateMachine.committedFirstRealDocumentLoad())
281 m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad ); 282 m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad );
282 283
283 // Only model a document.open() as part of a navigation if its parent is not done 284 // Only model a document.open() as part of a navigation if its parent is not done
284 // or in the process of completing. 285 // or in the process of completing.
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); 1619 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String());
1619 return tracedValue; 1620 return tracedValue;
1620 } 1621 }
1621 1622
1622 inline void FrameLoader::takeObjectSnapshot() const 1623 inline void FrameLoader::takeObjectSnapshot() const
1623 { 1624 {
1624 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); 1625 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value());
1625 } 1626 }
1626 1627
1627 } // namespace blink 1628 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698