window.visualViewport.clientWidth|Height assumes scaled scrollbar |
||
Issue descriptionVersion: 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).
,
Aug 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/78db10b48f946769c18992bf80c7b344da671c75 commit 78db10b48f946769c18992bf80c7b344da671c75 Author: ymalik <ymalik@chromium.org> Date: Mon Aug 08 17:14:30 2016 window.visualViewport.clientWidth|Height shouldn't assume scaled scrollbar BUG= 634424 Review-Url: https://codereview.chromium.org/2226663003 Cr-Commit-Position: refs/heads/master@{#410386} [modify] https://crrev.com/78db10b48f946769c18992bf80c7b344da671c75/third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-dimensions-exclude-custom-scrollbars.html [modify] https://crrev.com/78db10b48f946769c18992bf80c7b344da671c75/third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-dimensions-exclude-scrollbars.html [modify] https://crrev.com/78db10b48f946769c18992bf80c7b344da671c75/third_party/WebKit/Source/core/frame/VisualViewport.cpp
,
Aug 10 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Aug 8 2016