X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fcore%2Fcss%2FCSSValuePool.h;h=9ed7f39b04f1dffcbbfe07c6691d51f2545e0eff;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=75b8984a1f7f78b6f57d9f47807aa47aedfec649;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/core/css/CSSValuePool.h b/src/third_party/WebKit/Source/core/css/CSSValuePool.h index 75b8984..9ed7f39 100644 --- a/src/third_party/WebKit/Source/core/css/CSSValuePool.h +++ b/src/third_party/WebKit/Source/core/css/CSSValuePool.h @@ -39,48 +39,51 @@ namespace WebCore { class CSSValueList; -class CSSValuePool { - WTF_MAKE_FAST_ALLOCATED; +class CSSValuePool : public NoBaseWillBeGarbageCollected { + DECLARE_GC_INFO; + WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; public: - PassRefPtr createFontFaceValue(const AtomicString&); - PassRefPtr createFontFamilyValue(const String&); - PassRefPtr createInheritedValue() { return m_inheritedValue; } - PassRefPtr createImplicitInitialValue() { return m_implicitInitialValue; } - PassRefPtr createExplicitInitialValue() { return m_explicitInitialValue; } - PassRefPtr createIdentifierValue(CSSValueID identifier); - PassRefPtr createIdentifierValue(CSSPropertyID identifier); - PassRefPtr createColorValue(unsigned rgbValue); - PassRefPtr createValue(double value, CSSPrimitiveValue::UnitTypes); - PassRefPtr createValue(const String& value, CSSPrimitiveValue::UnitTypes type) { return CSSPrimitiveValue::create(value, type); } - PassRefPtr createValue(const Length& value, const RenderStyle&); - PassRefPtr createValue(const Length& value, float zoom) { return CSSPrimitiveValue::create(value, zoom); } - template static PassRefPtr createValue(T value) { return CSSPrimitiveValue::create(value); } + PassRefPtrWillBeRawPtr createFontFaceValue(const AtomicString&); + PassRefPtrWillBeRawPtr createFontFamilyValue(const String&); + PassRefPtrWillBeRawPtr createInheritedValue() { return m_inheritedValue; } + PassRefPtrWillBeRawPtr createImplicitInitialValue() { return m_implicitInitialValue; } + PassRefPtrWillBeRawPtr createExplicitInitialValue() { return m_explicitInitialValue; } + PassRefPtrWillBeRawPtr createIdentifierValue(CSSValueID identifier); + PassRefPtrWillBeRawPtr createIdentifierValue(CSSPropertyID identifier); + PassRefPtrWillBeRawPtr createColorValue(unsigned rgbValue); + PassRefPtrWillBeRawPtr createValue(double value, CSSPrimitiveValue::UnitTypes); + PassRefPtrWillBeRawPtr createValue(const String& value, CSSPrimitiveValue::UnitTypes type) { return CSSPrimitiveValue::create(value, type); } + PassRefPtrWillBeRawPtr createValue(const Length& value, const RenderStyle&); + PassRefPtrWillBeRawPtr createValue(const Length& value, float zoom) { return CSSPrimitiveValue::create(value, zoom); } + template static PassRefPtrWillBeRawPtr createValue(T value) { return CSSPrimitiveValue::create(value); } + + void trace(Visitor*); private: CSSValuePool(); - RefPtr m_inheritedValue; - RefPtr m_implicitInitialValue; - RefPtr m_explicitInitialValue; + RefPtrWillBeMember m_inheritedValue; + RefPtrWillBeMember m_implicitInitialValue; + RefPtrWillBeMember m_explicitInitialValue; - RefPtr m_identifierValueCache[numCSSValueKeywords]; + WillBeHeapVector, numCSSValueKeywords> m_identifierValueCache; - typedef HashMap > ColorValueCache; + typedef WillBeHeapHashMap > ColorValueCache; ColorValueCache m_colorValueCache; - RefPtr m_colorTransparent; - RefPtr m_colorWhite; - RefPtr m_colorBlack; + RefPtrWillBeMember m_colorTransparent; + RefPtrWillBeMember m_colorWhite; + RefPtrWillBeMember m_colorBlack; static const int maximumCacheableIntegerValue = 255; - RefPtr m_pixelValueCache[maximumCacheableIntegerValue + 1]; - RefPtr m_percentValueCache[maximumCacheableIntegerValue + 1]; - RefPtr m_numberValueCache[maximumCacheableIntegerValue + 1]; + WillBeHeapVector, maximumCacheableIntegerValue + 1> m_pixelValueCache; + WillBeHeapVector, maximumCacheableIntegerValue + 1> m_percentValueCache; + WillBeHeapVector, maximumCacheableIntegerValue + 1> m_numberValueCache; - typedef HashMap > FontFaceValueCache; + typedef WillBeHeapHashMap > FontFaceValueCache; FontFaceValueCache m_fontFaceValueCache; - typedef HashMap > FontFamilyValueCache; + typedef WillBeHeapHashMap > FontFamilyValueCache; FontFamilyValueCache m_fontFamilyValueCache; friend CSSValuePool& cssValuePool();