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

Issue 634424 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
(currently inactive on Chromium)
Closed: Aug 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 1
Type: Bug

Blocking:
issue 595826



Sign in to add a comment

window.visualViewport.clientWidth|Height assumes scaled scrollbar

Project Member Reported by bokan@chromium.org, Aug 4 2016

Issue description

Version: 54.0.2817.0
OS: Windows

What steps will reproduce the problem?
(1) Enable visualViewport API through chrome://flags/#enable-experimental-web-platform-features
(2) Visit bokan.ca/polyfill/vvapi-fix.html
(3) Shrink the window so that the horizontal scrollbar appears
(3) Zoom in

What is the expected output?
The red bar should stay fixed just above the scrollbar

What do you see instead?
The red bar is offset from the scrollbar. The further you zoom in, the larger the offset. It seems that clientHeight incorrectly assumes the scrollbar is scaled with the page.

The problem is here: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/frame/VisualViewport.cpp?rcl=1470309818&l=255

We should be dividing the scrollbar Width/Height by the page scale factor since Page Scale Factor doesn't apply to it (i.e. as we zoom in, the scrollbar uses fewer and fewer CSS pixels).
 

Comment 3 by ymalik@chromium.org, Aug 10 2016

Status: Fixed (was: Assigned)

Sign in to add a comment