| 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 4959e65cffdd86d3499cbe53c908e02024163cdf..3546e50925184fcffb263fdd67a692ab0c072fb5 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -101,7 +101,6 @@
|
| #include "core/paint/PaintLayer.h"
|
| #include "core/paint/PaintTiming.h"
|
| #include "core/paint/PrePaintTreeWalk.h"
|
| -#include "core/plugins/PluginView.h"
|
| #include "core/style/ComputedStyle.h"
|
| #include "core/svg/SVGDocumentExtensions.h"
|
| #include "core/svg/SVGSVGElement.h"
|
| @@ -238,6 +237,7 @@ DEFINE_TRACE(FrameView) {
|
| visitor->trace(m_animatingScrollableAreas);
|
| visitor->trace(m_autoSizeInfo);
|
| visitor->trace(m_children);
|
| + visitor->trace(m_plugins);
|
| visitor->trace(m_viewportScrollableArea);
|
| visitor->trace(m_visibilityObserver);
|
| visitor->trace(m_scrollAnchor);
|
| @@ -3320,10 +3320,8 @@ void FrameView::updateStyleAndLayoutIfNeededRecursiveInternal() {
|
| // TODO(leviw): This currently runs the entire lifecycle on plugin WebViews.
|
| // We should have a way to only run these other Documents to the same
|
| // lifecycle stage as this frame.
|
| - const ChildrenSet* viewChildren = children();
|
| - for (const Member<FrameViewBase>& child : *viewChildren) {
|
| - if ((*child).isPluginContainer())
|
| - toPluginView(child.get())->updateAllLifecyclePhases();
|
| + for (const Member<PluginView>& plugin : *plugins()) {
|
| + plugin->updateAllLifecyclePhases();
|
| }
|
| checkDoesNotNeedLayout();
|
|
|
| @@ -3784,6 +3782,14 @@ void FrameView::removeChild(FrameViewBase* child) {
|
| m_children.erase(child);
|
| }
|
|
|
| +void FrameView::removePlugin(PluginView* plugin) {
|
| + m_plugins.erase(plugin);
|
| +}
|
| +
|
| +void FrameView::addPlugin(PluginView* plugin) {
|
| + m_plugins.insert(plugin);
|
| +}
|
| +
|
| bool FrameView::visualViewportSuppliesScrollbars() {
|
| // On desktop, we always use the layout viewport's scrollbars.
|
| if (!m_frame->settings() || !m_frame->settings()->getViewportEnabled() ||
|
| @@ -3870,7 +3876,8 @@ IntSize FrameView::maximumScrollOffsetInt() const {
|
| }
|
|
|
| void FrameView::addChild(FrameViewBase* child) {
|
| - ASSERT(child != this && !child->parent());
|
| + DCHECK(child != this && !child->parent());
|
| + DCHECK(!child->isPluginView());
|
| child->setParent(this);
|
| m_children.insert(child);
|
| }
|
|
|