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.
6 #include "core/dom/StyleChangeReason.h"
8 #include "platform/TraceEvent.h"
9 #include "wtf/MainThread.h"
10 #include "wtf/StaticConstructors.h"
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 PropagateInheritChangeToDistributedNodes[] = "PropagateInheritChangeToDistributedNodes";
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
47 namespace StyleChangeExtraData {
48 DEFINE_GLOBAL(AtomicString, Active)
49 DEFINE_GLOBAL(AtomicString, Disabled)
50 DEFINE_GLOBAL(AtomicString, Focus)
51 DEFINE_GLOBAL(AtomicString, Hover)
52 DEFINE_GLOBAL(AtomicString, Unresolved)
56 ASSERT(isMainThread());
58 new (NotNull, (void*)&Active) AtomicString(":active", AtomicString::ConstructFromLiteral);
59 new (NotNull, (void*)&Disabled) AtomicString(":disabled", AtomicString::ConstructFromLiteral);
60 new (NotNull, (void*)&Focus) AtomicString(":focus", AtomicString::ConstructFromLiteral);
61 new (NotNull, (void*)&Hover) AtomicString(":hover", AtomicString::ConstructFromLiteral);
62 new (NotNull, (void*)&Unresolved) AtomicString(":unresolved", AtomicString::ConstructFromLiteral);
65 } // namespace StyleChangeExtraData