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

Unified Diff: third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp

Issue 2845583002: Remove FrameViewBase as base class of RemoteFrameView. (Closed)
Patch Set: fix scrollbar inactive Created 3 years, 8 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/modules/plugins/PluginOcclusionSupport.cpp
diff --git a/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp b/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp
index 745a0efe6df96fd6c3d3f19c5114532b932d18af..a3fcc340d8aae42b6108f5f63e17bfd866d0303f 100644
--- a/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp
+++ b/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp
@@ -154,7 +154,7 @@ static const Element* TopLayerAncestor(const Element* element) {
// page. In a nutshell, iframe elements should occlude plugins when
// they occur higher in the stacking order.
void GetPluginOcclusions(Element* element,
- FrameViewBase* parent,
+ FrameView* parent,
const IntRect& frame_rect,
Vector<IntRect>& occlusions) {
LayoutObject* plugin_node = element->GetLayoutObject();
@@ -165,20 +165,12 @@ void GetPluginOcclusions(Element* element,
Vector<const LayoutObject*> iframe_zstack;
GetObjectStack(plugin_node, &plugin_zstack);
- if (!parent->IsFrameView())
- return;
-
- FrameView* parent_frame_view = ToFrameView(parent);
-
// Occlusions by iframes.
- const FrameView::ChildrenSet* children = parent_frame_view->Children();
- for (FrameView::ChildrenSet::const_iterator it = children->begin();
- it != children->end(); ++it) {
- // We only care about FrameView's because iframes show up as FrameViews.
- if (!(*it)->IsFrameView())
+ for (const auto& child : parent->Children()) {
+ if (!child->IsFrameView())
continue;
- const FrameView* frame_view = ToFrameView(it->Get());
+ const FrameView* frame_view = ToFrameView(child);
// Check to make sure we can get both the element and the LayoutObject
// for this FrameView, if we can't just move on to the next object.
// FIXME: Plugin occlusion by remote frames is probably broken.
@@ -202,7 +194,7 @@ void GetPluginOcclusions(Element* element,
// iframe. And a plugin inside an iframe in the top layer won't be respected
// as being in the top layer.
const Element* ancestor = TopLayerAncestor(element);
- Document* document = parent_frame_view->GetFrame().GetDocument();
+ Document* document = parent->GetFrame().GetDocument();
const HeapVector<Member<Element>>& elements = document->TopLayerElements();
size_t start = ancestor ? elements.Find(ancestor) + 1 : 0;
for (size_t i = start; i < elements.size(); ++i)

Powered by Google App Engine
This is Rietveld 408576698