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

Issue 2346193002: Split CSSPrimitiveValue into CSSPrimitiveValue and CSSIdentifierValue (Closed)

Created:
4 years, 3 months ago by sashab
Modified:
4 years, 2 months ago
CC:
aboxhall, darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, dmazzoni, krit, eae+blinkwatch, Eric Willigers, f(malita), fs, gyuyoung2, je_julie, kenneth.christiansen, kinuko+watch, kouhei+svg_chromium.org, nektarios, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, shans, sof, Yoav Weiss
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Split CSSPrimitiveValue into CSSPrimitiveValue and CSSIdentifierValue Split CSSPrimitiveValue into two subtypes, CSSPrimitiveValue (for numerical and calc values) and CSSIdentifierValue (for identifiers). This is part of a larger effort to split up CSSPrimitiveValue. This patch is meant to be entirely mechanical changes; if it passes all tests with no behaviour changes, it has been implemented correctly. The patch itself was mainly done with find-and-replaces to createKeyword() and convertTo<>(), then fixing any other errors, sucha as those resulting from irregular flow (e.g. if (!x.isPrimitiveValue) return; in CSSToStyleMap) or similar. The largest change has been to CSSPrimitiveValueMappings.h, since the convertTo<> method has been moved to CSSIdentifierValue. Also, a create(Length, zoom) method was added to CSSValue temporarily, and callers will later change to switch between which create method (CSSPrimitiveValue or CSSIdentifierValue) they wish to use. BUG=523893

Patch Set 1 #

Patch Set 2 : Replaced ASSERTs with DCHECKS in presubmit warnings #

Total comments: 14

Patch Set 3 : Rebase and review feedback #

Patch Set 4 : Rename #

Patch Set 5 : Small fixes #

Patch Set 6 : Fixed tests #

Total comments: 1

Patch Set 7 : Rebase #

Total comments: 6

Patch Set 8 : Review fedback #

Patch Set 9 : Rebase #

Patch Set 10 : Yet another rebase #

Total comments: 1

Patch Set 11 : Rebase please work #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2406 lines, -2414 lines) Patch
M third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl View 4 chunks +9 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/animation/BasicShapeInterpolationFunctions.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CSSBorderImageLengthBoxInterpolationType.cpp View 2 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp View 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp View 1 2 3 chunks +6 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CSSFilterListInterpolationType.cpp View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/animation/CSSFontSizeInterpolationType.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CSSFontWeightInterpolationType.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CSSImageListInterpolationType.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CSSImageSliceInterpolationType.cpp View 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp View 1 2 3 4 5 6 7 8 4 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CSSPathInterpolationType.cpp View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/animation/CSSPositionAxisListInterpolationType.cpp View 2 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CSSShadowListInterpolationType.cpp View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/animation/CSSTextIndentInterpolationType.cpp View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CSSVisibilityInterpolationType.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/animation/ShadowInterpolationFunctions.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/animation/SizeInterpolationFunctions.cpp View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/animation/animatable/AnimatableUnknown.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/animation/animatable/AnimatableUnknownTest.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelperTest.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp View 1 2 3 4 7 chunks +8 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/css/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/BasicShapeFunctions.cpp View 1 2 3 5 chunks +17 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSBasicShapeValues.h View 4 chunks +9 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp View 1 2 3 4 5 6 chunks +10 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSBorderImageSliceValue.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSCalculationValue.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSContentDistributionValue.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSCounterValue.h View 3 chunks +4 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSGradientValue.h View 1 2 3 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSGradientValue.cpp View 1 8 chunks +46 lines, -24 lines 0 comments Download
A third_party/WebKit/Source/core/css/CSSIdentifierValue.h View 1 2 3 1 chunk +62 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/css/CSSIdentifierValue.cpp View 1 2 3 1 chunk +88 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSMatrix.cpp View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSPrimitiveValue.h View 1 2 3 4 5 6 7 8 7 chunks +4 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp View 1 2 7 chunks +6 lines, -75 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h View 1 2 3 4 5 6 7 8 9 10 102 chunks +1000 lines, -1187 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSQuadValue.h View 4 chunks +10 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSReflectValue.h View 3 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSReflectValue.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSShadowValue.h View 4 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSShadowValue.cpp View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSValue.h View 3 4 5 6 7 8 3 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSValue.cpp View 1 7 chunks +35 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSValuePool.h View 3 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 3 4 5 6 7 8 103 chunks +343 lines, -343 lines 0 comments Download
M third_party/WebKit/Source/core/css/FontFace.cpp View 1 2 3 4 7 chunks +12 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/css/MediaQueryExp.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/StylePropertySerializer.cpp View 1 2 3 9 chunks +19 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/core/css/StylePropertySet.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/cssom/CSSKeywordValue.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserFastPathsTest.cpp View 2 chunks +4 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 1 2 3 4 5 6 74 chunks +138 lines, -132 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h View 1 2 3 4 5 6 3 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp View 1 2 3 4 5 6 11 chunks +47 lines, -42 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp View 1 2 3 4 5 21 chunks +61 lines, -59 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/FilterOperationResolver.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h View 1 2 3 chunks +24 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp View 1 2 3 4 34 chunks +108 lines, -116 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp View 1 2 3 4 5 6 18 chunks +90 lines, -87 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.cpp View 1 2 3 4 5 4 chunks +32 lines, -26 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/TextLinkColors.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/EditingStyle.cpp View 1 2 3 4 22 chunks +64 lines, -59 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp View 1 2 3 4 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/serializers/Serialization.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLTableElement.cpp View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGPathElement.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp View 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebAXObject.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 76 (42 generated)
sashab
Sorry this patch is so big :( Wanna discuss it in person?
4 years, 3 months ago (2016-09-19 06:20:53 UTC) #6
alancutter (OOO until 2018)
Yay. :D
4 years, 3 months ago (2016-09-19 06:33:45 UTC) #8
sashab
Renee for initial review.
4 years, 3 months ago (2016-09-20 01:42:30 UTC) #10
Timothy Loh
https://codereview.chromium.org/2346193002/diff/20001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/2346193002/diff/20001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode2788 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:2788: static bool isGridTrackFixedSizedInternal(const CSSValue& value) I'm not sure about ...
4 years, 3 months ago (2016-09-21 07:55:06 UTC) #11
rjwright
It would be good for CSSIdentifierValue to have a name that reflects that it's for ...
4 years, 3 months ago (2016-09-22 01:21:11 UTC) #12
rjwright
https://codereview.chromium.org/2346193002/diff/20001/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp File third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp (right): https://codereview.chromium.org/2346193002/diff/20001/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp#newcode84 third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp:84: const CSSIdentifierValue& ident = toCSSIdentifierValue(value); Avoid abbreviated variable names. ...
4 years, 3 months ago (2016-09-22 01:29:55 UTC) #13
rjwright
Check your newly-added TODOs and do the easy ones that don't make the CL too ...
4 years, 3 months ago (2016-09-22 06:12:50 UTC) #14
sashab
Thanks renee. Added class-level comments to CSSPrimitiveValue and CSSIdentifierValue, and CSSValue too, just explaining what ...
4 years, 3 months ago (2016-09-23 01:01:11 UTC) #15
rjwright
Great class comments. Fair call on the to-dos; just checking.
4 years, 3 months ago (2016-09-23 01:15:30 UTC) #16
Timothy Loh
https://codereview.chromium.org/2346193002/diff/20001/third_party/WebKit/Source/core/css/CSSIdentifierValue.h File third_party/WebKit/Source/core/css/CSSIdentifierValue.h (right): https://codereview.chromium.org/2346193002/diff/20001/third_party/WebKit/Source/core/css/CSSIdentifierValue.h#newcode16 third_party/WebKit/Source/core/css/CSSIdentifierValue.h:16: // TODO(sashab): Rename this to just create(). On 2016/09/23 ...
4 years, 3 months ago (2016-09-23 04:06:14 UTC) #17
sashab
No prob, done and removed TODO for that :)
4 years, 2 months ago (2016-09-26 01:55:26 UTC) #18
Timothy Loh
Looks like this is still failing lots of tests
4 years, 2 months ago (2016-09-26 07:23:48 UTC) #23
sashab
On 2016/09/26 at 07:23:48, timloh wrote: > Looks like this is still failing lots of ...
4 years, 2 months ago (2016-09-27 01:01:23 UTC) #24
sashab
We have to land this today, or the chromium reformat is going to make this ...
4 years, 2 months ago (2016-09-30 02:28:41 UTC) #29
alancutter (OOO until 2018)
lgtm https://codereview.chromium.org/2346193002/diff/100001/third_party/WebKit/Source/core/css/CSSContentDistributionValue.h File third_party/WebKit/Source/core/css/CSSContentDistributionValue.h (right): https://codereview.chromium.org/2346193002/diff/100001/third_party/WebKit/Source/core/css/CSSContentDistributionValue.h#newcode22 third_party/WebKit/Source/core/css/CSSContentDistributionValue.h:22: // TODO(sashab): Make these result CSSValueIDs instead of ...
4 years, 2 months ago (2016-09-30 04:25:54 UTC) #36
Timothy Loh
lgtm https://codereview.chromium.org/2346193002/diff/120001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h File third_party/WebKit/Source/core/css/CSSPrimitiveValue.h (right): https://codereview.chromium.org/2346193002/diff/120001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h#newcode61 third_party/WebKit/Source/core/css/CSSPrimitiveValue.h:61: // CSSPrimitiveValue stores both numbers/lengths (e.g. 1, 10px, ...
4 years, 2 months ago (2016-09-30 05:44:36 UTC) #41
sashab
Thanks tim; lets get this patch landed! :) https://codereview.chromium.org/2346193002/diff/120001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h File third_party/WebKit/Source/core/css/CSSPrimitiveValue.h (right): https://codereview.chromium.org/2346193002/diff/120001/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h#newcode61 third_party/WebKit/Source/core/css/CSSPrimitiveValue.h:61: // ...
4 years, 2 months ago (2016-09-30 06:45:48 UTC) #42
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/2346193002/160001
4 years, 2 months ago (2016-09-30 06:51:23 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/233312)
4 years, 2 months ago (2016-09-30 07:01:52 UTC) #47
jochen (gone - plz use gerrit)
source/web lgtm
4 years, 2 months ago (2016-09-30 12:31:31 UTC) #49
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/2346193002/180001
4 years, 2 months ago (2016-09-30 12:33:56 UTC) #52
commit-bot: I haz the power
Failed to apply patch for third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h: While running git apply --index -3 -p1; error: patch ...
4 years, 2 months ago (2016-09-30 14:41:42 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/2346193002/180001
4 years, 2 months ago (2016-09-30 14:50:54 UTC) #56
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/270631)
4 years, 2 months ago (2016-09-30 14:59:34 UTC) #58
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/2346193002/180001
4 years, 2 months ago (2016-09-30 15:03:50 UTC) #60
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/270645)
4 years, 2 months ago (2016-09-30 15:11:16 UTC) #62
esprehn
lgtm https://codereview.chromium.org/2346193002/diff/180001/third_party/WebKit/Source/core/css/CSSIdentifierValue.h File third_party/WebKit/Source/core/css/CSSIdentifierValue.h (right): https://codereview.chromium.org/2346193002/diff/180001/third_party/WebKit/Source/core/css/CSSIdentifierValue.h#newcode17 third_party/WebKit/Source/core/css/CSSIdentifierValue.h:17: class CORE_EXPORT CSSIdentifierValue : public CSSValue { final ...
4 years, 2 months ago (2016-09-30 19:33:08 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/2346193002/180001
4 years, 2 months ago (2016-09-30 19:33:50 UTC) #66
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/270923)
4 years, 2 months ago (2016-09-30 19:41:02 UTC) #68
esprehn
Looks like merge conflict on presubmit :P
4 years, 2 months ago (2016-09-30 20:01:54 UTC) #69
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/2346193002/200001
4 years, 2 months ago (2016-09-30 23:01:03 UTC) #72
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/306449)
4 years, 2 months ago (2016-10-01 00:05:15 UTC) #74
dcheng
On 2016/10/01 00:05:15, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 2 months ago (2016-10-01 02:45:11 UTC) #75
sashab
4 years, 2 months ago (2016-10-04 02:44:43 UTC) #76

Powered by Google App Engine
This is Rietveld 408576698