OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PropertyHandle_h | 5 #ifndef PropertyHandle_h |
6 #define PropertyHandle_h | 6 #define PropertyHandle_h |
7 | 7 |
8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "core/dom/QualifiedName.h" | 10 #include "core/dom/QualifiedName.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 bool operator==(const PropertyHandle&) const; | 31 bool operator==(const PropertyHandle&) const; |
32 bool operator!=(const PropertyHandle& other) const { return !(*this == other
); } | 32 bool operator!=(const PropertyHandle& other) const { return !(*this == other
); } |
33 | 33 |
34 unsigned hash() const; | 34 unsigned hash() const; |
35 | 35 |
36 bool isCSSProperty() const { return handleType == HandleCSSProperty; } | 36 bool isCSSProperty() const { return handleType == HandleCSSProperty; } |
37 CSSPropertyID cssProperty() const { ASSERT(isCSSProperty()); return property
; } | 37 CSSPropertyID cssProperty() const { ASSERT(isCSSProperty()); return property
; } |
38 | 38 |
39 bool isSVGAttribute() const { return handleType == HandleSVGAttribute; } | 39 bool isSVGAttribute() const { return handleType == HandleSVGAttribute; } |
40 const QualifiedName* svgAttribute() const { ASSERT(isSVGAttribute()); return
attribute; } | 40 const QualifiedName& svgAttribute() const { ASSERT(isSVGAttribute()); return
*attribute; } |
41 | 41 |
42 private: | 42 private: |
43 enum HandleType { | 43 enum HandleType { |
44 HandleEmptyValueForHashTraits, | 44 HandleEmptyValueForHashTraits, |
45 HandleDeletedValueForHashTraits, | 45 HandleDeletedValueForHashTraits, |
46 HandleCSSProperty, | 46 HandleCSSProperty, |
47 HandleSVGAttribute, | 47 HandleSVGAttribute, |
48 }; | 48 }; |
49 | 49 |
50 explicit PropertyHandle(HandleType handleType) | 50 explicit PropertyHandle(HandleType handleType) |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 96 |
97 static blink::PropertyHandle emptyValue() | 97 static blink::PropertyHandle emptyValue() |
98 { | 98 { |
99 return blink::PropertyHandle::emptyValueForHashTraits(); | 99 return blink::PropertyHandle::emptyValueForHashTraits(); |
100 } | 100 } |
101 }; | 101 }; |
102 | 102 |
103 } // namespace WTF | 103 } // namespace WTF |
104 | 104 |
105 #endif // PropertyHandle_h | 105 #endif // PropertyHandle_h |
OLD | NEW |