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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // This struct is stack allocated and allocated as part of vectors. | 49 // This struct is stack allocated and allocated as part of vectors. |
50 // When allocated on the stack its members are found by conservative | 50 // When allocated on the stack its members are found by conservative |
51 // stack scanning. When allocated as part of Vectors in heap-allocated | 51 // stack scanning. When allocated as part of Vectors in heap-allocated |
52 // objects its members are visited via the containing object's | 52 // objects its members are visited via the containing object's |
53 // (CSSGradientValue) traceAfterDispatch method. | 53 // (CSSGradientValue) traceAfterDispatch method. |
54 struct CSSGradientColorStop { | 54 struct CSSGradientColorStop { |
55 ALLOW_ONLY_INLINE_ALLOCATION(); | 55 ALLOW_ONLY_INLINE_ALLOCATION(); |
56 public: | 56 public: |
57 CSSGradientColorStop() : m_colorIsDerivedFromElement(false) { } | 57 CSSGradientColorStop() : m_colorIsDerivedFromElement(false) { } |
58 RefPtrWillBeMember<CSSPrimitiveValue> m_position; // percentage or length | 58 RefPtrWillBeMember<CSSPrimitiveValue> m_position; // percentage or length |
59 RefPtrWillBeMember<CSSPrimitiveValue> m_color; | 59 RefPtrWillBeMember<CSSValue> m_color; |
60 bool m_colorIsDerivedFromElement; | 60 bool m_colorIsDerivedFromElement; |
61 bool operator==(const CSSGradientColorStop& other) const | 61 bool operator==(const CSSGradientColorStop& other) const |
62 { | 62 { |
63 return compareCSSValuePtr(m_color, other.m_color) | 63 return compareCSSValuePtr(m_color, other.m_color) |
64 && compareCSSValuePtr(m_position, other.m_position); | 64 && compareCSSValuePtr(m_position, other.m_position); |
65 } | 65 } |
66 bool isHint() const | 66 bool isHint() const |
67 { | 67 { |
68 ASSERT(m_color || m_position); | 68 ASSERT(m_color || m_position); |
69 return !m_color; | 69 return !m_color; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 | 217 |
218 RefPtrWillBeMember<CSSPrimitiveValue> m_endHorizontalSize; | 218 RefPtrWillBeMember<CSSPrimitiveValue> m_endHorizontalSize; |
219 RefPtrWillBeMember<CSSPrimitiveValue> m_endVerticalSize; | 219 RefPtrWillBeMember<CSSPrimitiveValue> m_endVerticalSize; |
220 }; | 220 }; |
221 | 221 |
222 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue()); | 222 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue()); |
223 | 223 |
224 } // namespace blink | 224 } // namespace blink |
225 | 225 |
226 #endif // CSSGradientValue_h | 226 #endif // CSSGradientValue_h |
OLD | NEW |