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

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

Issue 1708923002: Ensure WebView plugins run their lifecycle even absent main frame Layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 6bd87f905f2b4739a9110fcb63b3ab66bf9c762e..8cc6f3b69dceada90f39188db7ab4d5cb1ae8f12 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -80,6 +80,7 @@
#include "core/paint/FramePainter.h"
#include "core/paint/PaintLayer.h"
#include "core/paint/PaintPropertyTreeBuilder.h"
+#include "core/plugins/PluginView.h"
#include "core/style/ComputedStyle.h"
#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGSVGElement.h"
@@ -2622,6 +2623,14 @@ void FrameView::updateStyleAndLayoutIfNeededRecursive()
if (needsLayout())
layout();
+ // WebView plugins need to update regardless of whether the LayoutEmbeddedObject
+ // that owns them needed layout.
chrishtr 2016/02/17 23:49:18 Add a TODO to fix this in a better way.
+ const ChildrenWidgetSet* viewChildren = children();
+ for (const RefPtrWillBeMember<Widget>& child : *viewChildren) {
eae 2016/02/17 23:48:03 Why is this only needed for WebView plugins and no
+ if ((*child).isPluginContainer())
+ toPluginView(child.get())->layoutIfNeeded();
chrishtr 2016/02/17 23:49:18 Add a note that this actually runs the entire life
+ }
+
// FIXME: Calling layout() shouldn't trigger script execution or have any
// observable effects on the frame tree but we're not quite there yet.
WillBeHeapVector<RefPtrWillBeMember<FrameView>> frameViews;

Powered by Google App Engine
This is Rietveld 408576698