| 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 b387a93f24d1fd8b3fec5623e95504fb286b0283..68e28b305701b2912c29cc1f56e1018a1799c0b0 100644
|
| --- a/content/browser/web_contents/web_contents_view_aura.cc
|
| +++ b/content/browser/web_contents/web_contents_view_aura.cc
|
| @@ -504,6 +504,21 @@
|
| #endif
|
| }
|
|
|
| + // Overridden from aura::WindowObserver:
|
| + void OnWindowHierarchyChanged(
|
| + const aura::WindowObserver::HierarchyChangeParams& params) override {
|
| + if (params.receiver != view_->window_.get() ||
|
| + !params.target->Contains(view_->window_.get())) {
|
| + return;
|
| + }
|
| +
|
| + // Use the new parent's root window for calculating HiDPI subpixel offset.
|
| + RenderWidgetHostViewAura* rwhv = ToRenderWidgetHostViewAura(
|
| + view_->web_contents_->GetRenderWidgetHostView());
|
| + if (rwhv)
|
| + rwhv->SnapToPhysicalPixelBoundary();
|
| + }
|
| +
|
| #if defined(OS_WIN)
|
| // Constrained windows are added as children of the parent's parent's view
|
| // which may overlap with windowed NPAPI plugins. In that case, tell the RWHV
|
|
|