| 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 10 matching lines...) Expand all Loading... |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef CSSGradientValue_h | 26 #ifndef CSSGradientValue_h |
| 27 #define CSSGradientValue_h | 27 #define CSSGradientValue_h |
| 28 | 28 |
| 29 #include "core/css/CSSImageGeneratorValue.h" | 29 #include "core/css/CSSImageGeneratorValue.h" |
| 30 #include "core/css/CSSPrimitiveValue.h" | 30 #include "core/css/CSSPrimitiveValue.h" |
| 31 #include "core/style/StyleImage.h" |
| 31 #include "wtf/RefPtr.h" | 32 #include "wtf/RefPtr.h" |
| 32 #include "wtf/Vector.h" | 33 #include "wtf/Vector.h" |
| 33 | 34 |
| 34 namespace blink { | 35 namespace blink { |
| 35 | 36 |
| 36 class FloatPoint; | 37 class FloatPoint; |
| 37 class Gradient; | 38 class Gradient; |
| 38 | 39 |
| 39 enum CSSGradientType { | 40 enum CSSGradientType { |
| 40 CSSDeprecatedLinearGradient, | 41 CSSDeprecatedLinearGradient, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 97 |
| 97 void appendCSSTextForDeprecatedColorStops(StringBuilder&) const; | 98 void appendCSSTextForDeprecatedColorStops(StringBuilder&) const; |
| 98 | 99 |
| 99 bool isRepeating() const { return m_repeating; } | 100 bool isRepeating() const { return m_repeating; } |
| 100 | 101 |
| 101 CSSGradientType gradientType() const { return m_gradientType; } | 102 CSSGradientType gradientType() const { return m_gradientType; } |
| 102 | 103 |
| 103 bool isFixedSize() const { return false; } | 104 bool isFixedSize() const { return false; } |
| 104 IntSize fixedSize(const LayoutObject*) const { return IntSize(); } | 105 IntSize fixedSize(const LayoutObject*) const { return IntSize(); } |
| 105 | 106 |
| 106 bool isPending() const { return false; } | 107 bool isPending(CSSStyleImageMap&) const { return false; } |
| 107 bool knownToBeOpaque(const LayoutObject*) const; | 108 bool knownToBeOpaque(const LayoutObject*) const; |
| 108 | 109 |
| 109 void loadSubimages(Document*) { } | 110 void loadSubimages(Document*, CSSStyleImageMap&) { } |
| 110 | 111 |
| 111 DECLARE_TRACE_AFTER_DISPATCH(); | 112 DECLARE_TRACE_AFTER_DISPATCH(); |
| 112 | 113 |
| 113 protected: | 114 protected: |
| 114 CSSGradientValue(ClassType classType, CSSGradientRepeat repeat, CSSGradientT
ype gradientType) | 115 CSSGradientValue(ClassType classType, CSSGradientRepeat repeat, CSSGradientT
ype gradientType) |
| 115 : CSSImageGeneratorValue(classType) | 116 : CSSImageGeneratorValue(classType) |
| 116 , m_stopsSorted(false) | 117 , m_stopsSorted(false) |
| 117 , m_gradientType(gradientType) | 118 , m_gradientType(gradientType) |
| 118 , m_repeating(repeat == Repeating) | 119 , m_repeating(repeat == Repeating) |
| 119 { | 120 { |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 259 |
| 259 RefPtrWillBeMember<CSSPrimitiveValue> m_endHorizontalSize; | 260 RefPtrWillBeMember<CSSPrimitiveValue> m_endHorizontalSize; |
| 260 RefPtrWillBeMember<CSSPrimitiveValue> m_endVerticalSize; | 261 RefPtrWillBeMember<CSSPrimitiveValue> m_endVerticalSize; |
| 261 }; | 262 }; |
| 262 | 263 |
| 263 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue()); | 264 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue()); |
| 264 | 265 |
| 265 } // namespace blink | 266 } // namespace blink |
| 266 | 267 |
| 267 #endif // CSSGradientValue_h | 268 #endif // CSSGradientValue_h |
| OLD | NEW |