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

Issue 2932593004: Update the snap points css properties (Closed)

Created:
3 years, 6 months ago by sunyunjia
Modified:
3 years, 5 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-frames_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, jchaffraix+rendering, kenneth.christiansen, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rwlbuis, sof, szager+layoutwatch_chromium.org, zoltan1, Bugs Nash
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

This patch replaces the snap points css properties for the old spec and add the properties for the new spec (https://www.w3.org/TR/css-scroll-snap-1/). We also remove the unit_tests that rely on the old spec. Properties that are removed: scroll-snap-points-x, scroll-snap-points-y, scroll-snap-destination, scroll-snap-coordinate Properties that are updated: scroll-snap-type Properties that are added: scroll-snap-align, scroll-snap-stop, scroll-padding, scroll-padding-top, scroll-padding-right, scroll-padding-bottom,scroll-padding-left, scroll-padding-inline, scroll-padding-inline-start, scroll-padding-inline-end, scroll-padding-block, scroll-padding-block-start, scroll-padding-block-end, scroll-snap-margin, scroll-snap-margin-top, scroll-snap-margin-right, scroll-snap-margin-bottom, scroll-snap-margin-left, scroll-snap-margin-inline, scroll-snap-margin-inline-start, scroll-snap-margin-inline-end, scroll-snap-margin-block, scroll-snap-margin-block-start, scroll-snap-margin-block-end BUG=724912 Review-Url: https://codereview.chromium.org/2932593004 Cr-Commit-Position: refs/heads/master@{#479738} Committed: https://chromium.googlesource.com/chromium/src/+/8a809d14cccfd32e74cacbe33e7249eaa4fea4ad

Patch Set 1 : First patch #

Patch Set 2 : Update the flags. #

Patch Set 3 : Add CSS Attributes #

Total comments: 18

Patch Set 4 : Delete the declaration in tests because it's runtimeenabled feature #

Patch Set 5 : rebase #

Total comments: 12

Patch Set 6 : update some tests #

Total comments: 8

Patch Set 7 : rebase #

Patch Set 8 : Fixed the comments #

Patch Set 9 : Rebase and Add QuadLengthValue.h #

Total comments: 2

Patch Set 10 : Fix nits #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1156 lines, -801 lines) Patch
M third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-listing-expected.txt View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/css/scroll-snap-parsing.html View 1 chunk +0 lines, -83 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/css/scroll-snap-parsing-expected.txt View 1 chunk +0 lines, -126 lines 0 comments Download
M third_party/WebKit/LayoutTests/svg/css/getComputedStyle-listing-expected.txt View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/css-properties-as-js-properties-expected.txt View 4 5 1 chunk +24 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h View 1 2 3 4 5 6 7 8 9 1 chunk +88 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSProperties.json5 View 1 2 3 4 5 6 7 8 9 2 chunks +212 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSProperty.cpp View 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSValueKeywords.json5 View 2 chunks +19 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 3 4 5 6 7 8 4 chunks +106 lines, -42 lines 0 comments Download
M third_party/WebKit/Source/core/css/StylePropertySerializer.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/StylePropertySerializer.cpp View 1 2 3 4 5 6 7 8 2 chunks +38 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp View 3 chunks +19 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 1 2 3 4 5 6 7 8 9 5 chunks +29 lines, -25 lines 0 comments Download
A third_party/WebKit/Source/core/css/properties/CSSPropertyAPIScrollPadding.cpp View 1 chunk +21 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/css/properties/CSSPropertyAPIScrollSnapAlign.cpp View 1 chunk +34 lines, -0 lines 0 comments Download
D third_party/WebKit/Source/core/css/properties/CSSPropertyAPIScrollSnapCoordinate.cpp View 1 chunk +0 lines, -41 lines 0 comments Download
A third_party/WebKit/Source/core/css/properties/CSSPropertyAPIScrollSnapMargin.cpp View 1 chunk +21 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/css/properties/CSSPropertyAPIScrollSnapType.cpp View 1 2 3 4 5 6 7 1 chunk +34 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h View 1 chunk +2 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +32 lines, -30 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.cpp View 3 chunks +53 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 4 7 8 1 chunk +9 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.h View 3 chunks +3 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp View 1 2 3 4 5 6 7 3 chunks +5 lines, -87 lines 0 comments Download
M third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp View 1 2 3 4 5 6 7 12 chunks +47 lines, -181 lines 0 comments Download
M third_party/WebKit/Source/core/style/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 4 5 6 7 8 9 1 chunk +170 lines, -37 lines 1 comment Download
M third_party/WebKit/Source/core/style/ComputedStyleConstants.h View 1 2 3 4 5 6 7 8 9 1 chunk +15 lines, -4 lines 0 comments Download
A third_party/WebKit/Source/core/style/QuadLengthValue.h View 1 2 3 4 5 6 7 8 9 1 chunk +44 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ScrollSnapPoints.h View 1 chunk +0 lines, -35 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleScrollSnapData.h View 1 2 3 4 5 6 7 3 chunks +58 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleScrollSnapData.cpp View 1 2 3 1 chunk +10 lines, -10 lines 0 comments Download
M tools/metrics/histograms/enums.xml View 1 2 3 4 5 6 7 8 9 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 102 (88 generated)
sunyunjia
Hi David, Here is the patch that updates the css properties of snap points. I'm ...
3 years, 6 months ago (2017-06-11 00:37:03 UTC) #43
bokan
I took a look, seems reasonable to me but I don't know the style and ...
3 years, 6 months ago (2017-06-13 01:30:20 UTC) #53
sunyunjia
PTAL, thanks! https://codereview.chromium.org/2932593004/diff/140001/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp File third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp (right): https://codereview.chromium.org/2932593004/diff/140001/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp#newcode177 third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp:177: CSSPropertyCaretColor, CSSPropertyScrollSnapType, On 2017/06/13 01:30:20, bokan wrote: ...
3 years, 6 months ago (2017-06-13 17:44:59 UTC) #64
bokan
Thanks, lgtm but as I mentioned, I'm not authoritative in this code so you'll need ...
3 years, 6 months ago (2017-06-13 17:55:39 UTC) #65
majidvp
Please list the properties your are adding in this patch and also list properties you ...
3 years, 6 months ago (2017-06-13 19:20:54 UTC) #66
majidvp
https://codereview.chromium.org/2932593004/diff/180001/third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp File third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp (right): https://codereview.chromium.org/2932593004/diff/180001/third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp#newcode39 third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp:39: " scroll-snap-type: both mandatory" nit: missing semicolon
3 years, 6 months ago (2017-06-13 19:27:35 UTC) #67
meade_UTC10
This lgtm from my end, but I'm also adding shend to have a look since ...
3 years, 6 months ago (2017-06-14 01:24:15 UTC) #75
shend
lgtm with a comment. https://codereview.chromium.org/2932593004/diff/200001/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h File third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h (right): https://codereview.chromium.org/2932593004/diff/200001/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h#newcode2798 third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h:2798: template <> (*) You may ...
3 years, 6 months ago (2017-06-14 01:37:38 UTC) #76
sunyunjia
Hi majid@, I've updated the patch according to the comments. PTAL, thanks! https://codereview.chromium.org/2932593004/diff/180001/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp File third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp ...
3 years, 6 months ago (2017-06-14 18:36:22 UTC) #84
meade_UTC10
I realised also that bugsnash@ will be interested in css/parser and co
3 years, 6 months ago (2017-06-15 04:07:29 UTC) #88
majidvp
lgtm with nits. https://codereview.chromium.org/2932593004/diff/260001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp (right): https://codereview.chromium.org/2932593004/diff/260001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp#newcode1259 third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp:1259: } else { nit: my preference ...
3 years, 6 months ago (2017-06-15 13:57:12 UTC) #90
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2932593004/220002
3 years, 6 months ago (2017-06-15 16:45:50 UTC) #97
commit-bot: I haz the power
Committed patchset #10 (id:220002) as https://chromium.googlesource.com/chromium/src/+/8a809d14cccfd32e74cacbe33e7249eaa4fea4ad
3 years, 6 months ago (2017-06-15 16:52:30 UTC) #100
Xianzhu
3 years, 5 months ago (2017-06-30 20:02:16 UTC) #102
Message was sent while issue was closed.
https://codereview.chromium.org/2932593004/diff/220002/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/style/ComputedStyle.h (right):

https://codereview.chromium.org/2932593004/diff/220002/third_party/WebKit/Sou...
third_party/WebKit/Source/core/style/ComputedStyle.h:1363: const Length&
ScrollPaddingBlockStart() const {
Why isn't this the same as other mappings between Top/Left/Bottom/Left and
InlineStart/InlineEnd/BlockStart/BlockEnd like
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/text/...

Can we use the PhysicalToLogical template (shown in the above link) here?

Powered by Google App Engine
This is Rietveld 408576698