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

Issue 1970563002: Compute snap offsets according to CSS Scroll Snap Spec Level 1 (Closed)

Created:
4 years, 7 months ago by majidvp
Modified:
4 years, 5 months ago
Reviewers:
skobes
CC:
chromium-reviews, kenneth.christiansen, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, blink-reviews-style_chromium.org, zoltan1, blink-reviews-layout_chromium.org, sof, eae+blinkwatch, leviw+renderwatch, blink-reviews-dom_chromium.org, dglazkov+blink, jchaffraix+rendering, blink-reviews, kinuko+watch, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Compute snap offsets according to CSS Scroll Snap Spec Level 1 Add logic to compute snap offsets (those defined on snap container and snap areas) according to the published spec [1]. SnapCoordinator maintains the mapping between snap containers and the snap areas. This mapping is stored in |LayoutBoxRareData| and updated on style change, attach, and detach events via hooks in |LayoutBox::styleWillChange| , |LayoutBox::insertedIntoTree| and |LayoutBox::willBeDestoryed|. This implementation is the naive approach as described in [2]. It does not attempt to track which snap areas have moved in relation to their container to minimize snap offsets re-computation. It simply re-computes all snap points every time they are needed. At the moment the computed snap offsets are not used for anything except to pass the tests. In future, |SnapCoordinator| will compute them as part of the document lifecycle and send necessary updates to the Compositor Worker instance which is going to be responsible for snapping during scrolls. [1] https://www.w3.org/TR/2015/WD-css-snappoints-1-20150326/ [2] https://docs.google.com/document/d/1BO0EgcMe3DTsO1uwM_psZeJ_Gz5OZR-oYrpJBKAJLoU/edit?pli=1 This is a re-land of https://crrev.com/1188563005 BUG= TBR=eae@chromium.org Committed: https://crrev.com/eff6c4c5699d35bc5703d706324c4c1c8b9ac19b Cr-Commit-Position: refs/heads/master@{#392993}

Patch Set 1 #

Patch Set 2 : Fix {client,scroll}Size to handle overlay scrollbar case on Android #

Total comments: 1

Patch Set 3 : size_t -> unsigned #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+769 lines, -7 lines) Patch
M third_party/WebKit/Source/core/core.gypi View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 3 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 6 chunks +18 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.h View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.h View 1 2 3 6 chunks +29 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 6 chunks +83 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.h View 1 chunk +58 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp View 1 chunk +171 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp View 1 2 1 chunk +388 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/LengthFunctions.h View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/LengthFunctions.cpp View 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (12 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1970563002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1970563002/20001
4 years, 7 months ago (2016-05-10 21:21:38 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/3321) ios-device-gn on ...
4 years, 7 months ago (2016-05-10 21:24:38 UTC) #5
majidvp
skobes@: This is a reland of crrev.com/1188563005/. The original CL was reverted due to issues ...
4 years, 7 months ago (2016-05-10 21:25:29 UTC) #7
skobes
lgtm w/ nit https://codereview.chromium.org/1970563002/diff/20001/third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp File third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp (right): https://codereview.chromium.org/1970563002/diff/20001/third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp#newcode134 third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp:134: size_t expectedHorizontalSnapOffsets = snapContainer().scrollWidth() - snapContainer().clientWidth(); ...
4 years, 7 months ago (2016-05-10 21:53:45 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1970563002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1970563002/80001
4 years, 7 months ago (2016-05-11 16:25:03 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-11 17:45:33 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1970563002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1970563002/80001
4 years, 7 months ago (2016-05-11 18:09:44 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 7 months ago (2016-05-11 18:15:31 UTC) #19
commit-bot: I haz the power
4 years, 7 months ago (2016-05-11 18:16:43 UTC) #21
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/eff6c4c5699d35bc5703d706324c4c1c8b9ac19b
Cr-Commit-Position: refs/heads/master@{#392993}

Powered by Google App Engine
This is Rietveld 408576698