Index: content/browser/web_contents/web_contents_view_aura.cc |
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc |
index 772d2afea3cf78f5ac661eedfca3c43a4cc0bddb..3267145cdfa38b5eb927234f57a320de82f8ea8f 100644 |
--- a/content/browser/web_contents/web_contents_view_aura.cc |
+++ b/content/browser/web_contents/web_contents_view_aura.cc |
@@ -558,6 +558,12 @@ class WebContentsViewAura::WindowObserver |
aura::Window* parent) OVERRIDE { |
if (window != view_->window_) |
return; |
+ |
+ // Since all native views are hosted inside a clipping window, the actual |
+ // parent that we care about is the clipping window's parent. |
+ if (parent) |
sky
2014/06/16 17:11:03
That a different parent exists is an implementatio
calamity
2014/06/17 05:01:12
Since this operates at the window level, I don't t
sky
2014/06/17 16:25:25
Neither of these options work since this code shou
|
+ parent = parent->parent(); |
+ |
if (parent_) |
parent_->RemoveObserver(this); |
@@ -673,7 +679,7 @@ class WebContentsViewAura::WindowObserver |
if (parent_) { |
const aura::Window::Windows& children = parent_->children(); |
for (size_t i = 0; i < children.size(); ++i) { |
- if (children[i] != view_->window_ && |
+ if (children[i] != view_->window_->parent() && |
children[i] != exclude && |
children[i]->IsVisible()) { |
constrained_windows.push_back(children[i]->GetBoundsInRootWindow()); |