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

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

Issue 1225553002: CSSValue Immediates: Make CSSPrimitiveValue a container (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_1
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/CSSValueObject.cpp ('k') | Source/core/css/CSSValuePool.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSValuePool.h
diff --git a/Source/core/css/CSSValuePool.h b/Source/core/css/CSSValuePool.h
index c6c4317a62cfdf10a52790ef4d1e6e84dd75bec4..44325a13287ea3b0b32fd1d6bd0bb6a511de91cc 100644
--- a/Source/core/css/CSSValuePool.h
+++ b/Source/core/css/CSSValuePool.h
@@ -44,19 +44,19 @@ class CORE_EXPORT CSSValuePool : public NoBaseWillBeGarbageCollectedFinalized<C
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(CSSValuePool);
public:
PassRefPtrWillBeRawPtr<CSSValueList> createFontFaceValue(const AtomicString&);
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createFontFamilyValue(const String&);
+ CSSPrimitiveValue createFontFamilyValue(const String&);
PassRefPtrWillBeRawPtr<CSSInheritedValue> createInheritedValue() { return m_inheritedValue; }
PassRefPtrWillBeRawPtr<CSSInitialValue> createImplicitInitialValue() { return m_implicitInitialValue; }
PassRefPtrWillBeRawPtr<CSSInitialValue> createExplicitInitialValue() { return m_explicitInitialValue; }
PassRefPtrWillBeRawPtr<CSSUnsetValue> createUnsetValue() { return m_unsetValue; }
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createIdentifierValue(CSSValueID identifier);
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createIdentifierValue(CSSPropertyID identifier);
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createColorValue(unsigned rgbValue);
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createValue(double value, CSSPrimitiveValue::UnitType);
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createValue(const String& value, CSSPrimitiveValue::UnitType type) { return CSSPrimitiveValue::create(value, type); }
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createValue(const Length& value, const ComputedStyle&);
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createValue(const Length& value, float zoom) { return CSSPrimitiveValue::create(value, zoom); }
- template<typename T> static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createValue(T value) { return CSSPrimitiveValue::create(value); }
+ CSSPrimitiveValue createIdentifierValue(CSSValueID identifier);
+ CSSPrimitiveValue createIdentifierValue(CSSPropertyID identifier);
+ CSSPrimitiveValue createColorValue(unsigned rgbValue);
+ CSSPrimitiveValue createValue(double value, CSSPrimitiveValue::UnitType);
+ CSSPrimitiveValue createValue(const String& value, CSSPrimitiveValue::UnitType type) { return CSSPrimitiveValue::create(value, type); }
+ CSSPrimitiveValue createValue(const Length& value, const ComputedStyle&);
+ CSSPrimitiveValue createValue(const Length& value, float zoom) { return CSSPrimitiveValue::create(value, zoom); }
+ template<typename T> static CSSPrimitiveValue createValue(T value) { return CSSPrimitiveValue::create(value); }
DECLARE_TRACE();
@@ -68,24 +68,24 @@ private:
RefPtrWillBeMember<CSSInitialValue> m_explicitInitialValue;
RefPtrWillBeMember<CSSUnsetValue> m_unsetValue;
- WillBeHeapVector<RefPtrWillBeMember<CSSPrimitiveValue>, numCSSValueKeywords> m_identifierValueCache;
+ WillBeHeapVector<NullableCSSValue, numCSSValueKeywords> m_identifierValueCache;
- typedef WillBeHeapHashMap<unsigned, RefPtrWillBeMember<CSSPrimitiveValue>> ColorValueCache;
+ typedef WillBeHeapHashMap<unsigned, NullableCSSValue> ColorValueCache;
ColorValueCache m_colorValueCache;
- RefPtrWillBeMember<CSSPrimitiveValue> m_colorTransparent;
- RefPtrWillBeMember<CSSPrimitiveValue> m_colorWhite;
- RefPtrWillBeMember<CSSPrimitiveValue> m_colorBlack;
+ CSSValue m_colorTransparent;
+ CSSValue m_colorWhite;
+ CSSValue m_colorBlack;
static const int maximumCacheableIntegerValue = 255;
- WillBeHeapVector<RefPtrWillBeMember<CSSPrimitiveValue>, maximumCacheableIntegerValue + 1> m_pixelValueCache;
- WillBeHeapVector<RefPtrWillBeMember<CSSPrimitiveValue>, maximumCacheableIntegerValue + 1> m_percentValueCache;
- WillBeHeapVector<RefPtrWillBeMember<CSSPrimitiveValue>, maximumCacheableIntegerValue + 1> m_numberValueCache;
+ WillBeHeapVector<NullableCSSValue, maximumCacheableIntegerValue + 1> m_pixelValueCache;
+ WillBeHeapVector<NullableCSSValue, maximumCacheableIntegerValue + 1> m_percentValueCache;
+ WillBeHeapVector<NullableCSSValue, maximumCacheableIntegerValue + 1> m_numberValueCache;
typedef WillBeHeapHashMap<AtomicString, RefPtrWillBeMember<CSSValueList>> FontFaceValueCache;
FontFaceValueCache m_fontFaceValueCache;
- typedef WillBeHeapHashMap<String, RefPtrWillBeMember<CSSPrimitiveValue>> FontFamilyValueCache;
+ typedef WillBeHeapHashMap<String, NullableCSSValue> FontFamilyValueCache;
FontFamilyValueCache m_fontFamilyValueCache;
friend CORE_EXPORT CSSValuePool& cssValuePool();
« no previous file with comments | « Source/core/css/CSSValueObject.cpp ('k') | Source/core/css/CSSValuePool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698