| Index: Source/core/css/CSSValue.cpp
|
| diff --git a/Source/core/css/CSSValue.cpp b/Source/core/css/CSSValue.cpp
|
| index d8a94be96cb0712b2e146f95e0c2bab34ab8f683..b183fa0062c0d0cc172fc22badf88bca72ff7330 100644
|
| --- a/Source/core/css/CSSValue.cpp
|
| +++ b/Source/core/css/CSSValue.cpp
|
| @@ -65,11 +65,14 @@ static_assert(sizeof(CSSValue) <= sizeof(SameSizeAsCSSValue), "CSSValue should s
|
|
|
| bool CSSValue::isImplicitInitialValue() const
|
| {
|
| - return m_classType == InitialClass && toCSSInitialValue(this)->isImplicit();
|
| + return !isTaggedPtr() && classType() == InitialClass && toCSSInitialValue(this)->isImplicit();
|
| }
|
|
|
| bool CSSValue::hasFailedOrCanceledSubresources() const
|
| {
|
| + if (isTaggedPtr())
|
| + return false;
|
| +
|
| if (isValueList())
|
| return toCSSValueList(this)->hasFailedOrCanceledSubresources();
|
| if (classType() == FontFaceSrcClass)
|
| @@ -92,6 +95,12 @@ inline static bool compareCSSValues(const CSSValue& first, const CSSValue& secon
|
|
|
| bool CSSValue::equals(const CSSValue& other) const
|
| {
|
| + if (isTaggedPtr() && other.isTaggedPtr())
|
| + return this == &other;
|
| +
|
| + if (isTaggedPtr() || other.isTaggedPtr())
|
| + return compareCSSValues<CSSPrimitiveValue>(*this, other);
|
| +
|
| if (m_classType == other.m_classType) {
|
| switch (m_classType) {
|
| case BorderImageSliceClass:
|
| @@ -160,6 +169,9 @@ bool CSSValue::equals(const CSSValue& other) const
|
|
|
| String CSSValue::cssText() const
|
| {
|
| + if (isTaggedPtr())
|
| + return toCSSPrimitiveValue(this)->customCSSText();
|
| +
|
| switch (classType()) {
|
| case BorderImageSliceClass:
|
| return toCSSBorderImageSliceValue(this)->customCSSText();
|
| @@ -224,6 +236,9 @@ String CSSValue::cssText() const
|
|
|
| void CSSValue::destroy()
|
| {
|
| + if (isTaggedPtr())
|
| + return;
|
| +
|
| switch (classType()) {
|
| case BorderImageSliceClass:
|
| delete toCSSBorderImageSliceValue(this);
|
| @@ -315,6 +330,9 @@ void CSSValue::destroy()
|
|
|
| void CSSValue::finalizeGarbageCollectedObject()
|
| {
|
| + if (isTaggedPtr())
|
| + return;
|
| +
|
| switch (classType()) {
|
| case BorderImageSliceClass:
|
| toCSSBorderImageSliceValue(this)->~CSSBorderImageSliceValue();
|
| @@ -406,6 +424,9 @@ void CSSValue::finalizeGarbageCollectedObject()
|
|
|
| DEFINE_TRACE(CSSValue)
|
| {
|
| + if (isTaggedPtr())
|
| + return;
|
| +
|
| switch (classType()) {
|
| case BorderImageSliceClass:
|
| toCSSBorderImageSliceValue(this)->traceAfterDispatch(visitor);
|
| @@ -495,4 +516,4 @@ DEFINE_TRACE(CSSValue)
|
| ASSERT_NOT_REACHED();
|
| }
|
|
|
| -}
|
| +} // namespace blink
|
|
|