| Index: third_party/WebKit/Source/core/css/CSSValue.h
|
| diff --git a/third_party/WebKit/Source/core/css/CSSValue.h b/third_party/WebKit/Source/core/css/CSSValue.h
|
| index 69c3d0ac57366d6745d7c5416d0847d148fc85b9..310f0e8a52f175933d8ccbe3fc8d0579dde6d586 100644
|
| --- a/third_party/WebKit/Source/core/css/CSSValue.h
|
| +++ b/third_party/WebKit/Source/core/css/CSSValue.h
|
| @@ -31,6 +31,9 @@
|
|
|
| namespace blink {
|
|
|
| +class CSSDeserializeStream;
|
| +class CSSSerializeStream;
|
| +
|
| class CORE_EXPORT CSSValue : public RefCountedWillBeGarbageCollectedFinalized<CSSValue> {
|
| #if ENABLE(OILPAN)
|
| public:
|
| @@ -112,6 +115,9 @@ public:
|
|
|
| bool equals(const CSSValue&) const;
|
|
|
| + static PassRefPtrWillBeRawPtr<CSSValue> deserialize(CSSDeserializeStream*);
|
| + void serialize(CSSSerializeStream*) const;
|
| +
|
| void finalizeGarbageCollectedObject();
|
| DEFINE_INLINE_TRACE_AFTER_DISPATCH() { }
|
| DECLARE_TRACE();
|
| @@ -122,7 +128,8 @@ public:
|
| // 'source\wtf\refcounted.h' by using msvc.
|
| ~CSSValue() { }
|
|
|
| -protected:
|
| + // protected:
|
| +public:
|
| static const size_t ClassTypeBits = 6;
|
| enum ClassType {
|
| PrimitiveClass,
|
| @@ -212,13 +219,31 @@ protected:
|
| // to maximize struct packing.
|
|
|
| // CSSPrimitiveValue bits:
|
| - unsigned m_primitiveUnitType : 7; // CSSPrimitiveValue::UnitType
|
| - mutable unsigned m_hasCachedCSSText : 1;
|
| + union {
|
| + struct {
|
| + unsigned m_primitiveUnitType : 7; // CSSPrimitiveValue::UnitType
|
| + mutable unsigned m_hasCachedCSSText : 1;
|
|
|
| - unsigned m_valueListSeparator : ValueListSeparatorBits;
|
| + unsigned m_valueListSeparator : ValueListSeparatorBits;
|
|
|
| -private:
|
| - unsigned m_classType : ClassTypeBits; // ClassType
|
| + // private:
|
| + unsigned m_classType : ClassTypeBits; // ClassType
|
| + };
|
| + unsigned m_bitfields;
|
| + };
|
| +
|
| + union aaaa {
|
| + struct {
|
| + unsigned m_primitiveUnitType : 7; // CSSPrimitiveValue::UnitType
|
| + mutable unsigned m_hasCachedCSSText : 1;
|
| +
|
| + unsigned m_valueListSeparator : ValueListSeparatorBits;
|
| +
|
| + // private:
|
| + unsigned m_classType : ClassTypeBits; // ClassType
|
| + };
|
| + unsigned m_bitfields;
|
| + };
|
| };
|
|
|
| template<typename CSSValueType, size_t inlineCapacity>
|
| @@ -268,6 +293,23 @@ inline bool compareCSSValuePtr(const Member<CSSValueType>& first, const Member<C
|
| return first->equals(*second);
|
| }
|
|
|
| +template<typename T> class CSSSerializeTrait;
|
| +template<> class CSSSerializeTrait<CSSValue> {
|
| +public:
|
| + static void serializeNull(CSSSerializeStream*);
|
| + static void serializeNonNullHeader(CSSSerializeStream*) { }
|
| +};
|
| +
|
| +template<typename T> class CSSDeserializeTrait;
|
| +template<> class CSSDeserializeTrait<CSSValue> {
|
| +public:
|
| + static bool deserializeNonNullHeader(CSSDeserializeStream*)
|
| + {
|
| + // CSSValue::deserialize will return nullptr if needed.
|
| + return true;
|
| + }
|
| +};
|
| +
|
| #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \
|
| DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predicate)
|
|
|
|
|