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/NullPtr.h" | 9 #include "wtf/NullPtr.h" |
10 #include "wtf/PassRefPtr.h" | 10 #include "wtf/PassRefPtr.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 void init(); | 62 void init(); |
63 } | 63 } |
64 | 64 |
65 // |StyleChangeReasonForTracing| is used to trace the reason a | 65 // |StyleChangeReasonForTracing| is used to trace the reason a |
66 // |Node::setNeedsStyleRecalc| call was made to show it in DevTools or in | 66 // |Node::setNeedsStyleRecalc| call was made to show it in DevTools or in |
67 // about:tracing. | 67 // about:tracing. |
68 // |StyleChangeReasonForTracing| is strictly only for the tracing purpose as | 68 // |StyleChangeReasonForTracing| is strictly only for the tracing purpose as |
69 // described above. Blink logic must not depend on this value. | 69 // described above. Blink logic must not depend on this value. |
70 class StyleChangeReasonForTracing { | 70 class StyleChangeReasonForTracing { |
| 71 DISALLOW_ALLOCATION(); |
71 public: | 72 public: |
72 static StyleChangeReasonForTracing create(StyleChangeReasonString reasonStri
ng) | 73 static StyleChangeReasonForTracing create(StyleChangeReasonString reasonStri
ng) |
73 { | 74 { |
74 return StyleChangeReasonForTracing(reasonString, nullAtom); | 75 return StyleChangeReasonForTracing(reasonString, nullAtom); |
75 } | 76 } |
76 | 77 |
77 static StyleChangeReasonForTracing createWithExtraData(StyleChangeReasonStri
ng reasonString, const AtomicString& extraData) | 78 static StyleChangeReasonForTracing createWithExtraData(StyleChangeReasonStri
ng reasonString, const AtomicString& extraData) |
78 { | 79 { |
79 return StyleChangeReasonForTracing(reasonString, extraData); | 80 return StyleChangeReasonForTracing(reasonString, extraData); |
80 } | 81 } |
(...skipping 17 matching lines...) Expand all Loading... |
98 void operator==(const StyleChangeReasonForTracing&) const { } | 99 void operator==(const StyleChangeReasonForTracing&) const { } |
99 void operator!=(const StyleChangeReasonForTracing&) const { } | 100 void operator!=(const StyleChangeReasonForTracing&) const { } |
100 | 101 |
101 const char* m_reason; | 102 const char* m_reason; |
102 AtomicString m_extraData; | 103 AtomicString m_extraData; |
103 }; | 104 }; |
104 | 105 |
105 } // namespace blink | 106 } // namespace blink |
106 | 107 |
107 #endif // StyleChangeReason_h | 108 #endif // StyleChangeReason_h |
OLD | NEW |