Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Side by Side Diff: Source/core/dom/StyleChangeReason.cpp

Issue 547823002: Track reasons for |Node::SetNeedsStyleRecalc| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: reasons as tuple Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "core/dom/StyleChangeReason.h"
7
8 #include "core/dom/QualifiedName.h"
9 #include "platform/TraceEvent.h"
10
11 namespace blink {
12
13 namespace StyleChangeReason {
14 const char ActiveStylesheetsUpdate[] = "ActiveStylesheetsUpdate";
15 const char Animation[] = "Animation";
16 const char Attribute[] = "Attribute";
17 const char ControlValue[] = "ControlValue";
18 const char Control[] = "Control";
19 const char DesignMode[] = "DesignMode";
20 const char Drag[] = "Drag";
21 const char FontSizeChange[] = "FontSizeChange";
22 const char Fonts[] = "Fonts";
23 const char FullScreen[] = "FullScreen";
24 const char Inline[] = "Inline";
25 const char Inspector[] = "Inspector";
26 const char Language[] = "Language";
27 const char LinkColorChange[] = "LinkColorChange";
28 const char PlatformColorChange[] = "PlatformColorChange";
29 const char Plugin[] = "Plugin";
30 const char PropagateInheritChangeToDistributedNodes[] = "PropagateInheritChangeT oDistributedNodes";
31 const char PseudoClass[] = "PseudoClass";
32 const char SVGContainerSizeChange[] = "SVGContainerSizeChange";
33 const char SVGCursor[] = "SVGCursor";
34 const char SVGFilterLayerUpdate[] = "SVGFilterLayerUpdate";
35 const char Shadow[] = "Shadow";
36 const char SiblingSelector[] = "SiblingSelector";
37 const char StyleInvalidator[] = "StyleInvalidator";
38 const char StyleSheetChange[] = "StyleSheetChange";
39 const char Validate[] = "Validate";
40 const char ViewportUnits[] = "ViewportUnits";
41 const char VisitedLink[] = "VisitedLink";
42 const char VisuallyOrdered[] = "VisuallyOrdered";
43 const char WritingModeChange[] = "WritingModeChange";
44 const char Zoom[] = "Zoom";
45 } // namespace StyleChangeReasonForTracing
46
47 namespace StyleChangeExtraData {
48 const char Active[] = ":active";
49 const char Checked[] = ":checked";
50 const char Disabled[] = ":disabled";
51 const char Focus[] = ":focus";
52 const char Hover[] = ":hover";
53 const char Invalid[] = ":invalid";
54 const char Indeterminate[] = ":indeterminate";
55 const char LinkVisitedEnabled[] = ":link, :visited, or :enabled";
56 const char Target[] = ":target";
57 const char Unresolved[] = ":unresolved";
58 } // namespace StyleChangeExtraData
59
60
61 String StyleChangeReasonForTracing::getReasonString() const
62 {
63 return String(m_reason);
esprehn 2014/09/26 03:53:01 These have hidden mallocs. Maybe that's okay.
kouhei (in TOK) 2014/09/29 02:05:32 This getter is only called when invalidation traci
64 }
65
66 String StyleChangeReasonForTracing::getExtraDataString() const
67 {
68 if (m_attributeName)
69 return m_attributeName->toString();
70 if (m_extraData)
71 return String(m_extraData);
72
73 return String();
74 }
75
76 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698