| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 enum SerializationType { | 33 enum SerializationType { |
| 34 SerializeAsRect, | 34 SerializeAsRect, |
| 35 SerializeAsQuad | 35 SerializeAsQuad |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 static PassRefPtrWillBeRawPtr<CSSQuadValue> create(PassRefPtrWillBeRawPtr<CS
SPrimitiveValue> top, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> right, PassRefPt
rWillBeRawPtr<CSSPrimitiveValue> bottom, PassRefPtrWillBeRawPtr<CSSPrimitiveValu
e> left, SerializationType serializationType) | 38 static PassRefPtrWillBeRawPtr<CSSQuadValue> create(PassRefPtrWillBeRawPtr<CS
SPrimitiveValue> top, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> right, PassRefPt
rWillBeRawPtr<CSSPrimitiveValue> bottom, PassRefPtrWillBeRawPtr<CSSPrimitiveValu
e> left, SerializationType serializationType) |
| 39 { | 39 { |
| 40 return adoptRefWillBeNoop(new CSSQuadValue(top, right, bottom, left, ser
ializationType)); | 40 return adoptRefWillBeNoop(new CSSQuadValue(top, right, bottom, left, ser
ializationType)); |
| 41 } | 41 } |
| 42 | 42 |
| 43 static PassRefPtrWillBeRawPtr<CSSQuadValue> deserializeAfterDispatch(CSSDese
rializeStream*); |
| 44 |
| 43 CSSPrimitiveValue* top() const { return m_top.get(); } | 45 CSSPrimitiveValue* top() const { return m_top.get(); } |
| 44 CSSPrimitiveValue* right() const { return m_right.get(); } | 46 CSSPrimitiveValue* right() const { return m_right.get(); } |
| 45 CSSPrimitiveValue* bottom() const { return m_bottom.get(); } | 47 CSSPrimitiveValue* bottom() const { return m_bottom.get(); } |
| 46 CSSPrimitiveValue* left() const { return m_left.get(); } | 48 CSSPrimitiveValue* left() const { return m_left.get(); } |
| 47 | 49 |
| 48 SerializationType serializationType() { return m_serializationType; } | 50 SerializationType serializationType() { return m_serializationType; } |
| 49 | 51 |
| 50 String customCSSText() const; | 52 String customCSSText() const; |
| 51 | 53 |
| 52 bool equals(const CSSQuadValue& other) const | 54 bool equals(const CSSQuadValue& other) const |
| 53 { | 55 { |
| 54 return compareCSSValuePtr(m_top, other.m_top) | 56 return compareCSSValuePtr(m_top, other.m_top) |
| 55 && compareCSSValuePtr(m_right, other.m_right) | 57 && compareCSSValuePtr(m_right, other.m_right) |
| 56 && compareCSSValuePtr(m_left, other.m_left) | 58 && compareCSSValuePtr(m_left, other.m_left) |
| 57 && compareCSSValuePtr(m_bottom, other.m_bottom); | 59 && compareCSSValuePtr(m_bottom, other.m_bottom); |
| 58 } | 60 } |
| 59 | 61 |
| 62 void serializeAfterDispatch(CSSSerializeStream*) const; |
| 60 DECLARE_TRACE_AFTER_DISPATCH(); | 63 DECLARE_TRACE_AFTER_DISPATCH(); |
| 61 | 64 |
| 62 protected: | 65 protected: |
| 63 CSSQuadValue(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> top, PassRefPtrWillBe
RawPtr<CSSPrimitiveValue> right, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> botto
m, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> left, SerializationType serializati
onType) | 66 CSSQuadValue(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> top, PassRefPtrWillBe
RawPtr<CSSPrimitiveValue> right, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> botto
m, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> left, SerializationType serializati
onType) |
| 64 : CSSValue(QuadClass) | 67 : CSSValue(QuadClass) |
| 65 , m_serializationType(serializationType) | 68 , m_serializationType(serializationType) |
| 66 , m_top(top) | 69 , m_top(top) |
| 67 , m_right(right) | 70 , m_right(right) |
| 68 , m_bottom(bottom) | 71 , m_bottom(bottom) |
| 69 , m_left(left) { } | 72 , m_left(left) { } |
| 70 | 73 |
| 71 private: | 74 private: |
| 72 SerializationType m_serializationType; | 75 SerializationType m_serializationType; |
| 73 RefPtrWillBeMember<CSSPrimitiveValue> m_top; | 76 RefPtrWillBeMember<CSSPrimitiveValue> m_top; |
| 74 RefPtrWillBeMember<CSSPrimitiveValue> m_right; | 77 RefPtrWillBeMember<CSSPrimitiveValue> m_right; |
| 75 RefPtrWillBeMember<CSSPrimitiveValue> m_bottom; | 78 RefPtrWillBeMember<CSSPrimitiveValue> m_bottom; |
| 76 RefPtrWillBeMember<CSSPrimitiveValue> m_left; | 79 RefPtrWillBeMember<CSSPrimitiveValue> m_left; |
| 77 }; | 80 }; |
| 78 | 81 |
| 79 DEFINE_CSS_VALUE_TYPE_CASTS(CSSQuadValue, isQuadValue()); | 82 DEFINE_CSS_VALUE_TYPE_CASTS(CSSQuadValue, isQuadValue()); |
| 80 | 83 |
| 81 } // namespace blink | 84 } // namespace blink |
| 82 | 85 |
| 83 #endif // CSSQuadValue_h | 86 #endif // CSSQuadValue_h |
| OLD | NEW |