Commit 16039291 authored by Henrique Ferreiro's avatar Henrique Ferreiro Committed by Commit Bot

Fix WidgetBase::BlinkSpaceToFlooredDIPs

This method was introduced in https://crrev.com/c/2424066 but it missed
reversing the scale factor before scaling.

Bug: 1097816
Change-Id: I50231345b272028ba162dd4a69db6e0179a8612a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2444320
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813189}
parent 307d0cea
......@@ -1286,8 +1286,8 @@ gfx::Point WidgetBase::BlinkSpaceToFlooredDIPs(const gfx::Point& point) {
return point;
// TODO(danakj): Should this be GetScreenInfo() so it changes under emulation?
// TODO(dtapuska): Determine if this should be a floor vs rounded.
return gfx::ScaleToFlooredPoint(
point, client_->GetOriginalScreenInfo().device_scale_factor);
float reverse = 1 / client_->GetOriginalScreenInfo().device_scale_factor;
return gfx::ScaleToFlooredPoint(point, reverse);
}
gfx::Size WidgetBase::DIPsToCeiledBlinkSpace(const gfx::Size& size) {
......
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