| Index: Source/core/css/CSSPrimitiveValue.cpp
|
| diff --git a/Source/core/css/CSSPrimitiveValue.cpp b/Source/core/css/CSSPrimitiveValue.cpp
|
| index ac92c915ed05ef33572861d7d0da2fd0d5f943c0..9ce689f0d8ddb277d4fe760890f54f16b6c724d2 100644
|
| --- a/Source/core/css/CSSPrimitiveValue.cpp
|
| +++ b/Source/core/css/CSSPrimitiveValue.cpp
|
| @@ -946,9 +946,12 @@ const char* CSSPrimitiveValue::unitTypeToString(UnitType type)
|
|
|
| String CSSPrimitiveValue::customCSSText() const
|
| {
|
| - if (hasCachedCSSText()) {
|
| - ASSERT(cssTextCache().contains(m_rawValue));
|
| - return cssTextCache().get(m_rawValue);
|
| + if (!isObject() && cssTextCache().contains(m_rawValue.asPtr))
|
| + return cssTextCache().get(m_rawValue.asPtr);
|
| +
|
| + if (isObject() && m_rawValue.asPtr->m_hasCachedCSSText) {
|
| + ASSERT(cssTextCache().contains(m_rawValue.asPtr));
|
| + return cssTextCache().get(m_rawValue.asPtr);
|
| }
|
|
|
| String text;
|
| @@ -1062,9 +1065,10 @@ String CSSPrimitiveValue::customCSSText() const
|
| break;
|
| }
|
|
|
| - ASSERT(!cssTextCache().contains(m_rawValue));
|
| - cssTextCache().set(m_rawValue, text);
|
| - setHasCachedCSSText(true);
|
| + ASSERT(!cssTextCache().contains(m_rawValue.asPtr));
|
| + cssTextCache().set(m_rawValue.asPtr, text);
|
| + if (isObject())
|
| + m_rawValue.asPtr->m_hasCachedCSSText = true;
|
| return text;
|
| }
|
|
|
|
|