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

Issue 2888283006: CSS: Use count position values with 3 parts (Closed)

Created:
3 years, 7 months ago by Eric Willigers
Modified:
3 years, 7 months ago
CC:
darktears, apavlov+blink_chromium.org, asvitkine+watch_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-frames_chromium.org, chromium-reviews, dglazkov+blink, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

CSS: Use count position values with 3 parts The CSS Working Group recently changed the grammar of <position> such that 3-value syntax is no longer supported. https://lists.w3.org/Archives/Public/www-style/2017Mar/0054.html We update parsing logic so that the following now use count three value positions, in preparation for future deprecation and removal discussions: object-position https://drafts.csswg.org/css-images-3/#the-object-position perspective-origin https://drafts.csswg.org/css-transforms-2/#perspective-origin-property scroll-snap-coordinate (not shipped, not in current spec) https://www.w3.org/TR/2015/WD-css-snappoints-1-20150326/#scroll-snap-coordinate scroll-snap-destination (not shipped, not in current spec) https://www.w3.org/TR/2015/WD-css-snappoints-1-20150326/#scroll-snap-destination center position for circle and ellipse basic shapes https://drafts.csswg.org/css-shapes/#supported-basic-shapes (used in https://www.w3.org/TR/css-shapes-1/#shape-outside-property and https://drafts.fxtf.org/css-masking-1/#the-clip-path and https://drafts.fxtf.org/motion-1/#offset-path-property ) position for radial and (not shipped) conic gradients https://drafts.csswg.org/css-images-3/#radial-gradients https://drafts.csswg.org/css-images-4/#conic-gradients (used in https://drafts.csswg.org/css-backgrounds-3/#the-background-image ) The following no longer accept three value positions: offset-anchor (property not yet shipped, expecting to ship soon) https://drafts.fxtf.org/motion-1/#offset-anchor-property offset-position (property not yet shipped, expecting to ship soon) https://drafts.fxtf.org/motion-1/#offset-position-property The following are not affected: background-position https://drafts.csswg.org/css-backgrounds-3/#background-position (continues to support three values) transform-origin https://drafts.csswg.org/css-transforms/#transform-origin-property (has never used <position>, instead defines its own grammar) BUG=717833 Review-Url: https://codereview.chromium.org/2888283006 Cr-Commit-Position: refs/heads/master@{#474358} Committed: https://chromium.googlesource.com/chromium/src/+/a951d7b5e8647b077be37f420254b73063a30b4c

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : distinct use counters #

Total comments: 4

Patch Set 4 : rebase, add use counter for backgroud-position #

Patch Set 5 : use count in the property APIs #

Total comments: 5

Patch Set 6 : use counter feature as argument #

Total comments: 2

Patch Set 7 : two color-stop for conic-gradient example #

Total comments: 10

Patch Set 8 : kDisallowThreeValuedPosition #

Patch Set 9 : rebase #

Total comments: 2

Patch Set 10 : extra argument #

Total comments: 4

Patch Set 11 : rebase #

Total comments: 1

Patch Set 12 : optional #

Patch Set 13 : rebase #

Patch Set 14 : CSSPropertyAPIScrollSnapCoordinate #

Patch Set 15 : rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+391 lines, -49 lines) Patch
M third_party/WebKit/LayoutTests/css3/motion-path/offset-position.html View 2 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/scroll-snap-parsing.html View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/scroll-snap-parsing-expected.txt View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-background.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +27 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-background-position.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +38 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-basic-shape-circle.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +38 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-basic-shape-ellipse.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +27 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +27 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-object-position.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +38 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-perspective-origin.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +38 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-radial-gradient.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +38 lines, -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 10 11 3 chunks +11 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +9 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp View 1 2 3 4 5 6 7 8 9 10 11 13 chunks +45 lines, -22 lines 1 comment Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIOffsetAnchor.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIOffsetPosition.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIScrollSnapCoordinate.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +10 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyShapeUtils.cpp View 1 2 3 4 5 10 11 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -0 lines 0 comments Download
M tools/metrics/histograms/enums.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 99 (61 generated)
Eric Willigers
There are currently few parsing tests for offset-position and offset-anchor. More will be added with ...
3 years, 7 months ago (2017-05-19 07:20:24 UTC) #10
Bugs Nash
https://codereview.chromium.org/2888283006/diff/40001/third_party/WebKit/LayoutTests/css3/motion-path/offset-position.html File third_party/WebKit/LayoutTests/css3/motion-path/offset-position.html (right): https://codereview.chromium.org/2888283006/diff/40001/third_party/WebKit/LayoutTests/css3/motion-path/offset-position.html#newcode50 third_party/WebKit/LayoutTests/css3/motion-path/offset-position.html:50: }, 'offset-position may not use three values'); The CL ...
3 years, 7 months ago (2017-05-22 01:12:56 UTC) #14
Eric Willigers
https://codereview.chromium.org/2888283006/diff/40001/third_party/WebKit/LayoutTests/css3/motion-path/offset-position.html File third_party/WebKit/LayoutTests/css3/motion-path/offset-position.html (right): https://codereview.chromium.org/2888283006/diff/40001/third_party/WebKit/LayoutTests/css3/motion-path/offset-position.html#newcode50 third_party/WebKit/LayoutTests/css3/motion-path/offset-position.html:50: }, 'offset-position may not use three values'); On 2017/05/22 ...
3 years, 7 months ago (2017-05-22 03:52:06 UTC) #21
Bugs Nash
On 2017/05/22 at 03:52:06, ericwilligers wrote: > https://codereview.chromium.org/2888283006/diff/40001/third_party/WebKit/LayoutTests/css3/motion-path/offset-position.html > File third_party/WebKit/LayoutTests/css3/motion-path/offset-position.html (right): > > https://codereview.chromium.org/2888283006/diff/40001/third_party/WebKit/LayoutTests/css3/motion-path/offset-position.html#newcode50 ...
3 years, 7 months ago (2017-05-22 04:35:50 UTC) #22
Bugs Nash
https://codereview.chromium.org/2888283006/diff/100001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp (right): https://codereview.chromium.org/2888283006/diff/100001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp#newcode720 third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp:720: const CSSParserContext& context, this can remain as just the ...
3 years, 7 months ago (2017-05-22 04:36:10 UTC) #23
Bugs Nash
On 2017/05/22 at 04:36:10, Bugs Nash wrote: > https://codereview.chromium.org/2888283006/diff/100001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp > File third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp (right): > > ...
3 years, 7 months ago (2017-05-22 04:41:30 UTC) #24
Eric Willigers
https://codereview.chromium.org/2888283006/diff/100001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h File third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h (right): https://codereview.chromium.org/2888283006/diff/100001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h#newcode43 third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h:43: kCountThreeValues On 2017/05/22 04:36:10, Bugs Nash wrote: > the ...
3 years, 7 months ago (2017-05-22 06:08:36 UTC) #25
Yiorsi
https://codereview.chromium.org/2888283006/diff/120001/third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html File third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html (right): https://codereview.chromium.org/2888283006/diff/120001/third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html#newcode19 third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html:19: div.style = 'background-image: conic-gradient(at left 10% top, black);'; conic-gradient ...
3 years, 7 months ago (2017-05-22 07:15:19 UTC) #29
Eric Willigers
https://codereview.chromium.org/2888283006/diff/120001/third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html File third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html (right): https://codereview.chromium.org/2888283006/diff/120001/third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html#newcode19 third_party/WebKit/LayoutTests/fast/css/usecounter-position3value-conic-gradient.html:19: div.style = 'background-image: conic-gradient(at left 10% top, black);'; On ...
3 years, 7 months ago (2017-05-22 07:27:07 UTC) #31
Bugs Nash
yeahya! i like this version a lot more. lgtm with nits https://codereview.chromium.org/2888283006/diff/140001/third_party/WebKit/LayoutTests/fast/css/scroll-snap-parsing.html File third_party/WebKit/LayoutTests/fast/css/scroll-snap-parsing.html (right): ...
3 years, 7 months ago (2017-05-22 23:07:09 UTC) #32
Eric Willigers
https://codereview.chromium.org/2888283006/diff/140001/third_party/WebKit/LayoutTests/fast/css/scroll-snap-parsing.html File third_party/WebKit/LayoutTests/fast/css/scroll-snap-parsing.html (right): https://codereview.chromium.org/2888283006/diff/140001/third_party/WebKit/LayoutTests/fast/css/scroll-snap-parsing.html#newcode48 third_party/WebKit/LayoutTests/fast/css/scroll-snap-parsing.html:48: <div class="test" property="scroll-snap-destination" style="scroll-snap-destination: left top 50%;" expected="0px 0px" ...
3 years, 7 months ago (2017-05-23 03:20:01 UTC) #33
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/2888283006/180001
3 years, 7 months ago (2017-05-23 04:42:11 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/444537)
3 years, 7 months ago (2017-05-23 04:51:30 UTC) #42
Eric Willigers
+meade for OWNERS
3 years, 7 months ago (2017-05-23 04:53:48 UTC) #44
Eric Willigers
https://codereview.chromium.org/2898133002 is similar.
3 years, 7 months ago (2017-05-23 08:30:21 UTC) #45
suzyh_UTC10 (ex-contributor)
I think you're using UseCounter::Feature for two different purposes here. I am worried that the ...
3 years, 7 months ago (2017-05-23 23:26:54 UTC) #47
Eric Willigers
https://codereview.chromium.org/2888283006/diff/180001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h File third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h (right): https://codereview.chromium.org/2888283006/diff/180001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h#newcode82 third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h:82: UseCounter::Feature::kNumberOfFeatures; On 2017/05/23 23:26:54, suzyh_UTC10 wrote: > I don't ...
3 years, 7 months ago (2017-05-24 01:27:17 UTC) #48
Bugs Nash
On 2017/05/24 at 01:27:17, ericwilligers wrote: > https://codereview.chromium.org/2888283006/diff/180001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h > File third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h (right): > > https://codereview.chromium.org/2888283006/diff/180001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h#newcode82 ...
3 years, 7 months ago (2017-05-24 04:04:52 UTC) #51
suzyh_UTC10 (ex-contributor)
Aha! OK, thanks for the explanation of how we got to this point. I think ...
3 years, 7 months ago (2017-05-24 04:24:18 UTC) #52
Eric Willigers
On 2017/05/24 04:24:18, suzyh_UTC10 wrote: > Aha! OK, thanks for the explanation of how we ...
3 years, 7 months ago (2017-05-24 04:42:04 UTC) #53
Eric Willigers
https://codereview.chromium.org/2888283006/diff/220001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/2888283006/diff/220001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode1657 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:1657: UseCounter::Feature::kNumberOfFeatures); On 2017/05/24 04:24:18, suzyh_UTC10 wrote: > I'm curious ...
3 years, 7 months ago (2017-05-24 04:44:48 UTC) #54
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/2888283006/220001
3 years, 7 months ago (2017-05-24 04:45:50 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/276267) android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, ...
3 years, 7 months ago (2017-05-24 04:49:48 UTC) #59
suzyh_UTC10 (ex-contributor)
On 2017/05/24 at 04:44:48, ericwilligers wrote: > https://codereview.chromium.org/2888283006/diff/220001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp > File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): > > https://codereview.chromium.org/2888283006/diff/220001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode1657 ...
3 years, 7 months ago (2017-05-24 04:53:36 UTC) #60
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/2888283006/240001
3 years, 7 months ago (2017-05-24 05:21:15 UTC) #63
Eric Willigers
> To clarify: I meant the inclusion of "::Feature" in the string. That is, the ...
3 years, 7 months ago (2017-05-24 05:23:47 UTC) #65
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/2888283006/250001
3 years, 7 months ago (2017-05-24 05:24:31 UTC) #69
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/445850)
3 years, 7 months ago (2017-05-24 05:35:32 UTC) #71
Eric Willigers
3 years, 7 months ago (2017-05-24 06:37:21 UTC) #73
alancutter (OOO until 2018)
https://codereview.chromium.org/2888283006/diff/250001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h File third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h (right): https://codereview.chromium.org/2888283006/diff/250001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h#newcode89 third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h:89: UseCounter::Feature threeValuePosition); How about accepting a UseCounter::Feature* to allow ...
3 years, 7 months ago (2017-05-24 06:55:12 UTC) #74
alancutter (OOO until 2018)
lgtm after changing the use counter enum to be wtf::Optional instead of using kNumberOfFeatures.
3 years, 7 months ago (2017-05-24 07:04:44 UTC) #75
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/2888283006/290001
3 years, 7 months ago (2017-05-24 11:39:57 UTC) #85
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/461609)
3 years, 7 months ago (2017-05-24 13:41:18 UTC) #87
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/2888283006/310001
3 years, 7 months ago (2017-05-24 16:20:54 UTC) #90
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/218018) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 7 months ago (2017-05-24 16:23:51 UTC) #92
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/2888283006/330001
3 years, 7 months ago (2017-05-24 16:30:20 UTC) #95
commit-bot: I haz the power
Committed patchset #15 (id:330001) as https://chromium.googlesource.com/chromium/src/+/a951d7b5e8647b077be37f420254b73063a30b4c
3 years, 7 months ago (2017-05-24 18:21:51 UTC) #98
Bugs Nash
3 years, 7 months ago (2017-05-24 21:44:34 UTC) #99
Message was sent while issue was closed.
https://codereview.chromium.org/2888283006/diff/330001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
(right):

https://codereview.chromium.org/2888283006/diff/330001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp:797:
WTF::Optional<UseCounter::Feature> threeValuePosition) {
I think this should have a comment such that if this argument is missing, then 3
values are not permitted. This could easily be misread as if this value is
missing then there is no use counting

Powered by Google App Engine
This is Rietveld 408576698