OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. |
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 String customCSSText() const { | 43 String customCSSText() const { |
44 String first = m_first->cssText(); | 44 String first = m_first->cssText(); |
45 String second = m_second->cssText(); | 45 String second = m_second->cssText(); |
46 if (m_identicalValuesPolicy == DropIdenticalValues && first == second) | 46 if (m_identicalValuesPolicy == DropIdenticalValues && first == second) |
47 return first; | 47 return first; |
48 return first + ' ' + second; | 48 return first + ' ' + second; |
49 } | 49 } |
50 | 50 |
51 bool equals(const CSSValuePair& other) const { | 51 bool equals(const CSSValuePair& other) const { |
52 ASSERT(m_identicalValuesPolicy == other.m_identicalValuesPolicy); | 52 DCHECK_EQ(m_identicalValuesPolicy, other.m_identicalValuesPolicy); |
53 return dataEquivalent(m_first, other.m_first) && | 53 return dataEquivalent(m_first, other.m_first) && |
54 dataEquivalent(m_second, other.m_second); | 54 dataEquivalent(m_second, other.m_second); |
55 } | 55 } |
56 | 56 |
57 DECLARE_TRACE_AFTER_DISPATCH(); | 57 DECLARE_TRACE_AFTER_DISPATCH(); |
58 | 58 |
59 private: | 59 private: |
60 CSSValuePair(const CSSValue* first, | 60 CSSValuePair(const CSSValue* first, |
61 const CSSValue* second, | 61 const CSSValue* second, |
62 IdenticalValuesPolicy identicalValuesPolicy) | 62 IdenticalValuesPolicy identicalValuesPolicy) |
63 : CSSValue(ValuePairClass), | 63 : CSSValue(ValuePairClass), |
64 m_first(first), | 64 m_first(first), |
65 m_second(second), | 65 m_second(second), |
66 m_identicalValuesPolicy(identicalValuesPolicy) { | 66 m_identicalValuesPolicy(identicalValuesPolicy) { |
67 ASSERT(m_first); | 67 DCHECK(m_first); |
68 ASSERT(m_second); | 68 DCHECK(m_second); |
69 } | 69 } |
70 | 70 |
71 Member<const CSSValue> m_first; | 71 Member<const CSSValue> m_first; |
72 Member<const CSSValue> m_second; | 72 Member<const CSSValue> m_second; |
73 IdenticalValuesPolicy m_identicalValuesPolicy; | 73 IdenticalValuesPolicy m_identicalValuesPolicy; |
74 }; | 74 }; |
75 | 75 |
76 DEFINE_CSS_VALUE_TYPE_CASTS(CSSValuePair, isValuePair()); | 76 DEFINE_CSS_VALUE_TYPE_CASTS(CSSValuePair, isValuePair()); |
77 | 77 |
78 } // namespace blink | 78 } // namespace blink |
79 | 79 |
80 #endif // CSSValuePair_h | 80 #endif // CSSValuePair_h |
OLD | NEW |