OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 StyleChangeReason_h | 5 #ifndef StyleChangeReason_h |
6 #define StyleChangeReason_h | 6 #define StyleChangeReason_h |
7 | 7 |
8 #include "core/dom/QualifiedName.h" | 8 #include "core/dom/QualifiedName.h" |
9 #include "wtf/PassRefPtr.h" | 9 #include "wtf/PassRefPtr.h" |
10 #include "wtf/text/AtomicString.h" | 10 #include "wtf/text/AtomicString.h" |
(...skipping 70 matching lines...) Loading... |
81 { | 81 { |
82 return StyleChangeReasonForTracing(reasonString, extraData); | 82 return StyleChangeReasonForTracing(reasonString, extraData); |
83 } | 83 } |
84 | 84 |
85 static StyleChangeReasonForTracing fromAttribute(const QualifiedName& attrib
uteName) | 85 static StyleChangeReasonForTracing fromAttribute(const QualifiedName& attrib
uteName) |
86 { | 86 { |
87 return StyleChangeReasonForTracing(StyleChangeReason::Attribute, attribu
teName.localName()); | 87 return StyleChangeReasonForTracing(StyleChangeReason::Attribute, attribu
teName.localName()); |
88 } | 88 } |
89 | 89 |
90 String reasonString() const { return String(m_reason); } | 90 String reasonString() const { return String(m_reason); } |
91 const AtomicString& extraData() const { return m_extraData; } | 91 const AtomicString& getExtraData() const { return m_extraData; } |
92 | 92 |
93 private: | 93 private: |
94 StyleChangeReasonForTracing(StyleChangeReasonString reasonString, const Atom
icString& extraData) | 94 StyleChangeReasonForTracing(StyleChangeReasonString reasonString, const Atom
icString& extraData) |
95 : m_reason(reasonString) | 95 : m_reason(reasonString) |
96 , m_extraData(extraData) | 96 , m_extraData(extraData) |
97 { | 97 { |
98 } | 98 } |
99 | 99 |
100 // disable comparisons | 100 // disable comparisons |
101 void operator==(const StyleChangeReasonForTracing&) const { } | 101 void operator==(const StyleChangeReasonForTracing&) const { } |
102 void operator!=(const StyleChangeReasonForTracing&) const { } | 102 void operator!=(const StyleChangeReasonForTracing&) const { } |
103 | 103 |
104 const char* m_reason; | 104 const char* m_reason; |
105 AtomicString m_extraData; | 105 AtomicString m_extraData; |
106 }; | 106 }; |
107 | 107 |
108 } // namespace blink | 108 } // namespace blink |
109 | 109 |
110 #endif // StyleChangeReason_h | 110 #endif // StyleChangeReason_h |
OLD | NEW |