Commit 6f381e25 authored by calamity@chromium.org's avatar calamity@chromium.org

Fix DCHECK with force-device-scale-factor switch enabled.

This CL fixes a DCHECK happening due to r284913. The CL changed the order
of window addition which caused window properties to update in a different
order. This is fixed by only running the DCHECKed code after the window
is parented beneath a root window.

BUG=396911

Review URL: https://codereview.chromium.org/417923003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285833 0039d316-1c4b-4281-b951-d872f2087c98
parent 13ba44ab
......@@ -1620,7 +1620,7 @@ void RenderWidgetHostViewAura::OnPaint(gfx::Canvas* canvas) {
void RenderWidgetHostViewAura::OnDeviceScaleFactorChanged(
float device_scale_factor) {
if (!host_)
if (!host_ || !window_->GetRootWindow())
return;
UpdateScreenInfo(window_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment