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

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

Issue 1376573004: Split out Color from CSSPrimitiveValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_property
Patch Set: Rebase and review feedback Created 5 years, 2 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
Index: third_party/WebKit/Source/core/css/CSSValuePool.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSValuePool.cpp b/third_party/WebKit/Source/core/css/CSSValuePool.cpp
index 0cee83d3934d6f63bae2329b05caa14b156b2293..97723864efb0c0832308eed2f255627815ce9048 100644
--- a/third_party/WebKit/Source/core/css/CSSValuePool.cpp
+++ b/third_party/WebKit/Source/core/css/CSSValuePool.cpp
@@ -43,9 +43,9 @@ CSSValuePool::CSSValuePool()
, m_implicitInitialValue(CSSInitialValue::createImplicit())
, m_explicitInitialValue(CSSInitialValue::createExplicit())
, m_unsetValue(CSSUnsetValue::create())
- , m_colorTransparent(CSSPrimitiveValue::createColor(Color::transparent))
- , m_colorWhite(CSSPrimitiveValue::createColor(Color::white))
- , m_colorBlack(CSSPrimitiveValue::createColor(Color::black))
+ , m_colorTransparent(CSSColorValue::create(Color::transparent))
+ , m_colorWhite(CSSColorValue::create(Color::white))
+ , m_colorBlack(CSSColorValue::create(Color::black))
{
m_identifierValueCache.resize(numCSSValueKeywords);
m_pixelValueCache.resize(maximumCacheableIntegerValue + 1);
@@ -68,7 +68,7 @@ PassRefPtrWillBeRawPtr<CSSCustomIdentValue> CSSValuePool::createIdentifierValue(
return CSSCustomIdentValue::create(ident);
}
-PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createColorValue(unsigned rgbValue)
+PassRefPtrWillBeRawPtr<CSSColorValue> CSSValuePool::createColorValue(RGBA32 rgbValue)
{
// These are the empty and deleted values of the hash table.
if (rgbValue == Color::transparent)
@@ -84,10 +84,10 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createColorValue(unsigne
if (m_colorValueCache.size() > maximumColorCacheSize)
m_colorValueCache.clear();
- RefPtrWillBeRawPtr<CSSPrimitiveValue> dummyValue = nullptr;
+ RefPtrWillBeRawPtr<CSSColorValue> dummyValue = nullptr;
ColorValueCache::AddResult entry = m_colorValueCache.add(rgbValue, dummyValue);
if (entry.isNewEntry)
- entry.storedValue->value = CSSPrimitiveValue::createColor(rgbValue);
+ entry.storedValue->value = CSSColorValue::create(rgbValue);
return entry.storedValue->value;
}
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSValuePool.h ('k') | third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698