Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / dom / StyleChangeReason.cpp
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 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
46
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)
53
54 void init()
55 {
56     ASSERT(isMainThread());
57
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);
63 }
64
65 } // namespace StyleChangeExtraData
66
67 } // namespace blink