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

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: use AtomicString Created 6 years, 2 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
« no previous file with comments | « Source/core/dom/StyleChangeReason.h ('k') | Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "platform/TraceEvent.h"
9 #include "wtf/MainThread.h"
10 #include "wtf/StaticConstructors.h"
11
12 namespace blink {
13
14 namespace StyleChangeReason {
15 const char ActiveStylesheetsUpdate[] = "ActiveStylesheetsUpdate";
16 const char Animation[] = "Animation";
17 const char Attribute[] = "Attribute";
18 const char ControlValue[] = "ControlValue";
19 const char Control[] = "Control";
20 const char DesignMode[] = "DesignMode";
21 const char Drag[] = "Drag";
22 const char FontSizeChange[] = "FontSizeChange";
23 const char Fonts[] = "Fonts";
24 const char FullScreen[] = "FullScreen";
25 const char Inline[] = "Inline";
26 const char Inspector[] = "Inspector";
27 const char Language[] = "Language";
28 const char LinkColorChange[] = "LinkColorChange";
29 const char PlatformColorChange[] = "PlatformColorChange";
30 const char Plugin[] = "Plugin";
31 const char PropagateInheritChangeToDistributedNodes[] = "PropagateInheritChangeT oDistributedNodes";
32 const char PseudoClass[] = "PseudoClass";
33 const char SVGContainerSizeChange[] = "SVGContainerSizeChange";
34 const char SVGCursor[] = "SVGCursor";
35 const char SVGFilterLayerUpdate[] = "SVGFilterLayerUpdate";
36 const char Shadow[] = "Shadow";
37 const char SiblingSelector[] = "SiblingSelector";
38 const char StyleInvalidator[] = "StyleInvalidator";
39 const char StyleSheetChange[] = "StyleSheetChange";
40 const char Validate[] = "Validate";
41 const char ViewportUnits[] = "ViewportUnits";
42 const char VisitedLink[] = "VisitedLink";
43 const char VisuallyOrdered[] = "VisuallyOrdered";
44 const char WritingModeChange[] = "WritingModeChange";
45 const char Zoom[] = "Zoom";
46 } // namespace StyleChangeReasonForTracing
47
48 namespace StyleChangeExtraData {
49 DEFINE_GLOBAL(AtomicString, Active)
50 DEFINE_GLOBAL(AtomicString, Disabled)
51 DEFINE_GLOBAL(AtomicString, Focus)
52 DEFINE_GLOBAL(AtomicString, Hover)
53 DEFINE_GLOBAL(AtomicString, Invalid)
54 DEFINE_GLOBAL(AtomicString, Unresolved)
55
56 void init()
57 {
58 ASSERT(isMainThread());
59
60 new (NotNull, (void*)&Active) AtomicString(":active", AtomicString::Construc tFromLiteral);
61 new (NotNull, (void*)&Disabled) AtomicString(":disabled", AtomicString::Cons tructFromLiteral);
62 new (NotNull, (void*)&Focus) AtomicString(":focus", AtomicString::ConstructF romLiteral);
63 new (NotNull, (void*)&Hover) AtomicString(":hover", AtomicString::ConstructF romLiteral);
64 new (NotNull, (void*)&Invalid) AtomicString(":invalid", AtomicString::Constr uctFromLiteral);
65 new (NotNull, (void*)&Unresolved) AtomicString(":unresolved", AtomicString:: ConstructFromLiteral);
66 }
67
68 } // namespace StyleChangeExtraData
69
70 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/StyleChangeReason.h ('k') | Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698