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

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

Issue 2862293002: Finish removing FrameLoader::Clear() (Closed)
Patch Set: Rebase 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 5bc3baacfc881129f9e342c99a4963cb7befe6e5..7e0970de406a8695baf343a073a28b665a69d923 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();
- frame_->GetEventHandler().Clear();
- if (frame_->View())
- frame_->View()->Clear();
-
- if (state_machine_.IsDisplayingInitialEmptyDocument())
- state_machine_.AdvanceTo(FrameLoaderStateMachine::kCommittedFirstRealLoad);
-
- 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.
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.h ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698