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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2862293002: Finish removing FrameLoader::Clear() (Closed)
Patch Set: Drop unnecessary #include Created 3 years, 7 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
Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index a802441361036d57a8e88467ebb2c6d05c21deec..912178bd3a830b65cdd1c797cb913e3aab068d30 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -44,7 +44,6 @@
#include "core/dom/Element.h"
#include "core/dom/TaskRunnerHelper.h"
#include "core/dom/ViewportDescription.h"
-#include "core/editing/Editor.h"
#include "core/events/GestureEvent.h"
#include "core/events/KeyboardEvent.h"
#include "core/events/MouseEvent.h"
@@ -358,24 +357,6 @@ void FrameLoader::DidExplicitOpen() {
frame_->GetNavigationScheduler().Cancel();
}
-void FrameLoader::Clear() {
- // clear() is called during (Local)Frame detachment or when reusing a
- // FrameLoader by putting a new Document within it
- // (DocumentLoader::ensureWriter().)
- if (state_machine_.CreatingInitialEmptyDocument())
- return;
-
- frame_->GetEditor().Clear();
Nate Chapin 2017/05/17 18:18:59 Move this and the next line to LocalFrame::Documen
- frame_->GetEventHandler().Clear();
- if (frame_->View())
- frame_->View()->Clear();
Nate Chapin 2017/05/17 18:18:59 We just got a new FrameView, no need to clear it.
-
- if (state_machine_.IsDisplayingInitialEmptyDocument())
- state_machine_.AdvanceTo(FrameLoaderStateMachine::kCommittedFirstRealLoad);
Nate Chapin 2017/05/17 18:18:59 Moved to DocumentLoader.
-
- TakeObjectSnapshot();
-}
-
// This is only called by ScriptController::executeScriptIfJavaScriptURL and
// always contains the result of evaluating a javascript: url. This is the
// <iframe src="javascript:'html'"> case.
@@ -404,7 +385,6 @@ void FrameLoader::ReplaceDocumentWhileExecutingJavaScriptURL(
SubframeLoadingDisabler disabler(frame_->GetDocument());
frame_->DetachChildren();
frame_->GetDocument()->Shutdown();
- Clear();
// detachChildren() potentially detaches the frame from the document. The
// loading cannot continue in that case.

Powered by Google App Engine
This is Rietveld 408576698