| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 CSSGradientColorStop() : m_colorIsDerivedFromElement(false) { }; | 58 CSSGradientColorStop() : m_colorIsDerivedFromElement(false) { }; |
| 59 RefPtrWillBeMember<CSSPrimitiveValue> m_position; // percentage or length | 59 RefPtrWillBeMember<CSSPrimitiveValue> m_position; // percentage or length |
| 60 RefPtrWillBeMember<CSSPrimitiveValue> m_color; | 60 RefPtrWillBeMember<CSSPrimitiveValue> m_color; |
| 61 Color m_resolvedColor; | 61 Color m_resolvedColor; |
| 62 bool m_colorIsDerivedFromElement; | 62 bool m_colorIsDerivedFromElement; |
| 63 bool operator==(const CSSGradientColorStop& other) const | 63 bool operator==(const CSSGradientColorStop& other) const |
| 64 { | 64 { |
| 65 return compareCSSValuePtr(m_color, other.m_color) | 65 return compareCSSValuePtr(m_color, other.m_color) |
| 66 && compareCSSValuePtr(m_position, other.m_position); | 66 && compareCSSValuePtr(m_position, other.m_position); |
| 67 } | 67 } |
| 68 bool isHint() const |
| 69 { |
| 70 ASSERT(m_color || m_position); |
| 71 return !m_color; |
| 72 } |
| 68 | 73 |
| 69 void trace(Visitor*); | 74 void trace(Visitor*); |
| 70 }; | 75 }; |
| 71 | 76 |
| 72 } // namespace blink | 77 } // namespace blink |
| 73 | 78 |
| 74 | 79 |
| 75 // We have to declare the VectorTraits specialization before CSSGradientValue | 80 // We have to declare the VectorTraits specialization before CSSGradientValue |
| 76 // declares its inline capacity vector below. | 81 // declares its inline capacity vector below. |
| 77 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSGradientColorStop); | 82 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSGradientColorStop); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 260 |
| 256 RefPtrWillBeMember<CSSPrimitiveValue> m_endHorizontalSize; | 261 RefPtrWillBeMember<CSSPrimitiveValue> m_endHorizontalSize; |
| 257 RefPtrWillBeMember<CSSPrimitiveValue> m_endVerticalSize; | 262 RefPtrWillBeMember<CSSPrimitiveValue> m_endVerticalSize; |
| 258 }; | 263 }; |
| 259 | 264 |
| 260 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue()); | 265 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue()); |
| 261 | 266 |
| 262 } // namespace blink | 267 } // namespace blink |
| 263 | 268 |
| 264 #endif // CSSGradientValue_h | 269 #endif // CSSGradientValue_h |
| OLD | NEW |