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

Issue 16415007: Cleanup usage of CSSPropertyID and CSSValueID inside Blink. (Closed)

Created:
7 years, 6 months ago by darktears
Modified:
7 years, 6 months ago
CC:
blink-reviews, kenneth.christiansen, eae+blinkwatch, leviw+renderwatch, dglazkov+blink, apavlov+blink_chromium.org, jchaffraix+rendering
Visibility:
Public.

Description

Cleanup usage of CSSPropertyID and CSSValueID inside Blink. A lot of call sites were using integers to represent them. While it's not incorrect per say, it's not ideal for various reason such as type safety or to remove ambiguity. This patch eradicate the wrong usage by not letting any integer based API for getting CSSValueIDs or CSSPropertyIDs from CSSPrimitiveValues. Instead we use new but typed functions to construct the values as well as getting them. 2 custom and internal types were added to CSSPrimitiveValue to handle correctly the new APIs. It's good to note that in order to preserve compatibility on the CSSPrimitiveValue type whenever CSSPrimitiveValue handles a CSSValueID or a CSSPropertyID the return type for the public API will be CSS_IDENT despite it is a separate internal type. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=151975

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2312 lines, -2040 lines) Patch
M Source/core/css/CSSComputedStyleDeclaration.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/css/CSSFontSelector.cpp View 4 chunks +6 lines, -6 lines 0 comments Download
M Source/core/css/CSSGradientValue.cpp View 7 chunks +12 lines, -8 lines 0 comments Download
M Source/core/css/CSSMatrix.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/CSSParser.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/css/CSSParser.cpp View 11 chunks +21 lines, -21 lines 0 comments Download
M Source/core/css/CSSParserValues.cpp View 2 chunks +3 lines, -1 line 0 comments Download
M Source/core/css/CSSPrimitiveValue.h View 7 chunks +17 lines, -6 lines 0 comments Download
M Source/core/css/CSSPrimitiveValue.cpp View 12 chunks +81 lines, -41 lines 0 comments Download
M Source/core/css/CSSPrimitiveValueMappings.h View 127 chunks +1967 lines, -1774 lines 0 comments Download
M Source/core/css/CSSToStyleMap.cpp View 14 chunks +25 lines, -19 lines 0 comments Download
M Source/core/css/Counter.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/css/DeprecatedStyleBuilder.cpp View 31 chunks +44 lines, -40 lines 0 comments Download
M Source/core/css/MediaQueryEvaluator.cpp View 1 2 4 chunks +4 lines, -5 lines 0 comments Download
M Source/core/css/MediaQueryExp.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/css/SVGCSSParser.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/SVGCSSStyleSelector.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/css/StylePropertySerializer.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/css/resolver/FilterOperationResolver.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M Source/core/css/resolver/StyleBuilderCustom.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 15 chunks +21 lines, -21 lines 0 comments Download
M Source/core/css/resolver/StyleResolverState.cpp View 4 chunks +6 lines, -6 lines 0 comments Download
M Source/core/editing/EditingStyle.h View 2 chunks +9 lines, -8 lines 0 comments Download
M Source/core/editing/EditingStyle.cpp View 16 chunks +31 lines, -29 lines 0 comments Download
M Source/core/editing/markup.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderTheme.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderTheme.cpp View 2 chunks +3 lines, -1 line 0 comments Download
M Source/core/rendering/RenderThemeChromiumAndroid.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderThemeChromiumAndroid.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderThemeChromiumDefault.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderThemeChromiumDefault.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderThemeChromiumFontProvider.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M Source/core/rendering/RenderThemeChromiumFontProviderLinux.cpp View 2 chunks +4 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderThemeChromiumFontProviderWin.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderThemeChromiumMac.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderThemeChromiumMac.mm View 3 chunks +4 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderThemeChromiumSkia.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderThemeChromiumSkia.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderThemeChromiumWin.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderThemeChromiumWin.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/scripts/templates/StyleBuilder.cpp.tmpl View 1 chunk +8 lines, -8 lines 0 comments Download
M Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl View 3 chunks +5 lines, -3 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
darktears
7 years, 6 months ago (2013-06-06 18:49:56 UTC) #1
eseidel
lgtm This change is AMAZING. Thank you. https://codereview.chromium.org/16415007/diff/3001/Source/core/css/CSSParserValues.cpp File Source/core/css/CSSParserValues.cpp (left): https://codereview.chromium.org/16415007/diff/3001/Source/core/css/CSSParserValues.cpp#oldcode81 Source/core/css/CSSParserValues.cpp:81: case CSSPrimitiveValue::CSS_IDENT: ...
7 years, 6 months ago (2013-06-06 19:41:16 UTC) #2
darktears
On 2013/06/06 19:41:16, eseidel wrote: > lgtm > > This change is AMAZING. Thank you. ...
7 years, 6 months ago (2013-06-06 19:47:35 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alexis.menard@intel.com/16415007/13001
7 years, 6 months ago (2013-06-06 19:54:58 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alexis.menard@intel.com/16415007/13001
7 years, 6 months ago (2013-06-06 20:06:09 UTC) #5
commit-bot: I haz the power
7 years, 6 months ago (2013-06-06 23:05:12 UTC) #6
Message was sent while issue was closed.
Change committed as 151975

Powered by Google App Engine
This is Rietveld 408576698