| Index: Source/core/css/CSSGradientValue.h
|
| diff --git a/Source/core/css/CSSGradientValue.h b/Source/core/css/CSSGradientValue.h
|
| index 4bd4162f5d6f395143c25787b084a32de3eef653..c3ee0f12edae071c59d9a7cccea91e81cc6a0d42 100644
|
| --- a/Source/core/css/CSSGradientValue.h
|
| +++ b/Source/core/css/CSSGradientValue.h
|
| @@ -55,13 +55,13 @@ struct CSSGradientColorStop {
|
| ALLOW_ONLY_INLINE_ALLOCATION();
|
| public:
|
| CSSGradientColorStop() : m_colorIsDerivedFromElement(false) { }
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_position; // percentage or length
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_color;
|
| + NullableCSSValue m_position; // percentage or length
|
| + NullableCSSValue m_color;
|
| bool m_colorIsDerivedFromElement;
|
| bool operator==(const CSSGradientColorStop& other) const
|
| {
|
| - return compareCSSValuePtr(m_color, other.m_color)
|
| - && compareCSSValuePtr(m_position, other.m_position);
|
| + return m_color == other.m_color
|
| + && m_position == other.m_position;
|
| }
|
| bool isHint() const
|
| {
|
| @@ -85,10 +85,10 @@ class CSSGradientValue : public CSSImageGeneratorValue {
|
| public:
|
| PassRefPtr<Image> image(LayoutObject*, const IntSize&);
|
|
|
| - void setFirstX(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_firstX = val; }
|
| - void setFirstY(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_firstY = val; }
|
| - void setSecondX(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_secondX = val; }
|
| - void setSecondY(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_secondY = val; }
|
| + void setFirstX(NullableCSSValue val) { m_firstX = val; }
|
| + void setFirstY(NullableCSSValue val) { m_firstY = val; }
|
| + void setSecondX(NullableCSSValue val) { m_secondX = val; }
|
| + void setSecondY(NullableCSSValue val) { m_secondY = val; }
|
|
|
| void addStop(const CSSGradientColorStop& stop) { m_stops.append(stop); }
|
|
|
| @@ -136,16 +136,16 @@ protected:
|
| void addDeprecatedStops(Gradient*, const LayoutObject&);
|
|
|
| // Resolve points/radii to front end values.
|
| - FloatPoint computeEndPoint(CSSPrimitiveValue*, CSSPrimitiveValue*, const CSSToLengthConversionData&, const IntSize&);
|
| + FloatPoint computeEndPoint(NullableCSSValue, NullableCSSValue, const CSSToLengthConversionData&, const IntSize&);
|
|
|
| bool isCacheable() const;
|
|
|
| // Points. Some of these may be null.
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_firstX;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_firstY;
|
| + NullableCSSValue m_firstX;
|
| + NullableCSSValue m_firstY;
|
|
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_secondX;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_secondY;
|
| + NullableCSSValue m_secondX;
|
| + NullableCSSValue m_secondY;
|
|
|
| // Stops
|
| WillBeHeapVector<CSSGradientColorStop, 2> m_stops;
|
| @@ -164,7 +164,7 @@ public:
|
| return adoptRefWillBeNoop(new CSSLinearGradientValue(repeat, gradientType));
|
| }
|
|
|
| - void setAngle(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_angle = val; }
|
| + void setAngle(CSSPrimitiveValue val) { m_angle = val; }
|
|
|
| String customCSSText() const;
|
|
|
| @@ -192,7 +192,7 @@ private:
|
| {
|
| }
|
|
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_angle; // may be null.
|
| + NullableCSSValue m_angle; // may be null.
|
| };
|
|
|
| DEFINE_CSS_VALUE_TYPE_CASTS(CSSLinearGradientValue, isLinearGradientValue());
|
| @@ -211,14 +211,14 @@ public:
|
|
|
| String customCSSText() const;
|
|
|
| - void setFirstRadius(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_firstRadius = val; }
|
| - void setSecondRadius(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_secondRadius = val; }
|
| + void setFirstRadius(CSSPrimitiveValue val) { m_firstRadius = val; }
|
| + void setSecondRadius(CSSPrimitiveValue val) { m_secondRadius = val; }
|
|
|
| - void setShape(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_shape = val; }
|
| - void setSizingBehavior(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_sizingBehavior = val; }
|
| + void setShape(NullableCSSValue val) { m_shape = val; }
|
| + void setSizingBehavior(NullableCSSValue val) { m_sizingBehavior = val; }
|
|
|
| - void setEndHorizontalSize(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_endHorizontalSize = val; }
|
| - void setEndVerticalSize(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_endVerticalSize = val; }
|
| + void setEndHorizontalSize(NullableCSSValue val) { m_endHorizontalSize = val; }
|
| + void setEndVerticalSize(NullableCSSValue val) { m_endVerticalSize = val; }
|
|
|
| // Create the gradient for a given size.
|
| PassRefPtr<Gradient> createGradient(const CSSToLengthConversionData&, const IntSize&, const LayoutObject&);
|
| @@ -246,18 +246,18 @@ private:
|
|
|
|
|
| // Resolve points/radii to front end values.
|
| - float resolveRadius(CSSPrimitiveValue*, const CSSToLengthConversionData&, float* widthOrHeight = 0);
|
| + float resolveRadius(CSSPrimitiveValue, const CSSToLengthConversionData&, float* widthOrHeight = 0);
|
|
|
| // These may be null for non-deprecated gradients.
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_firstRadius;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_secondRadius;
|
| + NullableCSSValue m_firstRadius;
|
| + NullableCSSValue m_secondRadius;
|
|
|
| // The below are only used for non-deprecated gradients. Any of them may be null.
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_shape;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_sizingBehavior;
|
| + NullableCSSValue m_shape;
|
| + NullableCSSValue m_sizingBehavior;
|
|
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_endHorizontalSize;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_endVerticalSize;
|
| + NullableCSSValue m_endHorizontalSize;
|
| + NullableCSSValue m_endVerticalSize;
|
| };
|
|
|
| DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue());
|
|
|