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

Unified Diff: Source/core/css/CSSValuePool.cpp

Issue 16339006: Make sure to use CSSValueID and CSSPropertyID rather than integers. (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/CSSValuePool.h ('k') | Source/core/css/StylePropertySet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSValuePool.cpp
diff --git a/Source/core/css/CSSValuePool.cpp b/Source/core/css/CSSValuePool.cpp
index 4c5d8ef4b26e334dcaef8521d48fe477808c4546..8b2219dcb0bc9f5f1f926551984347bf685f6135 100644
--- a/Source/core/css/CSSValuePool.cpp
+++ b/Source/core/css/CSSValuePool.cpp
@@ -48,9 +48,9 @@ CSSValuePool::CSSValuePool()
{
}
-PassRefPtr<CSSPrimitiveValue> CSSValuePool::createIdentifierValue(int ident)
+PassRefPtr<CSSPrimitiveValue> CSSValuePool::createIdentifierValue(CSSValueID ident)
{
- if (ident <= 0 || ident >= numCSSValueKeywords)
+ if (ident <= 0)
return CSSPrimitiveValue::createIdentifier(ident);
if (!m_identifierValueCache[ident])
@@ -58,6 +58,11 @@ PassRefPtr<CSSPrimitiveValue> CSSValuePool::createIdentifierValue(int ident)
return m_identifierValueCache[ident];
}
+PassRefPtr<CSSPrimitiveValue> CSSValuePool::createIdentifierValue(CSSPropertyID ident)
+{
+ return CSSPrimitiveValue::createIdentifier(ident);
+}
+
PassRefPtr<CSSPrimitiveValue> CSSValuePool::createColorValue(unsigned rgbValue)
{
// These are the empty and deleted values of the hash table.
« no previous file with comments | « Source/core/css/CSSValuePool.h ('k') | Source/core/css/StylePropertySet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698