New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 778228 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

RenderWidgetHostView::GetLastScrollOffset() returns inconsistent values on HiDPI screens

Project Member Reported by msimoni...@opera.com, Oct 25 2017

Issue description

Chrome Version: 64.0.3243.0
OS: Win/OSX

What steps will reproduce the problem?

Call GetLastScrollOffset() on HiDPI screens on a Mac and a Windows computer. The returned values are different for the same scroll amount.

What is the expected result?

GetLastScrollOffset() should return either screen on view coordinates consistently across all implementations.


GetLastScrollOffset() returns the scroll offset either in screen coordinates or in view coordinates on HiDPI screens. It depends on whether IsUseZoomForDSFEnabled() is true or not and this differs by platform. The caller of GetLastScrollOffset() (in cross-platform code) doesn't know which units are used so it cannot convert the values itself.

I think RenderWidgetHostViewAura::SubmitCompositorFrame() should convert the last scroll offset value to view coordinates although maybe a different fix is better.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/41478570e45309fce0ba795c1921ee8769dcdb7e

commit 41478570e45309fce0ba795c1921ee8769dcdb7e
Author: Marcin Simonides <msimonides@opera.com>
Date: Mon Oct 30 18:43:26 2017

Express the last scroll offset in DIPs.

The RWHVAura::GetLastScrollOffset() method should return values in view
coordinates (device independent pixels) as do other implementations of
RWHV.

When zoom-for-DSF is enabled the coordinates from compositor are
expressed in pixel coordinates which are different from view coordinates
on HiDPI screens.  Therefore the last_scroll_offset_ value needs to be
scaled to view coordinates

BUG:  778228 
Change-Id: Ic8da1fdbf821d0073fb2a22a75ecbc40441ce00e
Reviewed-on: https://chromium-review.googlesource.com/610148
Commit-Queue: David Bokan <bokan@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512549}
[modify] https://crrev.com/41478570e45309fce0ba795c1921ee8769dcdb7e/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/41478570e45309fce0ba795c1921ee8769dcdb7e/content/browser/renderer_host/render_widget_host_view_browsertest.cc

Comment 2 by sadrul@chromium.org, Jan 10 2018

Owner: msimoni...@opera.com
Status: Fixed (was: Untriaged)
This is fixed, right?
Yes, fixed, thanks for setting the status.

Sign in to add a comment