OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 25 matching lines...) Expand all Loading... |
36 class Color; | 36 class Color; |
37 class FloatPoint; | 37 class FloatPoint; |
38 class Gradient; | 38 class Gradient; |
39 | 39 |
40 enum CSSGradientType { | 40 enum CSSGradientType { |
41 CSSDeprecatedLinearGradient, | 41 CSSDeprecatedLinearGradient, |
42 CSSDeprecatedRadialGradient, | 42 CSSDeprecatedRadialGradient, |
43 CSSPrefixedLinearGradient, | 43 CSSPrefixedLinearGradient, |
44 CSSPrefixedRadialGradient, | 44 CSSPrefixedRadialGradient, |
45 CSSLinearGradient, | 45 CSSLinearGradient, |
46 CSSRadialGradient | 46 CSSRadialGradient, |
| 47 CSSConicGradient, |
47 }; | 48 }; |
48 enum CSSGradientRepeat { NonRepeating, Repeating }; | 49 enum CSSGradientRepeat { NonRepeating, Repeating }; |
49 | 50 |
50 // This struct is stack allocated and allocated as part of vectors. | 51 // This struct is stack allocated and allocated as part of vectors. |
51 // When allocated on the stack its members are found by conservative | 52 // When allocated on the stack its members are found by conservative |
52 // stack scanning. When allocated as part of Vectors in heap-allocated | 53 // stack scanning. When allocated as part of Vectors in heap-allocated |
53 // objects its members are visited via the containing object's | 54 // objects its members are visited via the containing object's |
54 // (CSSGradientValue) traceAfterDispatch method. | 55 // (CSSGradientValue) traceAfterDispatch method. |
55 // | 56 // |
56 // http://www.w3.org/TR/css3-images/#color-stop-syntax | 57 // http://www.w3.org/TR/css3-images/#color-stop-syntax |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // The below are only used for non-deprecated gradients. Any of them may be
null. | 220 // The below are only used for non-deprecated gradients. Any of them may be
null. |
220 Member<CSSPrimitiveValue> m_shape; | 221 Member<CSSPrimitiveValue> m_shape; |
221 Member<CSSPrimitiveValue> m_sizingBehavior; | 222 Member<CSSPrimitiveValue> m_sizingBehavior; |
222 | 223 |
223 Member<CSSPrimitiveValue> m_endHorizontalSize; | 224 Member<CSSPrimitiveValue> m_endHorizontalSize; |
224 Member<CSSPrimitiveValue> m_endVerticalSize; | 225 Member<CSSPrimitiveValue> m_endVerticalSize; |
225 }; | 226 }; |
226 | 227 |
227 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue()); | 228 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue()); |
228 | 229 |
| 230 class CSSConicGradientValue final : public CSSGradientValue { |
| 231 public: |
| 232 static CSSConicGradientValue* create(CSSGradientRepeat repeat) |
| 233 { |
| 234 return new CSSConicGradientValue(repeat); |
| 235 } |
| 236 |
| 237 String customCSSText() const; |
| 238 |
| 239 // Create the gradient for a given size. |
| 240 PassRefPtr<Gradient> createGradient(const CSSToLengthConversionData&, const
IntSize&, const LayoutObject&); |
| 241 |
| 242 bool equals(const CSSConicGradientValue&) const; |
| 243 |
| 244 DECLARE_TRACE_AFTER_DISPATCH(); |
| 245 |
| 246 private: |
| 247 CSSConicGradientValue(CSSGradientRepeat repeat) |
| 248 : CSSGradientValue(ConicGradientClass, repeat, CSSConicGradient) |
| 249 { } |
| 250 }; |
| 251 |
| 252 DEFINE_CSS_VALUE_TYPE_CASTS(CSSConicGradientValue, isConicGradientValue()); |
| 253 |
229 } // namespace blink | 254 } // namespace blink |
230 | 255 |
231 #endif // CSSGradientValue_h | 256 #endif // CSSGradientValue_h |
OLD | NEW |