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

Issue 2903413002: Restructure type tracking in StyleValues to work better with new numeric types (Closed)

Created:
3 years, 6 months ago by meade_UTC10
Modified:
3 years, 6 months ago
Reviewers:
nainar, shend
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Restructure type tracking in StyleValues to work better with new numeric types. The enum CSSStyleValue::StyleValueType is now used to track the "strong type" (https://drafts.css-houdini.org/css-typed-om/#cssnumericvalue-strong-type) of each style value. Reviewers, please add thoughts on putting "ContainsPercent" on CSSStyleValue. I couldn't think of a good way to express "CSSStyleValues can be <a non-percent type> *and* a percent at the same time (e.g. calc(3px + 2%)). However this is only used on CSSNumericValue subclasses. Additional notes: - User border-*-width for testing setting CSSUnitValues as lengths. - border-*-width was previously marked as supports_percent, but it actually does not (https://developer.mozilla.org/en/docs/Web/CSS/border-bottom-width) - There is now a list of valid values for typedom_types in CSSProperties.json5 - supports_percentage is now implied by including "Percent" in typedom_types BUG=545318 Review-Url: https://codereview.chromium.org/2903413002 Cr-Commit-Position: refs/heads/master@{#476929} Committed: https://chromium.googlesource.com/chromium/src/+/ee27a36a85422f591853031122a77a5d01ecc68d

Patch Set 1 #

Patch Set 2 : Add an extra test for non-percentage tests, and make error message better #

Patch Set 3 : rebase #

Total comments: 11

Patch Set 4 : CL comments #

Patch Set 5 : Don't fail DCHECKs #

Patch Set 6 : rebase #

Total comments: 6

Patch Set 7 : rebase and update LayoutTests after landing #

Patch Set 8 : Remove spurious file #

Patch Set 9 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -164 lines) Patch
M third_party/WebKit/LayoutTests/typedcssom/cssPerspective.html View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/cssPerspective-expected.txt View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/typedcssom/cssTranslation-expected.txt View 1 2 3 4 1 chunk +0 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/border-bottom-width.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/border-bottom-width-expected.txt View 1 3 chunks +18 lines, -17 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/border-left-width.html View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/border-left-width-expected.txt View 1 3 chunks +18 lines, -17 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/border-right-width.html View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/border-right-width-expected.txt View 1 3 chunks +18 lines, -17 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/border-top-width.html View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/border-top-width-expected.txt View 1 3 chunks +18 lines, -17 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/bottom-expected.txt View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/config-templates.js View 1 2 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/height-expected.txt View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/left-expected.txt View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/property-suite.js View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/right-expected.txt View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/top-expected.txt View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/transform-expected.txt View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/width-expected.txt View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/typedcssom/inlinestyle/transform-perspective-expected.txt View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/make_css_property_metadata.py View 1 chunk +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/build/scripts/make_cssom_types.py View 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl View 1 chunk +7 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSProperties.json5 View 1 2 3 4 5 6 7 8 11 chunks +19 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSNumericValue.h View 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSPerspective.cpp View 1 2 3 4 1 chunk +7 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSResourceValueTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSStyleImageValueTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSStyleValue.h View 1 2 3 4 5 2 chunks +15 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSStyleValue.cpp View 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSUnitValue.h View 1 2 3 4 5 6 1 chunk +14 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSUnitValue.cpp View 1 2 3 4 5 6 1 chunk +14 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSUnitValue.idl View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSUnsupportedStyleValue.h View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 28 (17 generated)
meade_UTC10
Hi Darren! Here's a fun one for you to do as first pass review. PTAL ...
3 years, 6 months ago (2017-05-26 06:48:37 UTC) #4
shend
lgtm after bots pass :) https://codereview.chromium.org/2903413002/diff/40001/third_party/WebKit/Source/build/scripts/make_css_property_metadata.py File third_party/WebKit/Source/build/scripts/make_css_property_metadata.py (right): https://codereview.chromium.org/2903413002/diff/40001/third_party/WebKit/Source/build/scripts/make_css_property_metadata.py#newcode23 third_party/WebKit/Source/build/scripts/make_css_property_metadata.py:23: self.generate_css_property_metadata_cpp nit: I think ...
3 years, 6 months ago (2017-05-29 23:42:08 UTC) #5
meade_UTC10
https://codereview.chromium.org/2903413002/diff/40001/third_party/WebKit/Source/build/scripts/make_css_property_metadata.py File third_party/WebKit/Source/build/scripts/make_css_property_metadata.py (right): https://codereview.chromium.org/2903413002/diff/40001/third_party/WebKit/Source/build/scripts/make_css_property_metadata.py#newcode23 third_party/WebKit/Source/build/scripts/make_css_property_metadata.py:23: self.generate_css_property_metadata_cpp On 2017/05/29 23:42:08, shend wrote: > nit: I ...
3 years, 6 months ago (2017-05-30 04:11:05 UTC) #6
meade_UTC10
+nainar to sanity check also, thanks shend and nainar!
3 years, 6 months ago (2017-05-30 07:08:57 UTC) #8
nainar
meade@, Please split this up into 2 CLs. https://codereview.chromium.org/2903413002/diff/100001/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.h File third_party/WebKit/Source/core/css/cssom/CSSStyleValue.h (right): https://codereview.chromium.org/2903413002/diff/100001/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.h#newcode52 third_party/WebKit/Source/core/css/cssom/CSSStyleValue.h:52: virtual ...
3 years, 6 months ago (2017-05-30 08:19:18 UTC) #11
meade_UTC10
I split out a really little one in https://codereview.chromium.org/2921663004/ if that's what you mean. https://codereview.chromium.org/2903413002/diff/100001/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.h ...
3 years, 6 months ago (2017-06-02 04:43:38 UTC) #14
meade_UTC10
On 2017/06/02 04:43:38, meade_UTC10 wrote: > I split out a really little one in https://codereview.chromium.org/2921663004/ ...
3 years, 6 months ago (2017-06-02 04:48:32 UTC) #15
nainar
yup lgtm
3 years, 6 months ago (2017-06-02 06:01:40 UTC) #20
commit-bot: I haz the power
This CL has an open dependency (Issue 2919943002 Patch 1). Please resolve the dependency and ...
3 years, 6 months ago (2017-06-02 06:01:59 UTC) #22
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/2903413002/160001
3 years, 6 months ago (2017-06-05 01:28:06 UTC) #25
commit-bot: I haz the power
3 years, 6 months ago (2017-06-05 03:04:11 UTC) #28
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/ee27a36a85422f591853031122a7...

Powered by Google App Engine
This is Rietveld 408576698