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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp

Issue 2871453002: Delete widget tree (FrameView::parent_) (Closed)
Patch Set: Remove deferred state 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/html/HTMLFrameOwnerElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
index 8cdc71dbe282ba0e2de74b79f04fa3e3970d9dab..b5df44a362648d33018fcd5f5f80a1a17fe91f05 100644
--- a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
@@ -76,6 +76,10 @@ HTMLFrameOwnerElement::UpdateSuspendScope::UpdateSuspendScope() {
void HTMLFrameOwnerElement::UpdateSuspendScope::
PerformDeferredWidgetTreeOperations() {
+ VLOG(1) << "Performing deferred operations NewParent.size="
+ << FrameOrPluginNewParentMap().size() << ", TempRemoval.size="
+ << FrameOrPluginsPendingTemporaryRemovalFromParent().size()
+ << ", Dispose.size=" << FrameOrPluginsPendingDispose().size();
FrameOrPluginToParentMap map;
FrameOrPluginNewParentMap().swap(map);
for (const auto& entry : map) {
@@ -117,7 +121,11 @@ HTMLFrameOwnerElement::UpdateSuspendScope::~UpdateSuspendScope() {
// Unlike MoveFrameOrPluginToParentSoon, this will not call dispose.
void TemporarilyRemoveFrameOrPluginFromParentSoon(FrameOrPlugin* child) {
+ // child->SetFrameOrPluginState(FrameOrPlugin::kDeferred);
if (g_update_suspend_count) {
+ VLOG(1) << "Defered temp remove child=" << child;
+ if (VLOG_IS_ON(2))
+ base::debug::StackTrace(10).Print();
FrameOrPluginsPendingTemporaryRemovalFromParent().insert(child);
} else {
if (child->Parent())
@@ -126,6 +134,7 @@ void TemporarilyRemoveFrameOrPluginFromParentSoon(FrameOrPlugin* child) {
}
void MoveFrameOrPluginToParentSoon(FrameOrPlugin* child, FrameView* parent) {
+ // child->SetFrameOrPluginState(FrameOrPlugin::kDeferred);
if (!g_update_suspend_count) {
if (parent) {
DCHECK(child != parent && !child->Parent());
@@ -136,6 +145,9 @@ void MoveFrameOrPluginToParentSoon(FrameOrPlugin* child, FrameView* parent) {
}
return;
}
+ VLOG(1) << "Deferred New Parent child=" << child << ", parent=" << parent;
+ if (VLOG_IS_ON(2))
+ base::debug::StackTrace(10).Print();
FrameOrPluginNewParentMap().Set(child, parent);
}
@@ -276,6 +288,9 @@ Document* HTMLFrameOwnerElement::getSVGDocument(
}
void HTMLFrameOwnerElement::SetWidget(FrameOrPlugin* frame_or_plugin) {
+ VLOG(1) << "SetWidget old=" << widget_ << ", new=" << frame_or_plugin
+ << ", old parent=" << (!widget_ ? -1 : widget_ && widget_->Parent())
+ << ", count=" << g_update_suspend_count;
if (frame_or_plugin == widget_)
return;
@@ -298,14 +313,18 @@ void HTMLFrameOwnerElement::SetWidget(FrameOrPlugin* frame_or_plugin) {
LayoutPart* layout_part = ToLayoutPart(GetLayoutObject());
LayoutPartItem layout_part_item = LayoutPartItem(layout_part);
- if (layout_part_item.IsNull())
+ if (layout_part_item.IsNull()) {
+ VLOG(1) << "SetWidget new=" << frame_or_plugin << ", parent=0";
return;
+ }
if (widget_) {
layout_part_item.UpdateOnWidgetChange();
DCHECK_EQ(GetDocument().View(), layout_part_item.GetFrameView());
DCHECK(layout_part_item.GetFrameView());
+ VLOG(1) << "SetWidget new=" << frame_or_plugin
+ << ", parent=" << layout_part_item.GetFrameView();
MoveFrameOrPluginToParentSoon(widget_, layout_part_item.GetFrameView());
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/RemoteFrameView.cpp ('k') | third_party/WebKit/Source/core/plugins/PluginView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698