Commit 1c78b385 authored by Bret Sepulveda's avatar Bret Sepulveda

Fix the mobile emulator to use the correct device scale when disabled.

The mobile emulator was triggering a layout before it had reapplied the
original viewport parameters when it was being disabled, which with
use-zoom-for-dsf enabled was causing the wrong viewport size to be given
to various components, like plugins and scrollbars.

BUG=628501,628185
R=dgozman@chromium.org

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

Committed: https://crrev.com/d89c7a1578f9f16f6e1fa4375aab232b67fe0f9f
Cr-Original-Commit-Position: refs/heads/master@{#407294}
Cr-Commit-Position: refs/heads/master@{#407639}
parent 471d1f11
......@@ -25,10 +25,10 @@ RenderWidgetScreenMetricsEmulator::RenderWidgetScreenMetricsEmulator(
}
RenderWidgetScreenMetricsEmulator::~RenderWidgetScreenMetricsEmulator() {
delegate_->Resize(original_resize_params_);
delegate_->SetScreenMetricsEmulationParameters(false, emulation_params_);
delegate_->SetScreenRects(original_view_screen_rect_,
original_window_screen_rect_);
delegate_->Resize(original_resize_params_);
}
void RenderWidgetScreenMetricsEmulator::ChangeEmulationParams(
......
......@@ -2,6 +2,7 @@ CONSOLE MESSAGE: line 25: angle: 0; type: portrait-primary
CONSOLE MESSAGE: line 25: angle: 180; type: portrait-secondary
CONSOLE MESSAGE: line 25: angle: 90; type: landscape-primary
CONSOLE MESSAGE: line 25: angle: 270; type: landscape-secondary
CONSOLE MESSAGE: line 25: angle: 0; type: landscape-primary
Running: initial
......
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