WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch (depends on 71667)
bug-71668.diff (text/plain), 72.14 KB, created by
Andreas Kling
on 2011-11-07 05:01:18 PST
(
hide
)
Description:
Patch (depends on 71667)
Filename:
MIME Type:
Creator:
Andreas Kling
Created:
2011-11-07 05:01:18 PST
Size:
72.14 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8fda469..dded78f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,5 +1,133 @@ > 2011-11-06 Andreas Kling <kling@webkit.org> > >+ CSSValue: Devirtualize isFooValue() >+ <http://webkit.org/b/71668> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a member to CSSValue to determine which subclass a given >+ value object is, along with three bits to tell us whether the >+ value is primitive, a list, or mutable. >+ >+ All non-private subclass constructors now take a CSSValue::ClassType >+ as their first argument. A few constructors were duplicated as >+ private members to allow calling them from ::create() methods >+ without passing a ClassType. >+ >+ * css/CSSAspectRatioValue.h: >+ (WebCore::CSSAspectRatioValue::CSSAspectRatioValue): >+ * css/CSSBorderImageSliceValue.cpp: >+ (WebCore::CSSBorderImageSliceValue::CSSBorderImageSliceValue): >+ * css/CSSBorderImageSliceValue.h: >+ * css/CSSBorderImageValue.cpp: >+ (WebCore::CSSBorderImageValue::CSSBorderImageValue): >+ * css/CSSBorderImageValue.h: >+ * css/CSSCanvasValue.h: >+ (WebCore::CSSCanvasValue::CSSCanvasValue): >+ * css/CSSCrossfadeValue.h: >+ (WebCore::CSSCrossfadeValue::CSSCrossfadeValue): >+ * css/CSSCursorImageValue.cpp: >+ (WebCore::CSSCursorImageValue::CSSCursorImageValue): >+ * css/CSSCursorImageValue.h: >+ * css/CSSFlexValue.h: >+ (WebCore::CSSFlexValue::CSSFlexValue): >+ * css/CSSFontFaceSrcValue.h: >+ (WebCore::CSSFontFaceSrcValue::CSSFontFaceSrcValue): >+ * css/CSSFunctionValue.cpp: >+ (WebCore::CSSFunctionValue::CSSFunctionValue): >+ * css/CSSGradientValue.h: >+ (WebCore::CSSGradientValue::isLinearGradient): >+ (WebCore::CSSGradientValue::isRadialGradient): >+ (WebCore::CSSGradientValue::CSSGradientValue): >+ (WebCore::CSSLinearGradientValue::CSSLinearGradientValue): >+ (WebCore::CSSRadialGradientValue::CSSRadialGradientValue): >+ * css/CSSImageGeneratorValue.cpp: >+ (WebCore::CSSImageGeneratorValue::CSSImageGeneratorValue): >+ * css/CSSImageGeneratorValue.h: >+ * css/CSSImageValue.cpp: >+ (WebCore::CSSImageValue::CSSImageValue): >+ * css/CSSImageValue.h: >+ * css/CSSInheritedValue.h: >+ (WebCore::CSSInheritedValue::CSSInheritedValue): >+ * css/CSSInitialValue.h: >+ (WebCore::CSSInitialValue::CSSInitialValue): >+ (WebCore::CSSInitialValue::create): >+ * css/CSSLineBoxContainValue.cpp: >+ (WebCore::CSSLineBoxContainValue::CSSLineBoxContainValue): >+ * css/CSSLineBoxContainValue.h: >+ * css/CSSMutableValue.h: >+ (WebCore::CSSMutableValue::CSSMutableValue): >+ * css/CSSPrimitiveValue.cpp: >+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): >+ * css/CSSPrimitiveValue.h: >+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): >+ * css/CSSPrimitiveValueMappings.h: >+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): >+ * css/CSSReflectValue.h: >+ (WebCore::CSSReflectValue::CSSReflectValue): >+ * css/CSSTimingFunctionValue.h: >+ (WebCore::CSSTimingFunctionValue::isLinearTimingFunctionValue): >+ (WebCore::CSSTimingFunctionValue::isCubicBezierTimingFunctionValue): >+ (WebCore::CSSTimingFunctionValue::isStepsTimingFunctionValue): >+ (WebCore::CSSTimingFunctionValue::CSSTimingFunctionValue): >+ (WebCore::CSSLinearTimingFunctionValue::CSSLinearTimingFunctionValue): >+ (WebCore::CSSCubicBezierTimingFunctionValue::CSSCubicBezierTimingFunctionValue): >+ (WebCore::CSSStepsTimingFunctionValue::CSSStepsTimingFunctionValue): >+ * css/CSSUnicodeRangeValue.h: >+ (WebCore::CSSUnicodeRangeValue::CSSUnicodeRangeValue): >+ * css/CSSValue.h: >+ (WebCore::CSSValue::isMutableValue): >+ (WebCore::CSSValue::isPrimitiveValue): >+ (WebCore::CSSValue::isValueList): >+ (WebCore::CSSValue::isBorderImageValue): >+ (WebCore::CSSValue::isBorderImageSliceValue): >+ (WebCore::CSSValue::isCursorImageValue): >+ (WebCore::CSSValue::isFontFamilyValue): >+ (WebCore::CSSValue::isFontFeatureValue): >+ (WebCore::CSSValue::isFontValue): >+ (WebCore::CSSValue::isImageGeneratorValue): >+ (WebCore::CSSValue::isImageValue): >+ (WebCore::CSSValue::isImplicitInitialValue): >+ (WebCore::CSSValue::isReflectValue): >+ (WebCore::CSSValue::isShadowValue): >+ (WebCore::CSSValue::isTimingFunctionValue): >+ (WebCore::CSSValue::isWebKitCSSTransformValue): >+ (WebCore::CSSValue::isCSSLineBoxContainValue): >+ (WebCore::CSSValue::isFlexValue): >+ (WebCore::CSSValue::isWebKitCSSFilterValue): >+ (WebCore::CSSValue::isSVGColor): >+ (WebCore::CSSValue::isSVGPaint): >+ (WebCore::CSSValue::classType): >+ (WebCore::CSSValue::CSSValue): >+ * css/CSSValueList.cpp: >+ (WebCore::CSSValueList::CSSValueList): >+ * css/CSSValueList.h: >+ * css/FontFamilyValue.cpp: >+ (WebCore::FontFamilyValue::FontFamilyValue): >+ * css/FontFamilyValue.h: >+ * css/FontFeatureValue.cpp: >+ (WebCore::FontFeatureValue::FontFeatureValue): >+ * css/FontFeatureValue.h: >+ * css/FontValue.h: >+ (WebCore::FontValue::FontValue): >+ * css/ShadowValue.cpp: >+ (WebCore::ShadowValue::ShadowValue): >+ * css/ShadowValue.h: >+ * css/WebKitCSSFilterValue.cpp: >+ (WebCore::WebKitCSSFilterValue::WebKitCSSFilterValue): >+ * css/WebKitCSSFilterValue.h: >+ * css/WebKitCSSTransformValue.cpp: >+ (WebCore::WebKitCSSTransformValue::WebKitCSSTransformValue): >+ * css/WebKitCSSTransformValue.h: >+ * svg/SVGColor.cpp: >+ (WebCore::SVGColor::SVGColor): >+ * svg/SVGColor.h: >+ * svg/SVGPaint.cpp: >+ (WebCore::SVGPaint::SVGPaint): >+ * svg/SVGPaint.h: >+ >+2011-11-06 Andreas Kling <kling@webkit.org> >+ > CSSValue: Devirtualize cssValueType(). > <http://webkit.org/b/71667> > >diff --git a/Source/WebCore/css/CSSAspectRatioValue.h b/Source/WebCore/css/CSSAspectRatioValue.h >index fe0945e..37bec9d 100644 >--- a/Source/WebCore/css/CSSAspectRatioValue.h >+++ b/Source/WebCore/css/CSSAspectRatioValue.h >@@ -50,7 +50,8 @@ public: > > private: > CSSAspectRatioValue(float numeratorValue, float denominatorValue) >- : m_numeratorValue(numeratorValue) >+ : CSSValue(AspectRatioClass) >+ , m_numeratorValue(numeratorValue) > , m_denominatorValue(denominatorValue) > { > } >diff --git a/Source/WebCore/css/CSSBorderImageSliceValue.cpp b/Source/WebCore/css/CSSBorderImageSliceValue.cpp >index bce30aa..2755033 100644 >--- a/Source/WebCore/css/CSSBorderImageSliceValue.cpp >+++ b/Source/WebCore/css/CSSBorderImageSliceValue.cpp >@@ -32,7 +32,8 @@ > namespace WebCore { > > CSSBorderImageSliceValue::CSSBorderImageSliceValue(PassRefPtr<CSSPrimitiveValue> slices, bool fill) >- : m_slices(slices) >+ : CSSValue(BorderImageSliceClass, CSS_CUSTOM) >+ , m_slices(slices) > , m_fill(fill) > { > } >diff --git a/Source/WebCore/css/CSSBorderImageSliceValue.h b/Source/WebCore/css/CSSBorderImageSliceValue.h >index c6adbaa..b7f1f03 100644 >--- a/Source/WebCore/css/CSSBorderImageSliceValue.h >+++ b/Source/WebCore/css/CSSBorderImageSliceValue.h >@@ -53,7 +53,6 @@ public: > > private: > CSSBorderImageSliceValue(PassRefPtr<CSSPrimitiveValue> slices, bool fill); >- virtual bool isBorderImageSliceValue() const { return true; } > }; > > } // namespace WebCore >diff --git a/Source/WebCore/css/CSSBorderImageValue.cpp b/Source/WebCore/css/CSSBorderImageValue.cpp >index 825d0fb..c8c9881 100644 >--- a/Source/WebCore/css/CSSBorderImageValue.cpp >+++ b/Source/WebCore/css/CSSBorderImageValue.cpp >@@ -28,7 +28,8 @@ namespace WebCore { > > CSSBorderImageValue::CSSBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSBorderImageSliceValue> imageSlice, > PassRefPtr<CSSValue> borderSlice, PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat) >- : m_image(image) >+ : CSSValue(BorderImageClass, CSS_CUSTOM) >+ , m_image(image) > , m_imageSlice(imageSlice) > , m_borderSlice(borderSlice) > , m_outset(outset) >diff --git a/Source/WebCore/css/CSSBorderImageValue.h b/Source/WebCore/css/CSSBorderImageValue.h >index 6901a6a..c5fa879 100644 >--- a/Source/WebCore/css/CSSBorderImageValue.h >+++ b/Source/WebCore/css/CSSBorderImageValue.h >@@ -64,7 +64,6 @@ public: > private: > CSSBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSBorderImageSliceValue>, PassRefPtr<CSSValue> borderSlice, > PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat); >- virtual bool isBorderImageValue() const { return true; } > }; > > } // namespace WebCore >diff --git a/Source/WebCore/css/CSSCanvasValue.h b/Source/WebCore/css/CSSCanvasValue.h >index 6f38985..4cee2f7 100644 >--- a/Source/WebCore/css/CSSCanvasValue.h >+++ b/Source/WebCore/css/CSSCanvasValue.h >@@ -48,7 +48,8 @@ public: > > private: > CSSCanvasValue() >- : m_element(0) >+ : CSSImageGeneratorValue(CanvasClass) >+ , m_element(0) > { > } > >diff --git a/Source/WebCore/css/CSSCrossfadeValue.h b/Source/WebCore/css/CSSCrossfadeValue.h >index 565975a..403182e 100644 >--- a/Source/WebCore/css/CSSCrossfadeValue.h >+++ b/Source/WebCore/css/CSSCrossfadeValue.h >@@ -50,8 +50,9 @@ public: > > private: > CSSCrossfadeValue(PassRefPtr<CSSImageValue> fromImage, PassRefPtr<CSSImageValue> toImage) >- : m_fromImage(fromImage) >- , m_toImage(toImage) >+ : CSSImageGeneratorValue(CrossfadeClass) >+ , m_fromImage(fromImage) >+ , m_toImage(toImage) > { > } > >diff --git a/Source/WebCore/css/CSSCursorImageValue.cpp b/Source/WebCore/css/CSSCursorImageValue.cpp >index 24ef8ff..9d1fa2d 100644 >--- a/Source/WebCore/css/CSSCursorImageValue.cpp >+++ b/Source/WebCore/css/CSSCursorImageValue.cpp >@@ -54,7 +54,7 @@ static inline SVGCursorElement* resourceReferencedByCursorElement(const String& > #endif > > CSSCursorImageValue::CSSCursorImageValue(const String& url, const IntPoint& hotSpot) >- : CSSImageValue(url) >+ : CSSImageValue(CursorImageClass, url) > , m_hotSpot(hotSpot) > { > } >diff --git a/Source/WebCore/css/CSSCursorImageValue.h b/Source/WebCore/css/CSSCursorImageValue.h >index de03eb8..2a95c3ab 100644 >--- a/Source/WebCore/css/CSSCursorImageValue.h >+++ b/Source/WebCore/css/CSSCursorImageValue.h >@@ -50,7 +50,6 @@ public: > > private: > CSSCursorImageValue(const String& url, const IntPoint& hotSpot); >- virtual bool isCursorImageValue() const { return true; } > > IntPoint m_hotSpot; > >diff --git a/Source/WebCore/css/CSSFlexValue.h b/Source/WebCore/css/CSSFlexValue.h >index a03bffc..7ece574 100644 >--- a/Source/WebCore/css/CSSFlexValue.h >+++ b/Source/WebCore/css/CSSFlexValue.h >@@ -47,15 +47,14 @@ public: > > virtual String cssText() const; > >- virtual bool isFlexValue() const { return true; } >- > float positiveFlex() { return m_positiveFlex; } > float negativeFlex() { return m_negativeFlex; } > CSSPrimitiveValue* preferredSize() { return m_preferredSize.get(); } > > private: > CSSFlexValue(float positiveFlex, float negativeFlex, PassRefPtr<CSSPrimitiveValue> preferredSize) >- : m_positiveFlex(positiveFlex) >+ : CSSValue(FlexClass, CSS_CUSTOM) >+ , m_positiveFlex(positiveFlex) > , m_negativeFlex(negativeFlex) > , m_preferredSize(preferredSize) > { >diff --git a/Source/WebCore/css/CSSFontFaceSrcValue.h b/Source/WebCore/css/CSSFontFaceSrcValue.h >index baefb62..4442865 100644 >--- a/Source/WebCore/css/CSSFontFaceSrcValue.h >+++ b/Source/WebCore/css/CSSFontFaceSrcValue.h >@@ -68,7 +68,8 @@ public: > > private: > CSSFontFaceSrcValue(const String& resource, bool local) >- : m_resource(resource) >+ : CSSValue(FontFaceSrcClass) >+ , m_resource(resource) > , m_isLocal(local) > #if ENABLE(SVG_FONTS) > , m_svgFontFaceElement(0) >diff --git a/Source/WebCore/css/CSSFunctionValue.cpp b/Source/WebCore/css/CSSFunctionValue.cpp >index d33f204..493cbb2 100644 >--- a/Source/WebCore/css/CSSFunctionValue.cpp >+++ b/Source/WebCore/css/CSSFunctionValue.cpp >@@ -33,7 +33,8 @@ > namespace WebCore { > > CSSFunctionValue::CSSFunctionValue(CSSParserFunction* function) >- : m_name(function->name) >+ : CSSValue(FunctionClass) >+ , m_name(function->name) > { > if (function->args) > m_args = CSSValueList::createFromParserValueList(function->args.get()); >diff --git a/Source/WebCore/css/CSSGradientValue.h b/Source/WebCore/css/CSSGradientValue.h >index 44ee1c8..0711de2 100644 >--- a/Source/WebCore/css/CSSGradientValue.h >+++ b/Source/WebCore/css/CSSGradientValue.h >@@ -59,16 +59,17 @@ public: > > void sortStopsIfNeeded(); > >- virtual bool isLinearGradient() const { return false; } >- virtual bool isRadialGradient() const { return false; } >+ bool isLinearGradient() const { return classType() == LinearGradientClass; } >+ bool isRadialGradient() const { return classType() == RadialGradientClass; } > > bool isRepeating() const { return m_repeating; } > > bool deprecatedType() const { return m_deprecatedType; } // came from -webkit-gradient > > protected: >- CSSGradientValue(CSSGradientRepeat repeat, bool deprecatedType = false) >- : m_stopsSorted(false) >+ CSSGradientValue(ClassType classType, CSSGradientRepeat repeat, bool deprecatedType = false) >+ : CSSImageGeneratorValue(classType) >+ , m_stopsSorted(false) > , m_deprecatedType(deprecatedType) > , m_repeating(repeat == Repeating) > { >@@ -112,12 +113,10 @@ public: > > private: > CSSLinearGradientValue(CSSGradientRepeat repeat, bool deprecatedType = false) >- : CSSGradientValue(repeat, deprecatedType) >+ : CSSGradientValue(LinearGradientClass, repeat, deprecatedType) > { > } > >- virtual bool isLinearGradient() const { return true; } >- > // Create the gradient for a given size. > virtual PassRefPtr<Gradient> createGradient(RenderObject*, const IntSize&); > >@@ -144,12 +143,10 @@ public: > > private: > CSSRadialGradientValue(CSSGradientRepeat repeat, bool deprecatedType = false) >- : CSSGradientValue(repeat, deprecatedType) >+ : CSSGradientValue(RadialGradientClass, repeat, deprecatedType) > { > } > >- virtual bool isRadialGradient() const { return true; } >- > // Create the gradient for a given size. > virtual PassRefPtr<Gradient> createGradient(RenderObject*, const IntSize&); > >diff --git a/Source/WebCore/css/CSSImageGeneratorValue.cpp b/Source/WebCore/css/CSSImageGeneratorValue.cpp >index 4ef44f0..26178c1 100644 >--- a/Source/WebCore/css/CSSImageGeneratorValue.cpp >+++ b/Source/WebCore/css/CSSImageGeneratorValue.cpp >@@ -35,8 +35,9 @@ > > namespace WebCore { > >-CSSImageGeneratorValue::CSSImageGeneratorValue() >-: m_accessedImage(false) >+CSSImageGeneratorValue::CSSImageGeneratorValue(ClassType classType) >+ : CSSValue(classType, CSS_CUSTOM) >+ , m_accessedImage(false) > { > } > >diff --git a/Source/WebCore/css/CSSImageGeneratorValue.h b/Source/WebCore/css/CSSImageGeneratorValue.h >index fe391f5..bf993aa 100644 >--- a/Source/WebCore/css/CSSImageGeneratorValue.h >+++ b/Source/WebCore/css/CSSImageGeneratorValue.h >@@ -49,7 +49,7 @@ public: > virtual IntSize fixedSize(const RenderObject*) { return IntSize(); } > > protected: >- CSSImageGeneratorValue(); >+ CSSImageGeneratorValue(ClassType); > > Image* getImage(RenderObject*, const IntSize&); > void putImage(const IntSize&, PassRefPtr<Image>); >@@ -58,9 +58,6 @@ protected: > ImageBySizeCache m_imageCache; > RefPtr<StyleGeneratedImage> m_image; > bool m_accessedImage; >- >-private: >- virtual bool isImageGeneratorValue() const { return true; } > }; > > } // namespace WebCore >diff --git a/Source/WebCore/css/CSSImageValue.cpp b/Source/WebCore/css/CSSImageValue.cpp >index 0836b62..6fa6b9c 100644 >--- a/Source/WebCore/css/CSSImageValue.cpp >+++ b/Source/WebCore/css/CSSImageValue.cpp >@@ -31,15 +31,21 @@ > > namespace WebCore { > >+CSSImageValue::CSSImageValue() >+ : CSSPrimitiveValue(ImageClass, CSSValueNone) >+ , m_accessedImage(true) >+{ >+} >+ > CSSImageValue::CSSImageValue(const String& url) >- : CSSPrimitiveValue(url, CSS_URI) >+ : CSSPrimitiveValue(ImageClass, url, CSS_URI) > , m_accessedImage(false) > { > } > >-CSSImageValue::CSSImageValue() >- : CSSPrimitiveValue(CSSValueNone) >- , m_accessedImage(true) >+CSSImageValue::CSSImageValue(ClassType classType, const String& url) >+ : CSSPrimitiveValue(classType, url, CSS_URI) >+ , m_accessedImage(false) > { > } > >diff --git a/Source/WebCore/css/CSSImageValue.h b/Source/WebCore/css/CSSImageValue.h >index 7091eab..d82e19e 100644 >--- a/Source/WebCore/css/CSSImageValue.h >+++ b/Source/WebCore/css/CSSImageValue.h >@@ -43,7 +43,7 @@ public: > StyleImage* cachedOrPendingImage(); > > protected: >- CSSImageValue(const String& url); >+ CSSImageValue(ClassType, const String& url); > > StyleCachedImage* cachedImage(CachedResourceLoader*, const String& url); > String cachedImageURL(); >@@ -51,7 +51,7 @@ protected: > > private: > CSSImageValue(); >- virtual bool isImageValue() const { return true; } >+ CSSImageValue(const String& url); > > RefPtr<StyleImage> m_image; > bool m_accessedImage; >diff --git a/Source/WebCore/css/CSSInheritedValue.h b/Source/WebCore/css/CSSInheritedValue.h >index c1d9dec..f0beb97 100644 >--- a/Source/WebCore/css/CSSInheritedValue.h >+++ b/Source/WebCore/css/CSSInheritedValue.h >@@ -37,7 +37,7 @@ public: > > private: > CSSInheritedValue() >- : CSSValue(CSS_INHERIT) >+ : CSSValue(InheritedClass, CSS_INHERIT) > { > } > }; >diff --git a/Source/WebCore/css/CSSInitialValue.h b/Source/WebCore/css/CSSInitialValue.h >index cbbb5bf..5a069d4 100644 >--- a/Source/WebCore/css/CSSInitialValue.h >+++ b/Source/WebCore/css/CSSInitialValue.h >@@ -43,8 +43,7 @@ public: > > private: > CSSInitialValue(bool implicit) >- : CSSValue(CSS_INITIAL) >- , m_implicit(implicit) >+ : CSSValue(implicit ? ImplicitInitialClass : InitialClass, CSS_INITIAL) > { > } > >@@ -52,10 +51,6 @@ private: > { > return adoptRef(new CSSInitialValue(implicit)); > } >- >- virtual bool isImplicitInitialValue() const { return m_implicit; } >- >- bool m_implicit; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/css/CSSLineBoxContainValue.cpp b/Source/WebCore/css/CSSLineBoxContainValue.cpp >index b029285..02cad39 100644 >--- a/Source/WebCore/css/CSSLineBoxContainValue.cpp >+++ b/Source/WebCore/css/CSSLineBoxContainValue.cpp >@@ -32,7 +32,8 @@ > namespace WebCore { > > CSSLineBoxContainValue::CSSLineBoxContainValue(unsigned value) >- : m_value(value) >+ : CSSValue(LineBoxContainClass, CSS_CUSTOM) >+ , m_value(value) > { > } > >diff --git a/Source/WebCore/css/CSSLineBoxContainValue.h b/Source/WebCore/css/CSSLineBoxContainValue.h >index 8d62b11..be99b0b 100644 >--- a/Source/WebCore/css/CSSLineBoxContainValue.h >+++ b/Source/WebCore/css/CSSLineBoxContainValue.h >@@ -55,7 +55,6 @@ private: > > private: > CSSLineBoxContainValue(LineBoxContain); >- virtual bool isCSSLineBoxContainValue() const { return true; } > }; > > } // namespace >diff --git a/Source/WebCore/css/CSSMutableValue.h b/Source/WebCore/css/CSSMutableValue.h >index 8a3aa72..e49e6735 100644 >--- a/Source/WebCore/css/CSSMutableValue.h >+++ b/Source/WebCore/css/CSSMutableValue.h >@@ -27,13 +27,7 @@ namespace WebCore { > > class CSSMutableValue : public CSSValue { > public: >- CSSMutableValue() >- : m_node(0) >- { >- } >- > virtual ~CSSMutableValue() { } >- virtual bool isMutableValue() const { return true; } > > Node* node() const { return m_node; } > void setNode(Node* node) { m_node = node; } >@@ -45,6 +39,13 @@ public: > m_node->setNeedsStyleRecalc(FullStyleChange); > } > >+protected: >+ CSSMutableValue(ClassType classType) >+ : CSSValue(classType, CSS_CUSTOM, /* isPrimitive */ false, /* isList */ false, /* isMutable */ true) >+ , m_node(0) >+ { >+ } >+ > private: > Node* m_node; > }; >diff --git a/Source/WebCore/css/CSSPrimitiveValue.cpp b/Source/WebCore/css/CSSPrimitiveValue.cpp >index 2b99d30..89f6ed0 100644 >--- a/Source/WebCore/css/CSSPrimitiveValue.cpp >+++ b/Source/WebCore/css/CSSPrimitiveValue.cpp >@@ -164,7 +164,7 @@ static const AtomicString& valueOrPropertyName(int valueOrPropertyID) > } > > CSSPrimitiveValue::CSSPrimitiveValue() >- : CSSValue(CSS_PRIMITIVE_VALUE) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) > , m_type(0) > , m_hasCachedCSSText(false) > , m_isQuirkValue(false) >@@ -172,7 +172,16 @@ CSSPrimitiveValue::CSSPrimitiveValue() > } > > CSSPrimitiveValue::CSSPrimitiveValue(int ident) >- : CSSValue(CSS_PRIMITIVE_VALUE) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) >+ , m_hasCachedCSSText(false) >+ , m_isQuirkValue(false) >+{ >+ m_value.ident = ident; >+} >+ >+CSSPrimitiveValue::CSSPrimitiveValue(ClassType classType, int ident) >+ : CSSValue(classType, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) > , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > , m_isQuirkValue(false) >@@ -181,7 +190,7 @@ CSSPrimitiveValue::CSSPrimitiveValue(int ident) > } > > CSSPrimitiveValue::CSSPrimitiveValue(double num, UnitTypes type) >- : CSSValue(CSS_PRIMITIVE_VALUE) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) > , m_type(type) > , m_hasCachedCSSText(false) > , m_isQuirkValue(false) >@@ -191,7 +200,17 @@ CSSPrimitiveValue::CSSPrimitiveValue(double num, UnitTypes type) > } > > CSSPrimitiveValue::CSSPrimitiveValue(const String& str, UnitTypes type) >- : CSSValue(CSS_PRIMITIVE_VALUE) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(type) >+ , m_hasCachedCSSText(false) >+ , m_isQuirkValue(false) >+{ >+ if ((m_value.string = str.impl())) >+ m_value.string->ref(); >+} >+ >+CSSPrimitiveValue::CSSPrimitiveValue(ClassType classType, const String& str, UnitTypes type) >+ : CSSValue(classType, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) > , m_type(type) > , m_hasCachedCSSText(false) > , m_isQuirkValue(false) >@@ -201,7 +220,7 @@ CSSPrimitiveValue::CSSPrimitiveValue(const String& str, UnitTypes type) > } > > CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color) >- : CSSValue(CSS_PRIMITIVE_VALUE) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) > , m_type(CSS_RGBCOLOR) > , m_hasCachedCSSText(false) > , m_isQuirkValue(false) >@@ -210,7 +229,7 @@ CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color) > } > > CSSPrimitiveValue::CSSPrimitiveValue(const Length& length) >- : CSSValue(CSS_PRIMITIVE_VALUE) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) > , m_hasCachedCSSText(false) > , m_isQuirkValue(false) > { >diff --git a/Source/WebCore/css/CSSPrimitiveValue.h b/Source/WebCore/css/CSSPrimitiveValue.h >index aaba1f1..dc04b89 100644 >--- a/Source/WebCore/css/CSSPrimitiveValue.h >+++ b/Source/WebCore/css/CSSPrimitiveValue.h >@@ -216,18 +216,30 @@ public: > > protected: > // FIXME: int vs. unsigned overloading is too subtle to distinguish the color and identifier cases. >- CSSPrimitiveValue(int ident); >- CSSPrimitiveValue(double, UnitTypes); >- CSSPrimitiveValue(const String&, UnitTypes); >+ CSSPrimitiveValue(ClassType, int ident); >+ CSSPrimitiveValue(ClassType, const String&, UnitTypes); > > private: > CSSPrimitiveValue(); > CSSPrimitiveValue(unsigned color); // RGB value > CSSPrimitiveValue(const Length&); >+ CSSPrimitiveValue(double, UnitTypes); >+ CSSPrimitiveValue(int ident); >+ CSSPrimitiveValue(const String&, UnitTypes); > > template<typename T> CSSPrimitiveValue(T); // Defined in CSSPrimitiveValueMappings.h >- template<typename T> CSSPrimitiveValue(T* val) { init(PassRefPtr<T>(val)); } >- template<typename T> CSSPrimitiveValue(PassRefPtr<T> val) { init(val); } >+ >+ template<typename T> CSSPrimitiveValue(T* val) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ { >+ init(PassRefPtr<T>(val)); >+ } >+ >+ template<typename T> CSSPrimitiveValue(PassRefPtr<T> val) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ { >+ init(val); >+ } > > static void create(int); // compile-time guard > static void create(unsigned); // compile-time guard >@@ -250,8 +262,6 @@ private: > > double computeLengthDouble(RenderStyle* currentStyle, RenderStyle* rootStyle, double multiplier, bool computingFontSize); > >- virtual bool isPrimitiveValue() const { return true; } >- > signed m_type : UnitTypesBits; > mutable unsigned m_hasCachedCSSText : 1; > unsigned m_isQuirkValue : 1; >diff --git a/Source/WebCore/css/CSSPrimitiveValueMappings.h b/Source/WebCore/css/CSSPrimitiveValueMappings.h >index 7fafab3..35ccff0 100644 >--- a/Source/WebCore/css/CSSPrimitiveValueMappings.h >+++ b/Source/WebCore/css/CSSPrimitiveValueMappings.h >@@ -50,7 +50,8 @@ > namespace WebCore { > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(short i) >- : m_type(CSS_NUMBER) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_NUMBER) > , m_hasCachedCSSText(false) > { > m_value.num = static_cast<double>(i); >@@ -66,7 +67,8 @@ template<> inline CSSPrimitiveValue::operator short() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(unsigned short i) >- : m_type(CSS_NUMBER) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_NUMBER) > , m_hasCachedCSSText(false) > { > m_value.num = static_cast<double>(i); >@@ -82,7 +84,8 @@ template<> inline CSSPrimitiveValue::operator unsigned short() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(int i) >- : m_type(CSS_NUMBER) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_NUMBER) > , m_hasCachedCSSText(false) > { > m_value.num = static_cast<double>(i); >@@ -98,7 +101,8 @@ template<> inline CSSPrimitiveValue::operator int() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(unsigned i) >- : m_type(CSS_NUMBER) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_NUMBER) > , m_hasCachedCSSText(false) > { > m_value.num = static_cast<double>(i); >@@ -115,7 +119,8 @@ template<> inline CSSPrimitiveValue::operator unsigned() const > > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(float i) >- : m_type(CSS_NUMBER) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_NUMBER) > , m_hasCachedCSSText(false) > { > m_value.num = static_cast<double>(i); >@@ -131,7 +136,8 @@ template<> inline CSSPrimitiveValue::operator float() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColumnSpan columnSpan) >- : m_hasCachedCSSText(false) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_hasCachedCSSText(false) > { > switch (columnSpan) { > case ColumnSpanAll: >@@ -157,7 +163,8 @@ template<> inline CSSPrimitiveValue::operator ColumnSpan() const > > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(PrintColorAdjust value) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (value) { >@@ -185,7 +192,8 @@ template<> inline CSSPrimitiveValue::operator PrintColorAdjust() const > > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBorderStyle e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -237,7 +245,8 @@ template<> inline CSSPrimitiveValue::operator OutlineIsAuto() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CompositeOperator e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -319,7 +328,8 @@ template<> inline CSSPrimitiveValue::operator CompositeOperator() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ControlPart e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -508,7 +518,8 @@ template<> inline CSSPrimitiveValue::operator ControlPart() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBackfaceVisibility e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -536,7 +547,8 @@ template<> inline CSSPrimitiveValue::operator EBackfaceVisibility() const > > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFillAttachment e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -568,7 +580,8 @@ template<> inline CSSPrimitiveValue::operator EFillAttachment() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFillBox e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -609,7 +622,8 @@ template<> inline CSSPrimitiveValue::operator EFillBox() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFillRepeat e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -646,7 +660,8 @@ template<> inline CSSPrimitiveValue::operator EFillRepeat() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxAlignment e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -693,7 +708,8 @@ template<> inline CSSPrimitiveValue::operator EBoxAlignment() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxSizing e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -720,7 +736,8 @@ template<> inline CSSPrimitiveValue::operator EBoxSizing() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxDirection e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -747,7 +764,8 @@ template<> inline CSSPrimitiveValue::operator EBoxDirection() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxLines e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -774,7 +792,8 @@ template<> inline CSSPrimitiveValue::operator EBoxLines() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxOrient e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -803,7 +822,8 @@ template<> inline CSSPrimitiveValue::operator EBoxOrient() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ECaptionSide e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -840,7 +860,8 @@ template<> inline CSSPrimitiveValue::operator ECaptionSide() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EClear e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -877,7 +898,8 @@ template<> inline CSSPrimitiveValue::operator EClear() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ECursor e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1002,7 +1024,8 @@ template<> inline CSSPrimitiveValue::operator ECursor() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EDisplay e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1082,7 +1105,8 @@ template<> inline CSSPrimitiveValue::operator EDisplay() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EEmptyCell e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1109,7 +1133,8 @@ template<> inline CSSPrimitiveValue::operator EEmptyCell() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFlexAlign e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1151,7 +1176,8 @@ template<> inline CSSPrimitiveValue::operator EFlexAlign() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFlexPack e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1188,7 +1214,8 @@ template<> inline CSSPrimitiveValue::operator EFlexPack() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFlexFlow e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1225,7 +1252,8 @@ template<> inline CSSPrimitiveValue::operator EFlexFlow() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFloat e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1263,7 +1291,8 @@ template<> inline CSSPrimitiveValue::operator EFloat() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EKHTMLLineBreak e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1290,7 +1319,8 @@ template<> inline CSSPrimitiveValue::operator EKHTMLLineBreak() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStylePosition e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1309,7 +1339,8 @@ template<> inline CSSPrimitiveValue::operator EListStylePosition() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1570,7 +1601,8 @@ template<> inline CSSPrimitiveValue::operator EListStyleType() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarginCollapse e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1602,7 +1634,8 @@ template<> inline CSSPrimitiveValue::operator EMarginCollapse() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarqueeBehavior e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1639,7 +1672,8 @@ template<> inline CSSPrimitiveValue::operator EMarqueeBehavior() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(RegionOverflow e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1666,7 +1700,8 @@ template<> inline CSSPrimitiveValue::operator RegionOverflow() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarqueeDirection e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1720,7 +1755,8 @@ template<> inline CSSPrimitiveValue::operator EMarqueeDirection() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMatchNearestMailBlockquoteColor e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1747,7 +1783,8 @@ template<> inline CSSPrimitiveValue::operator EMatchNearestMailBlockquoteColor() > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ENBSPMode e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1774,7 +1811,8 @@ template<> inline CSSPrimitiveValue::operator ENBSPMode() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EOverflow e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1821,7 +1859,8 @@ template<> inline CSSPrimitiveValue::operator EOverflow() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPageBreak e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1855,7 +1894,8 @@ template<> inline CSSPrimitiveValue::operator EPageBreak() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPosition e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1892,7 +1932,8 @@ template<> inline CSSPrimitiveValue::operator EPosition() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EResize e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1932,7 +1973,8 @@ template<> inline CSSPrimitiveValue::operator EResize() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETableLayout e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -1959,7 +2001,8 @@ template<> inline CSSPrimitiveValue::operator ETableLayout() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextAlign e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2028,7 +2071,8 @@ template<> inline CSSPrimitiveValue::operator ETextDecoration() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextSecurity e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2065,7 +2109,8 @@ template<> inline CSSPrimitiveValue::operator ETextSecurity() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextTransform e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2102,7 +2147,8 @@ template<> inline CSSPrimitiveValue::operator ETextTransform() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EUnicodeBidi e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2144,7 +2190,8 @@ template<> inline CSSPrimitiveValue::operator EUnicodeBidi() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EUserDrag e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2176,7 +2223,8 @@ template<> inline CSSPrimitiveValue::operator EUserDrag() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EUserModify e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2198,7 +2246,8 @@ template<> inline CSSPrimitiveValue::operator EUserModify() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EUserSelect e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2227,7 +2276,8 @@ template<> inline CSSPrimitiveValue::operator EUserSelect() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EVerticalAlign a) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (a) { >@@ -2291,7 +2341,8 @@ template<> inline CSSPrimitiveValue::operator EVerticalAlign() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EVisibility e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2323,7 +2374,8 @@ template<> inline CSSPrimitiveValue::operator EVisibility() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EWhiteSpace e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2370,7 +2422,8 @@ template<> inline CSSPrimitiveValue::operator EWhiteSpace() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EWordBreak e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2402,7 +2455,8 @@ template<> inline CSSPrimitiveValue::operator EWordBreak() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EWordWrap e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2429,7 +2483,8 @@ template<> inline CSSPrimitiveValue::operator EWordWrap() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextDirection e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2456,7 +2511,8 @@ template<> inline CSSPrimitiveValue::operator TextDirection() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(WritingMode e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2493,7 +2549,8 @@ template<> inline CSSPrimitiveValue::operator WritingMode() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextCombine e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2520,7 +2577,8 @@ template<> inline CSSPrimitiveValue::operator TextCombine() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextEmphasisPosition position) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (position) { >@@ -2547,7 +2605,8 @@ template<> inline CSSPrimitiveValue::operator TextEmphasisPosition() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextOverflow overflow) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (overflow) { >@@ -2574,7 +2633,8 @@ template<> inline CSSPrimitiveValue::operator TextOverflow() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextEmphasisFill fill) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (fill) { >@@ -2601,7 +2661,8 @@ template<> inline CSSPrimitiveValue::operator TextEmphasisFill() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextEmphasisMark mark) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (mark) { >@@ -2651,7 +2712,8 @@ template<> inline CSSPrimitiveValue::operator TextEmphasisMark() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextOrientation e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2678,7 +2740,8 @@ template<> inline CSSPrimitiveValue::operator TextOrientation() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPointerEvents e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2745,7 +2808,8 @@ template<> inline CSSPrimitiveValue::operator EPointerEvents() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontSmoothingMode smoothing) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (smoothing) { >@@ -2785,7 +2849,8 @@ template<> inline CSSPrimitiveValue::operator FontSmoothingMode() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontWeight weight) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (weight) { >@@ -2854,7 +2919,8 @@ template<> inline CSSPrimitiveValue::operator FontWeight() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontItalic italic) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (italic) { >@@ -2885,7 +2951,8 @@ template<> inline CSSPrimitiveValue::operator FontItalic() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontSmallCaps smallCaps) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (smallCaps) { >@@ -2914,7 +2981,8 @@ template<> inline CSSPrimitiveValue::operator FontSmallCaps() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextRenderingMode e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -2951,7 +3019,8 @@ template<> inline CSSPrimitiveValue::operator TextRenderingMode() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColorSpace space) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (space) { >@@ -2983,7 +3052,8 @@ template<> inline CSSPrimitiveValue::operator ColorSpace() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Hyphens hyphens) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (hyphens) { >@@ -3015,7 +3085,8 @@ template<> inline CSSPrimitiveValue::operator Hyphens() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ESpeak e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3054,7 +3125,8 @@ template<> inline CSSPrimitiveValue::operator Order() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Order e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3091,7 +3163,8 @@ template<> inline CSSPrimitiveValue::operator ESpeak() const > #if ENABLE(SVG) > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineCap e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3123,7 +3196,8 @@ template<> inline CSSPrimitiveValue::operator LineCap() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineJoin e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3155,7 +3229,8 @@ template<> inline CSSPrimitiveValue::operator LineJoin() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(WindRule e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3183,7 +3258,8 @@ template<> inline CSSPrimitiveValue::operator WindRule() const > > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EAlignmentBaseline e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3262,7 +3338,8 @@ template<> inline CSSPrimitiveValue::operator EAlignmentBaseline() const > #endif > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBorderCollapse e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3289,7 +3366,8 @@ template<> inline CSSPrimitiveValue::operator EBorderCollapse() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBorderFit e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3316,7 +3394,8 @@ template<> inline CSSPrimitiveValue::operator EBorderFit() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EImageRendering e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3353,7 +3432,8 @@ template<> inline CSSPrimitiveValue::operator EImageRendering() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETransformStyle3D e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3380,7 +3460,8 @@ template<> inline CSSPrimitiveValue::operator ETransformStyle3D() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColumnAxis e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3414,7 +3495,8 @@ template<> inline CSSPrimitiveValue::operator ColumnAxis() const > #if ENABLE(SVG) > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EColorInterpolation e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3446,7 +3528,8 @@ template<> inline CSSPrimitiveValue::operator EColorInterpolation() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EColorRendering e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3478,7 +3561,8 @@ template<> inline CSSPrimitiveValue::operator EColorRendering() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EDominantBaseline e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3555,7 +3639,8 @@ template<> inline CSSPrimitiveValue::operator EDominantBaseline() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EShapeRendering e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3592,7 +3677,8 @@ template<> inline CSSPrimitiveValue::operator EShapeRendering() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextAnchor e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3624,7 +3710,8 @@ template<> inline CSSPrimitiveValue::operator ETextAnchor() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(SVGWritingMode e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >@@ -3671,7 +3758,8 @@ template<> inline CSSPrimitiveValue::operator SVGWritingMode() const > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EVectorEffect e) >- : m_type(CSS_IDENT) >+ : CSSValue(PrimitiveClass, CSS_PRIMITIVE_VALUE, /* isPrimitive */ true) >+ , m_type(CSS_IDENT) > , m_hasCachedCSSText(false) > { > switch (e) { >diff --git a/Source/WebCore/css/CSSReflectValue.h b/Source/WebCore/css/CSSReflectValue.h >index 58076ea..d305adf 100644 >--- a/Source/WebCore/css/CSSReflectValue.h >+++ b/Source/WebCore/css/CSSReflectValue.h >@@ -52,16 +52,14 @@ public: > virtual void addSubresourceStyleURLs(ListHashSet<KURL>&, const CSSStyleSheet*); > > private: >- CSSReflectValue(CSSReflectionDirection direction, >- PassRefPtr<CSSPrimitiveValue> offset, PassRefPtr<CSSValue> mask) >- : m_direction(direction) >+ CSSReflectValue(CSSReflectionDirection direction, PassRefPtr<CSSPrimitiveValue> offset, PassRefPtr<CSSValue> mask) >+ : CSSValue(ReflectClass, CSS_CUSTOM) >+ , m_direction(direction) > , m_offset(offset) > , m_mask(mask) > { > } > >- virtual bool isReflectValue() const { return true; } >- > CSSReflectionDirection m_direction; > RefPtr<CSSPrimitiveValue> m_offset; > RefPtr<CSSValue> m_mask; >diff --git a/Source/WebCore/css/CSSTimingFunctionValue.h b/Source/WebCore/css/CSSTimingFunctionValue.h >index e3691f4..69bd515 100644 >--- a/Source/WebCore/css/CSSTimingFunctionValue.h >+++ b/Source/WebCore/css/CSSTimingFunctionValue.h >@@ -35,16 +35,15 @@ class CSSTimingFunctionValue : public CSSValue { > public: > virtual String cssText() const = 0; > >- virtual bool isLinearTimingFunctionValue() const { return false; } >- virtual bool isCubicBezierTimingFunctionValue() const { return false; } >- virtual bool isStepsTimingFunctionValue() const { return false; } >+ bool isLinearTimingFunctionValue() const { return classType() == LinearTimingFunctionClass; } >+ bool isCubicBezierTimingFunctionValue() const { return classType() == CubicBezierTimingFunctionClass; } >+ bool isStepsTimingFunctionValue() const { return classType() == StepsTimingFunctionClass; } > > protected: >- CSSTimingFunctionValue() >+ CSSTimingFunctionValue(ClassType classType) >+ : CSSValue(classType, CSS_CUSTOM) > { > } >- >- virtual bool isTimingFunctionValue() const { return true; } > }; > > class CSSLinearTimingFunctionValue : public CSSTimingFunctionValue { >@@ -56,12 +55,11 @@ public: > > private: > CSSLinearTimingFunctionValue() >+ : CSSTimingFunctionValue(LinearTimingFunctionClass) > { > } > > virtual String cssText() const; >- >- virtual bool isLinearTimingFunctionValue() const { return true; } > }; > > class CSSCubicBezierTimingFunctionValue : public CSSTimingFunctionValue { >@@ -78,7 +76,8 @@ public: > > private: > CSSCubicBezierTimingFunctionValue(double x1, double y1, double x2, double y2) >- : m_x1(x1) >+ : CSSTimingFunctionValue(CubicBezierTimingFunctionClass) >+ , m_x1(x1) > , m_y1(y1) > , m_x2(x2) > , m_y2(y2) >@@ -87,8 +86,6 @@ private: > > virtual String cssText() const; > >- virtual bool isCubicBezierTimingFunctionValue() const { return true; } >- > double m_x1; > double m_y1; > double m_x2; >@@ -107,15 +104,14 @@ public: > > private: > CSSStepsTimingFunctionValue(int steps, bool stepAtStart) >- : m_steps(steps) >+ : CSSTimingFunctionValue(StepsTimingFunctionClass) >+ , m_steps(steps) > , m_stepAtStart(stepAtStart) > { > } > > virtual String cssText() const; > >- virtual bool isStepsTimingFunctionValue() const { return true; } >- > int m_steps; > bool m_stepAtStart; > }; >diff --git a/Source/WebCore/css/CSSUnicodeRangeValue.h b/Source/WebCore/css/CSSUnicodeRangeValue.h >index 2f2c012..458bf1a 100644 >--- a/Source/WebCore/css/CSSUnicodeRangeValue.h >+++ b/Source/WebCore/css/CSSUnicodeRangeValue.h >@@ -48,7 +48,8 @@ public: > > private: > CSSUnicodeRangeValue(UChar32 from, UChar32 to) >- : m_from(from) >+ : CSSValue(UnicodeRangeClass) >+ , m_from(from) > , m_to(to) > { > } >diff --git a/Source/WebCore/css/CSSValue.h b/Source/WebCore/css/CSSValue.h >index 6283932..4ee96ae 100644 >--- a/Source/WebCore/css/CSSValue.h >+++ b/Source/WebCore/css/CSSValue.h >@@ -49,45 +49,97 @@ public: > virtual String cssText() const = 0; > void setCssText(const String&, ExceptionCode&) { } // FIXME: Not implemented. > >- virtual bool isMutableValue() const { return false; } >- >- virtual bool isBorderImageValue() const { return false; } >- virtual bool isBorderImageSliceValue() const { return false; } >- virtual bool isCursorImageValue() const { return false; } >+ bool isMutableValue() const { return m_isMutableValue; } >+ bool isPrimitiveValue() const { return m_isPrimitiveValue; } >+ bool isValueList() const { return m_isValueList; } >+ >+ bool isBorderImageValue() const { return m_classType == BorderImageClass; } >+ bool isBorderImageSliceValue() const { return m_classType == BorderImageSliceClass; } >+ bool isCursorImageValue() const { return m_classType == CursorImageClass; } >+ bool isFontFamilyValue() const { return m_classType == FontFamilyClass; } >+ bool isFontFeatureValue() const { return m_classType == FontFeatureClass; } >+ bool isFontValue() const { return m_classType == FontClass; } >+ bool isImageGeneratorValue() const { return m_classType == CanvasClass || m_classType == CrossfadeClass || m_classType == LinearGradientClass || m_classType == RadialGradientClass; } >+ bool isImageValue() const { return m_classType == ImageClass || m_classType == CursorImageClass; } >+ bool isImplicitInitialValue() const { return m_classType == ImplicitInitialClass; } >+ bool isReflectValue() const { return m_classType == ReflectClass; } >+ bool isShadowValue() const { return m_classType == ShadowClass; } >+ bool isTimingFunctionValue() const { return m_classType == CubicBezierTimingFunctionClass || m_classType == LinearTimingFunctionClass || m_classType == StepsTimingFunctionClass; } >+ bool isWebKitCSSTransformValue() const { return m_classType == WebKitCSSTransformClass; } >+ bool isCSSLineBoxContainValue() const { return m_classType == LineBoxContainClass; } > #if ENABLE(CSS3_FLEXBOX) >- virtual bool isFlexValue() const { return false; } >+ bool isFlexValue() const { return m_classType == FlexClass; } > #endif >- virtual bool isFontFamilyValue() const { return false; } >- virtual bool isFontFeatureValue() const { return false; } >- virtual bool isFontValue() const { return false; } >- virtual bool isImageGeneratorValue() const { return false; } >- virtual bool isImageValue() const { return false; } >- virtual bool isImplicitInitialValue() const { return false; } >- virtual bool isPrimitiveValue() const { return false; } >- virtual bool isReflectValue() const { return false; } >- virtual bool isShadowValue() const { return false; } >- virtual bool isTimingFunctionValue() const { return false; } >- virtual bool isValueList() const { return false; } >- virtual bool isWebKitCSSTransformValue() const { return false; } >- virtual bool isCSSLineBoxContainValue() const { return false; } > #if ENABLE(CSS_FILTERS) >- virtual bool isWebKitCSSFilterValue() const { return false; } >+ bool isWebKitCSSFilterValue() const { return m_classType == WebKitCSSFilterClass; } > #endif > #if ENABLE(SVG) >- virtual bool isSVGColor() const { return false; } >- virtual bool isSVGPaint() const { return false; } >+ bool isSVGColor() const { return m_classType == SVGColorClass || m_classType == SVGPaintClass; } >+ bool isSVGPaint() const { return m_classType == SVGPaintClass; } > #endif > > virtual void addSubresourceStyleURLs(ListHashSet<KURL>&, const CSSStyleSheet*) { } > > protected: >- CSSValue(Type type = CSS_CUSTOM) >+ >+ enum ClassType { >+ UnknownClass, >+ AspectRatioClass, >+ BorderImageClass, >+ BorderImageSliceClass, >+ CanvasClass, >+ CursorImageClass, >+ FontFamilyClass, >+ FontFeatureClass, >+ FontClass, >+ FontFaceSrcClass, >+ FunctionClass, >+ LinearGradientClass, >+ RadialGradientClass, >+ CrossfadeClass, >+ ImageClass, >+ InheritedClass, >+ InitialClass, >+ ImplicitInitialClass, >+ PrimitiveClass, >+ ReflectClass, >+ ShadowClass, >+ LinearTimingFunctionClass, >+ CubicBezierTimingFunctionClass, >+ StepsTimingFunctionClass, >+ UnicodeRangeClass, >+ ValueListClass, >+ WebKitCSSTransformClass, >+ LineBoxContainClass, >+#if ENABLE(CSS3_FLEXBOX) >+ FlexClass, >+#endif >+#if ENABLE(CSS_FILTERS) >+ WebKitCSSFilterClass, >+#endif >+#if ENABLE(SVG) >+ SVGColorClass, >+ SVGPaintClass, >+#endif >+ }; >+ >+ ClassType classType() const { return static_cast<ClassType>(m_classType); } >+ >+ CSSValue(ClassType classType, Type type = CSS_CUSTOM, bool isPrimitive = false, bool isList = false, bool isMutable = false) > : m_type(type) >+ , m_classType(classType) >+ , m_isPrimitiveValue(isPrimitive) >+ , m_isMutableValue(isMutable) >+ , m_isValueList(isList) > { > } > > private: > unsigned m_type : 3; // Type >+ unsigned m_classType : 5; // ClassType >+ bool m_isPrimitiveValue : 1; >+ bool m_isMutableValue : 1; >+ bool m_isValueList : 1; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/css/CSSValueList.cpp b/Source/WebCore/css/CSSValueList.cpp >index 591b2a8..00d430f 100644 >--- a/Source/WebCore/css/CSSValueList.cpp >+++ b/Source/WebCore/css/CSSValueList.cpp >@@ -28,13 +28,13 @@ > namespace WebCore { > > CSSValueList::CSSValueList(bool isSpaceSeparated) >- : CSSValue(CSS_VALUE_LIST) >+ : CSSValue(ValueListClass, CSS_VALUE_LIST, /* isPrimitive */ false, /* isList */ true) > , m_isSpaceSeparated(isSpaceSeparated) > { > } > > CSSValueList::CSSValueList(CSSParserValueList* list) >- : CSSValue(CSS_VALUE_LIST) >+ : CSSValue(ValueListClass, CSS_VALUE_LIST, /* isPrimitive */ false, /* isList */ true) > , m_isSpaceSeparated(true) > { > if (list) { >@@ -44,6 +44,12 @@ CSSValueList::CSSValueList(CSSParserValueList* list) > } > } > >+CSSValueList::CSSValueList(ClassType classType, bool isSpaceSeparated) >+ : CSSValue(classType, CSS_VALUE_LIST, /* isPrimitive */ false, /* isList */ true) >+ , m_isSpaceSeparated(isSpaceSeparated) >+{ >+} >+ > CSSValueList::~CSSValueList() > { > } >diff --git a/Source/WebCore/css/CSSValueList.h b/Source/WebCore/css/CSSValueList.h >index 2423d5b..1f2a575 100644 >--- a/Source/WebCore/css/CSSValueList.h >+++ b/Source/WebCore/css/CSSValueList.h >@@ -61,11 +61,11 @@ public: > virtual void addSubresourceStyleURLs(ListHashSet<KURL>&, const CSSStyleSheet*); > > protected: >- CSSValueList(bool isSpaceSeparated); >- CSSValueList(CSSParserValueList*); >+ CSSValueList(ClassType, bool isSpaceSeparated); > > private: >- virtual bool isValueList() const { return true; } >+ CSSValueList(bool isSpaceSeparated); >+ CSSValueList(CSSParserValueList*); > > Vector<RefPtr<CSSValue> > m_values; > bool m_isSpaceSeparated; >diff --git a/Source/WebCore/css/FontFamilyValue.cpp b/Source/WebCore/css/FontFamilyValue.cpp >index ebe9645..5d83fb1 100644 >--- a/Source/WebCore/css/FontFamilyValue.cpp >+++ b/Source/WebCore/css/FontFamilyValue.cpp >@@ -26,7 +26,7 @@ > namespace WebCore { > > FontFamilyValue::FontFamilyValue(const String& familyName) >- : CSSPrimitiveValue(String(), CSS_STRING) >+ : CSSPrimitiveValue(FontFamilyClass, String(), CSS_STRING) > , m_familyName(familyName) > { > // If there is anything in parentheses or square brackets at the end, delete it. >diff --git a/Source/WebCore/css/FontFamilyValue.h b/Source/WebCore/css/FontFamilyValue.h >index 3f7d3a3..087d22a 100644 >--- a/Source/WebCore/css/FontFamilyValue.h >+++ b/Source/WebCore/css/FontFamilyValue.h >@@ -41,7 +41,6 @@ public: > > private: > FontFamilyValue(const String& familyName); >- virtual bool isFontFamilyValue() const { return true; } > > String m_familyName; > }; >diff --git a/Source/WebCore/css/FontFeatureValue.cpp b/Source/WebCore/css/FontFeatureValue.cpp >index ce684bf..9c15d1b 100644 >--- a/Source/WebCore/css/FontFeatureValue.cpp >+++ b/Source/WebCore/css/FontFeatureValue.cpp >@@ -33,7 +33,8 @@ > namespace WebCore { > > FontFeatureValue::FontFeatureValue(const String& tag, int value) >- : m_tag(tag) >+ : CSSValue(FontFeatureClass, CSS_CUSTOM) >+ , m_tag(tag) > , m_value(value) > { > } >diff --git a/Source/WebCore/css/FontFeatureValue.h b/Source/WebCore/css/FontFeatureValue.h >index 55f4127..30b0dfb 100644 >--- a/Source/WebCore/css/FontFeatureValue.h >+++ b/Source/WebCore/css/FontFeatureValue.h >@@ -44,7 +44,6 @@ public: > > private: > FontFeatureValue(const String&, int); >- virtual bool isFontFeatureValue() const { return true; } > > String m_tag; > const int m_value; >diff --git a/Source/WebCore/css/FontValue.h b/Source/WebCore/css/FontValue.h >index 5c7406c..dce388a 100644 >--- a/Source/WebCore/css/FontValue.h >+++ b/Source/WebCore/css/FontValue.h >@@ -47,9 +47,10 @@ public: > RefPtr<CSSValueList> family; > > private: >- FontValue() { } >- >- virtual bool isFontValue() const { return true; } >+ FontValue() >+ : CSSValue(FontClass, CSS_CUSTOM) >+ { >+ } > }; > > } // namespace >diff --git a/Source/WebCore/css/ShadowValue.cpp b/Source/WebCore/css/ShadowValue.cpp >index 060a322..00d80c4 100644 >--- a/Source/WebCore/css/ShadowValue.cpp >+++ b/Source/WebCore/css/ShadowValue.cpp >@@ -32,7 +32,8 @@ ShadowValue::ShadowValue(PassRefPtr<CSSPrimitiveValue> _x, > PassRefPtr<CSSPrimitiveValue> _spread, > PassRefPtr<CSSPrimitiveValue> _style, > PassRefPtr<CSSPrimitiveValue> _color) >- : x(_x) >+ : CSSValue(ShadowClass, CSS_CUSTOM) >+ , x(_x) > , y(_y) > , blur(_blur) > , spread(_spread) >diff --git a/Source/WebCore/css/ShadowValue.h b/Source/WebCore/css/ShadowValue.h >index fab1071..a88a0e7 100644 >--- a/Source/WebCore/css/ShadowValue.h >+++ b/Source/WebCore/css/ShadowValue.h >@@ -58,8 +58,6 @@ private: > PassRefPtr<CSSPrimitiveValue> spread, > PassRefPtr<CSSPrimitiveValue> style, > PassRefPtr<CSSPrimitiveValue> color); >- >- virtual bool isShadowValue() const { return true; } > }; > > } // namespace >diff --git a/Source/WebCore/css/WebKitCSSFilterValue.cpp b/Source/WebCore/css/WebKitCSSFilterValue.cpp >index 2505831..105005e 100644 >--- a/Source/WebCore/css/WebKitCSSFilterValue.cpp >+++ b/Source/WebCore/css/WebKitCSSFilterValue.cpp >@@ -35,7 +35,7 @@ > namespace WebCore { > > WebKitCSSFilterValue::WebKitCSSFilterValue(FilterOperationType operationType) >- : CSSValueList(true) >+ : CSSValueList(WebKitCSSFilterClass, true) > , m_type(operationType) > { > } >diff --git a/Source/WebCore/css/WebKitCSSFilterValue.h b/Source/WebCore/css/WebKitCSSFilterValue.h >index d4d08e1..48f1a7c 100644 >--- a/Source/WebCore/css/WebKitCSSFilterValue.h >+++ b/Source/WebCore/css/WebKitCSSFilterValue.h >@@ -66,8 +66,6 @@ public: > private: > WebKitCSSFilterValue(FilterOperationType); > >- virtual bool isWebKitCSSFilterValue() const { return true; } >- > FilterOperationType m_type; > }; > >diff --git a/Source/WebCore/css/WebKitCSSTransformValue.cpp b/Source/WebCore/css/WebKitCSSTransformValue.cpp >index 7620424..a56a9d1 100644 >--- a/Source/WebCore/css/WebKitCSSTransformValue.cpp >+++ b/Source/WebCore/css/WebKitCSSTransformValue.cpp >@@ -33,7 +33,7 @@ > namespace WebCore { > > WebKitCSSTransformValue::WebKitCSSTransformValue(TransformOperationType op) >- : CSSValueList(false) >+ : CSSValueList(WebKitCSSTransformClass, false) > , m_type(op) > { > } >diff --git a/Source/WebCore/css/WebKitCSSTransformValue.h b/Source/WebCore/css/WebKitCSSTransformValue.h >index 858096a..d7cd4cc 100644 >--- a/Source/WebCore/css/WebKitCSSTransformValue.h >+++ b/Source/WebCore/css/WebKitCSSTransformValue.h >@@ -74,8 +74,6 @@ public: > private: > WebKitCSSTransformValue(TransformOperationType); > >- virtual bool isWebKitCSSTransformValue() const { return true; } >- > TransformOperationType m_type; > }; > >diff --git a/Source/WebCore/svg/SVGColor.cpp b/Source/WebCore/svg/SVGColor.cpp >index 911d02f..2c3a762 100644 >--- a/Source/WebCore/svg/SVGColor.cpp >+++ b/Source/WebCore/svg/SVGColor.cpp >@@ -30,8 +30,15 @@ > > namespace WebCore { > >+SVGColor::SVGColor(ClassType classType, const SVGColorType& colorType) >+ : CSSMutableValue(classType) >+ , m_colorType(colorType) >+{ >+} >+ > SVGColor::SVGColor(const SVGColorType& colorType) >- : m_colorType(colorType) >+ : CSSMutableValue(SVGColorClass) >+ , m_colorType(colorType) > { > } > >diff --git a/Source/WebCore/svg/SVGColor.h b/Source/WebCore/svg/SVGColor.h >index 58dc704..daed83d 100644 >--- a/Source/WebCore/svg/SVGColor.h >+++ b/Source/WebCore/svg/SVGColor.h >@@ -72,7 +72,7 @@ public: > protected: > friend class CSSComputedStyleDeclaration; > >- SVGColor(const SVGColorType&); >+ SVGColor(ClassType, const SVGColorType&); > virtual ~SVGColor() { } > virtual String cssText() const; > >@@ -80,7 +80,7 @@ protected: > void setColorType(const SVGColorType& type) { m_colorType = type; } > > private: >- virtual bool isSVGColor() const { return true; } >+ SVGColor(const SVGColorType&); > > Color m_color; > SVGColorType m_colorType; >diff --git a/Source/WebCore/svg/SVGPaint.cpp b/Source/WebCore/svg/SVGPaint.cpp >index 565aa08..863ce6a 100644 >--- a/Source/WebCore/svg/SVGPaint.cpp >+++ b/Source/WebCore/svg/SVGPaint.cpp >@@ -54,7 +54,7 @@ static inline SVGColor::SVGColorType colorTypeForPaintType(const SVGPaint::SVGPa > } > > SVGPaint::SVGPaint(const SVGPaintType& paintType, const String& uri) >- : SVGColor(colorTypeForPaintType(paintType)) >+ : SVGColor(SVGPaintClass, colorTypeForPaintType(paintType)) > , m_paintType(paintType) > , m_uri(uri) > { >diff --git a/Source/WebCore/svg/SVGPaint.h b/Source/WebCore/svg/SVGPaint.h >index e591c7a..620784d 100644 >--- a/Source/WebCore/svg/SVGPaint.h >+++ b/Source/WebCore/svg/SVGPaint.h >@@ -106,7 +106,6 @@ private: > private: > SVGPaint(const SVGPaintType&, const String& uri = String()); > >- virtual bool isSVGPaint() const { return true; } > virtual String cssText() const; > > SVGPaintType m_paintType;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
koivisto
:
review-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 71668
:
113847
|
113904