Changeset 123426 in webkit for trunk/Source/WebCore/css/CSSGradientValue.h
- Timestamp:
- Jul 23, 2012, 10:34:42 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/css/CSSGradientValue.h
r121289 r123426 41 41 42 42 struct CSSGradientColorStop { 43 CSSGradientColorStop() : m_colorIsDerivedFromElement(false) { }; 43 44 RefPtr<CSSPrimitiveValue> m_position; // percentage or length 44 45 RefPtr<CSSPrimitiveValue> m_color; 46 Color m_resolvedColor; 47 bool m_colorIsDerivedFromElement; 45 48 }; 46 49 … … 72 75 bool isPending() const { return false; } 73 76 void loadSubimages(CachedResourceLoader*) { } 77 PassRefPtr<CSSGradientValue> gradientWithStylesResolved(StyleResolver*); 74 78 75 79 protected: … … 82 86 } 83 87 88 CSSGradientValue(const CSSGradientValue& other, ClassType classType, bool deprecatedType = false) 89 : CSSImageGeneratorValue(classType) 90 , m_firstX(other.m_firstX) 91 , m_firstY(other.m_firstY) 92 , m_secondX(other.m_secondX) 93 , m_secondY(other.m_secondY) 94 , m_stops(other.m_stops) 95 , m_stopsSorted(other.m_stopsSorted) 96 , m_deprecatedType(deprecatedType) 97 , m_repeating(other.isRepeating() ? Repeating : NonRepeating) 98 { 99 } 100 84 101 void addStops(Gradient*, RenderObject*, RenderStyle* rootStyle, float maxLengthForRepeat = 0); 85 102 … … 118 135 PassRefPtr<Gradient> createGradient(RenderObject*, const IntSize&); 119 136 137 PassRefPtr<CSSLinearGradientValue> clone() const 138 { 139 return adoptRef(new CSSLinearGradientValue(*this)); 140 } 141 120 142 private: 121 143 CSSLinearGradientValue(CSSGradientRepeat repeat, bool deprecatedType = false) … … 124 146 } 125 147 148 CSSLinearGradientValue(const CSSLinearGradientValue& other) 149 : CSSGradientValue(other, LinearGradientClass, other.deprecatedType()) 150 , m_angle(other.m_angle) 151 { 152 } 153 126 154 RefPtr<CSSPrimitiveValue> m_angle; // may be null. 127 155 }; … … 134 162 } 135 163 164 PassRefPtr<CSSRadialGradientValue> clone() const 165 { 166 return adoptRef(new CSSRadialGradientValue(*this)); 167 } 168 136 169 String customCssText() const; 137 170 … … 154 187 } 155 188 189 CSSRadialGradientValue(const CSSRadialGradientValue& other) 190 : CSSGradientValue(other, RadialGradientClass, other.deprecatedType()) 191 , m_firstRadius(other.m_firstRadius) 192 , m_secondRadius(other.m_secondRadius) 193 , m_shape(other.m_shape) 194 , m_sizingBehavior(other.m_sizingBehavior) 195 , m_endHorizontalSize(other.m_endHorizontalSize) 196 , m_endVerticalSize(other.m_endVerticalSize) 197 { 198 } 199 200 156 201 // Resolve points/radii to front end values. 157 202 float resolveRadius(CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, float* widthOrHeight = 0);
Note:
See TracChangeset
for help on using the changeset viewer.