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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 public: | 61 public: |
62 CSSGradientColorStop() : m_colorIsDerivedFromElement(false) {} | 62 CSSGradientColorStop() : m_colorIsDerivedFromElement(false) {} |
63 Member<CSSPrimitiveValue> m_position; // percentage or length | 63 Member<CSSPrimitiveValue> m_position; // percentage or length |
64 Member<CSSValue> m_color; | 64 Member<CSSValue> m_color; |
65 bool m_colorIsDerivedFromElement; | 65 bool m_colorIsDerivedFromElement; |
66 bool operator==(const CSSGradientColorStop& other) const { | 66 bool operator==(const CSSGradientColorStop& other) const { |
67 return dataEquivalent(m_color, other.m_color) && | 67 return dataEquivalent(m_color, other.m_color) && |
68 dataEquivalent(m_position, other.m_position); | 68 dataEquivalent(m_position, other.m_position); |
69 } | 69 } |
70 bool isHint() const { | 70 bool isHint() const { |
71 ASSERT(m_color || m_position); | 71 DCHECK(m_color || m_position); |
72 return !m_color; | 72 return !m_color; |
73 } | 73 } |
74 | 74 |
75 DECLARE_TRACE(); | 75 DECLARE_TRACE(); |
76 }; | 76 }; |
77 | 77 |
78 } // namespace blink | 78 } // namespace blink |
79 | 79 |
80 // We have to declare the VectorTraits specialization before CSSGradientValue | 80 // We have to declare the VectorTraits specialization before CSSGradientValue |
81 // declares its inline capacity vector below. | 81 // declares its inline capacity vector below. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 Member<CSSPrimitiveValue> m_endHorizontalSize; | 235 Member<CSSPrimitiveValue> m_endHorizontalSize; |
236 Member<CSSPrimitiveValue> m_endVerticalSize; | 236 Member<CSSPrimitiveValue> m_endVerticalSize; |
237 }; | 237 }; |
238 | 238 |
239 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue()); | 239 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue()); |
240 | 240 |
241 } // namespace blink | 241 } // namespace blink |
242 | 242 |
243 #endif // CSSGradientValue_h | 243 #endif // CSSGradientValue_h |
OLD | NEW |