| Index: Source/core/css/CSSValuePool.cpp
|
| diff --git a/Source/core/css/CSSValuePool.cpp b/Source/core/css/CSSValuePool.cpp
|
| index 11443cca94ffb76270666ac8a9d64fe3dc2b582f..1b12b4fe77572919b5af707b57baf166df77e7ad 100644
|
| --- a/Source/core/css/CSSValuePool.cpp
|
| +++ b/Source/core/css/CSSValuePool.cpp
|
| @@ -53,45 +53,45 @@ CSSValuePool::CSSValuePool()
|
| m_numberValueCache.resize(maximumCacheableIntegerValue + 1);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createIdentifierValue(CSSValueID ident)
|
| +CSSPrimitiveValue CSSValuePool::createIdentifierValue(CSSValueID ident)
|
| {
|
| if (ident <= 0)
|
| return CSSPrimitiveValue::createIdentifier(ident);
|
|
|
| if (!m_identifierValueCache[ident])
|
| m_identifierValueCache[ident] = CSSPrimitiveValue::createIdentifier(ident);
|
| - return m_identifierValueCache[ident];
|
| + return toCSSPrimitiveValue(m_identifierValueCache[ident]);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createIdentifierValue(CSSPropertyID ident)
|
| +CSSPrimitiveValue CSSValuePool::createIdentifierValue(CSSPropertyID ident)
|
| {
|
| return CSSPrimitiveValue::createIdentifier(ident);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createColorValue(unsigned rgbValue)
|
| +CSSPrimitiveValue CSSValuePool::createColorValue(unsigned rgbValue)
|
| {
|
| // These are the empty and deleted values of the hash table.
|
| if (rgbValue == Color::transparent)
|
| - return m_colorTransparent;
|
| + return toCSSPrimitiveValue(m_colorTransparent);
|
| if (rgbValue == Color::white)
|
| - return m_colorWhite;
|
| + return toCSSPrimitiveValue(m_colorWhite);
|
| // Just because it is common.
|
| if (rgbValue == Color::black)
|
| - return m_colorBlack;
|
| + return toCSSPrimitiveValue(m_colorBlack);
|
|
|
| // Just wipe out the cache and start rebuilding if it gets too big.
|
| const unsigned maximumColorCacheSize = 512;
|
| if (m_colorValueCache.size() > maximumColorCacheSize)
|
| m_colorValueCache.clear();
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> dummyValue = nullptr;
|
| + NullableCSSValue dummyValue;
|
| ColorValueCache::AddResult entry = m_colorValueCache.add(rgbValue, dummyValue);
|
| if (entry.isNewEntry)
|
| entry.storedValue->value = CSSPrimitiveValue::createColor(rgbValue);
|
| - return entry.storedValue->value;
|
| + return toCSSPrimitiveValue(entry.storedValue->value);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createValue(double value, CSSPrimitiveValue::UnitType type)
|
| +CSSPrimitiveValue CSSValuePool::createValue(double value, CSSPrimitiveValue::UnitType type)
|
| {
|
| if (std::isinf(value))
|
| value = 0;
|
| @@ -107,31 +107,31 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createValue(double value
|
| case CSSPrimitiveValue::CSS_PX:
|
| if (!m_pixelValueCache[intValue])
|
| m_pixelValueCache[intValue] = CSSPrimitiveValue::create(value, type);
|
| - return m_pixelValueCache[intValue];
|
| + return toCSSPrimitiveValue(m_pixelValueCache[intValue]);
|
| case CSSPrimitiveValue::CSS_PERCENTAGE:
|
| if (!m_percentValueCache[intValue])
|
| m_percentValueCache[intValue] = CSSPrimitiveValue::create(value, type);
|
| - return m_percentValueCache[intValue];
|
| + return toCSSPrimitiveValue(m_percentValueCache[intValue]);
|
| case CSSPrimitiveValue::CSS_NUMBER:
|
| if (!m_numberValueCache[intValue])
|
| m_numberValueCache[intValue] = CSSPrimitiveValue::create(value, type);
|
| - return m_numberValueCache[intValue];
|
| + return toCSSPrimitiveValue(m_numberValueCache[intValue]);
|
| default:
|
| return CSSPrimitiveValue::create(value, type);
|
| }
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createValue(const Length& value, const ComputedStyle& style)
|
| +CSSPrimitiveValue CSSValuePool::createValue(const Length& value, const ComputedStyle& style)
|
| {
|
| return CSSPrimitiveValue::create(value, style.effectiveZoom());
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSValuePool::createFontFamilyValue(const String& familyName)
|
| +CSSPrimitiveValue CSSValuePool::createFontFamilyValue(const String& familyName)
|
| {
|
| - RefPtrWillBeMember<CSSPrimitiveValue>& value = m_fontFamilyValueCache.add(familyName, nullptr).storedValue->value;
|
| + NullableCSSValue& value = m_fontFamilyValueCache.add(familyName, nullptr).storedValue->value;
|
| if (!value)
|
| value = CSSPrimitiveValue::create(familyName, CSSPrimitiveValue::CSS_CUSTOM_IDENT);
|
| - return value;
|
| + return toCSSPrimitiveValue(value);
|
| }
|
|
|
| PassRefPtrWillBeRawPtr<CSSValueList> CSSValuePool::createFontFaceValue(const AtomicString& string)
|
|
|