Commit d89c7a15 authored by bsep's avatar bsep Committed by Commit bot

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

Review-Url: https://codereview.chromium.org/2168313002
Cr-Commit-Position: refs/heads/master@{#407294}
parent 377a9762
......@@ -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(
......
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