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

Unified Diff: third_party/WebKit/Source/core/frame/RemoteFrame.cpp

Issue 2134113002: Use ChildFrameDisconnector when detaching child frames of a LocalFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/RemoteFrame.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/RemoteFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/RemoteFrame.cpp b/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
index f7eb7a08a368f0cd66401f2ba38e6a0867a15107..0c3c253a18989c5009bb8b7096b5c7f0d5847f40 100644
--- a/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
@@ -196,4 +196,15 @@ void RemoteFrame::advanceFocus(WebFocusType type, LocalFrame* source)
client()->advanceFocus(type, source);
}
+void RemoteFrame::detachChildren()
+{
+ using FrameVector = HeapVector<Member<Frame>>;
+ FrameVector childrenToDetach;
+ childrenToDetach.reserveCapacity(tree().childCount());
+ for (Frame* child = tree().firstChild(); child; child = child->tree().nextSibling())
+ childrenToDetach.append(child);
+ for (const auto& child : childrenToDetach)
+ child->detach(FrameDetachType::Remove);
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/frame/RemoteFrame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698