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

Unified Diff: Source/core/css/resolver/StyleResolverState.cpp

Issue 16415007: Cleanup usage of CSSPropertyID and CSSValueID inside Blink. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/editing/EditingStyle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolverState.cpp
diff --git a/Source/core/css/resolver/StyleResolverState.cpp b/Source/core/css/resolver/StyleResolverState.cpp
index fdeae92e6993e0db353683d9078c0d55f97c1b85..ecdf471c76d41c308b1c5b07a8e7d27355b275f4 100644
--- a/Source/core/css/resolver/StyleResolverState.cpp
+++ b/Source/core/css/resolver/StyleResolverState.cpp
@@ -88,10 +88,10 @@ void StyleResolverState::initForStyleResolve(Document* document, Element* e, Ren
}
-static Color colorForCSSValue(int cssValueId)
+static Color colorForCSSValue(CSSValueID cssValueId)
{
struct ColorValue {
- int cssValueId;
+ CSSValueID cssValueId;
RGBA32 color;
};
@@ -115,7 +115,7 @@ static Color colorForCSSValue(int cssValueId)
{ CSSValueTransparent, 0x00000000 },
{ CSSValueWhite, 0xFFFFFFFF },
{ CSSValueYellow, 0xFFFFFF00 },
- { 0, 0 }
+ { CSSValueInvalid, CSSValueInvalid }
};
for (const ColorValue* col = colorValues; col->cssValueId; ++col) {
@@ -130,8 +130,8 @@ Color StyleResolverState::colorFromPrimitiveValue(CSSPrimitiveValue* value, bool
if (value->isRGBColor())
return Color(value->getRGBA32Value());
- int ident = value->getIdent();
- switch (ident) {
+ CSSValueID valueID = value->getValueID();
+ switch (valueID) {
case 0:
return Color();
case CSSValueWebkitText:
@@ -145,7 +145,7 @@ Color StyleResolverState::colorFromPrimitiveValue(CSSPrimitiveValue* value, bool
case CSSValueCurrentcolor:
return style()->color();
default:
- return colorForCSSValue(ident);
+ return colorForCSSValue(valueID);
}
}
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/editing/EditingStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698