Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(825)

Issue 1356113002: Make window.scroll properties relative to the layout viewport. (Closed)

Created:
5 years, 3 months ago by ymalik
Modified:
5 years, 3 months ago
Reviewers:
bokan, Rick Byers
CC:
blink-reviews, dglazkov+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Make window.scroll properties relative to the layout viewport. window.scroll properties being relative to visual viewport breaks some pages under pinch-zoom. The original plan was to have all APIs reflect the layout viewport (and introduce new APIs for visual). This CL is an initial step towards that and the window.scroll properties will be relative to the layout viewport if the scrollLayoutViewport setting is used. Future CL will actually use this flag to test the implications of this change. BUG=489206

Patch Set 1 #

Total comments: 9

Patch Set 2 : Rename settings flag and improved tests #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -6 lines) Patch
A LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html View 1 1 chunk +83 lines, -0 lines 2 comments Download
A LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/frame/LocalDOMWindow.cpp View 1 8 chunks +23 lines, -6 lines 0 comments Download
M Source/core/frame/Settings.in View 1 1 chunk +4 lines, -0 lines 0 comments Download
M Source/web/WebSettingsImpl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/WebSettingsImpl.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M public/web/WebSettings.h View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
ymalik (do not use)
5 years, 3 months ago (2015-09-21 15:06:18 UTC) #3
bokan
https://codereview.chromium.org/1356113002/diff/1/LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html File LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html (right): https://codereview.chromium.org/1356113002/diff/1/LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html#newcode47 LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html:47: testFailed('This test requires window.internals'); should you return after this? ...
5 years, 3 months ago (2015-09-21 16:49:12 UTC) #4
ymalik (do not use)
Worked on review comments. https://codereview.chromium.org/1356113002/diff/1/LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html File LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html (right): https://codereview.chromium.org/1356113002/diff/1/LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html#newcode47 LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html:47: testFailed('This test requires window.internals'); On ...
5 years, 3 months ago (2015-09-21 20:35:50 UTC) #5
bokan
lgtm. +Rick for public/web OWNER https://codereview.chromium.org/1356113002/diff/1/LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html File LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html (right): https://codereview.chromium.org/1356113002/diff/1/LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html#newcode57 LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html:57: var visualInnerHeight = window.innerHeight; ...
5 years, 3 months ago (2015-09-21 20:59:57 UTC) #7
ymalik (do not use)
@rbyers gentle ping :)
5 years, 3 months ago (2015-09-23 20:19:17 UTC) #8
Rick Byers
sorry I missed the first mention public/ LGTM
5 years, 3 months ago (2015-09-24 00:00:24 UTC) #9
ymalik
5 years, 3 months ago (2015-09-24 00:17:42 UTC) #10
https://codereview.chromium.org/1356113002/diff/20001/LayoutTests/fast/scroll...
File
LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html
(right):

https://codereview.chromium.org/1356113002/diff/20001/LayoutTests/fast/scroll...
LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html:8:
overflow: hidden;
On 2015/09/21 20:59:57, bokan wrote:
> I typically use CSS to give the scrollbar no width/height without affecting
> scrollability, see keyboard-scroll-page-scale.html
> 
> If this works in this case its fine too though

Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698