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

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

Issue 1226123008: CSSValue Immediates: Replace CSSPrimitiveValue usage with const references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_4_attempt_2
Patch Set: Rebase Created 5 years, 5 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/CSSValueList.cpp ('k') | Source/core/css/ComputedStyleCSSValueMapping.cpp » ('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 2962a3e260dfd9c8fe9a55fc8c77dc483e7ef99d..1b12b4fe77572919b5af707b57baf166df77e7ad 100644
--- a/Source/core/css/CSSValuePool.cpp
+++ b/Source/core/css/CSSValuePool.cpp
@@ -60,7 +60,7 @@ CSSPrimitiveValue CSSValuePool::createIdentifierValue(CSSValueID ident)
if (!m_identifierValueCache[ident])
m_identifierValueCache[ident] = CSSPrimitiveValue::createIdentifier(ident);
- return toCSSPrimitiveValue(*m_identifierValueCache[ident]);
+ return toCSSPrimitiveValue(m_identifierValueCache[ident]);
}
CSSPrimitiveValue CSSValuePool::createIdentifierValue(CSSPropertyID ident)
@@ -88,7 +88,7 @@ CSSPrimitiveValue CSSValuePool::createColorValue(unsigned rgbValue)
ColorValueCache::AddResult entry = m_colorValueCache.add(rgbValue, dummyValue);
if (entry.isNewEntry)
entry.storedValue->value = CSSPrimitiveValue::createColor(rgbValue);
- return toCSSPrimitiveValue(*entry.storedValue->value);
+ return toCSSPrimitiveValue(entry.storedValue->value);
}
CSSPrimitiveValue CSSValuePool::createValue(double value, CSSPrimitiveValue::UnitType type)
@@ -107,15 +107,15 @@ CSSPrimitiveValue CSSValuePool::createValue(double value, CSSPrimitiveValue::Uni
case CSSPrimitiveValue::CSS_PX:
if (!m_pixelValueCache[intValue])
m_pixelValueCache[intValue] = CSSPrimitiveValue::create(value, type);
- return toCSSPrimitiveValue(*m_pixelValueCache[intValue]);
+ return toCSSPrimitiveValue(m_pixelValueCache[intValue]);
case CSSPrimitiveValue::CSS_PERCENTAGE:
if (!m_percentValueCache[intValue])
m_percentValueCache[intValue] = CSSPrimitiveValue::create(value, type);
- return toCSSPrimitiveValue(*m_percentValueCache[intValue]);
+ return toCSSPrimitiveValue(m_percentValueCache[intValue]);
case CSSPrimitiveValue::CSS_NUMBER:
if (!m_numberValueCache[intValue])
m_numberValueCache[intValue] = CSSPrimitiveValue::create(value, type);
- return toCSSPrimitiveValue(*m_numberValueCache[intValue]);
+ return toCSSPrimitiveValue(m_numberValueCache[intValue]);
default:
return CSSPrimitiveValue::create(value, type);
}
@@ -131,7 +131,7 @@ CSSPrimitiveValue CSSValuePool::createFontFamilyValue(const String& familyName)
NullableCSSValue& value = m_fontFamilyValueCache.add(familyName, nullptr).storedValue->value;
if (!value)
value = CSSPrimitiveValue::create(familyName, CSSPrimitiveValue::CSS_CUSTOM_IDENT);
- return toCSSPrimitiveValue(*value);
+ return toCSSPrimitiveValue(value);
}
PassRefPtrWillBeRawPtr<CSSValueList> CSSValuePool::createFontFaceValue(const AtomicString& string)
« no previous file with comments | « Source/core/css/CSSValueList.cpp ('k') | Source/core/css/ComputedStyleCSSValueMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698