Chromium Code Reviews| Index: Source/core/dom/StyleChangeReason.cpp |
| diff --git a/Source/core/dom/StyleChangeReason.cpp b/Source/core/dom/StyleChangeReason.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a60e2e2d9b2f846e0d01d5bf3c22d42cdec2d3e0 |
| --- /dev/null |
| +++ b/Source/core/dom/StyleChangeReason.cpp |
| @@ -0,0 +1,70 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "config.h" |
| +#include "core/dom/StyleChangeReason.h" |
| + |
| +#include "platform/TraceEvent.h" |
| +#include "wtf/MainThread.h" |
| +#include "wtf/StaticConstructors.h" |
| + |
| +namespace blink { |
| + |
| +namespace StyleChangeReason { |
| +const char ActiveStylesheetsUpdate[] = "ActiveStylesheetsUpdate"; |
| +const char Animation[] = "Animation"; |
| +const char Attribute[] = "Attribute"; |
| +const char ControlValue[] = "ControlValue"; |
| +const char Control[] = "Control"; |
| +const char DesignMode[] = "DesignMode"; |
| +const char Drag[] = "Drag"; |
| +const char FontSizeChange[] = "FontSizeChange"; |
| +const char Fonts[] = "Fonts"; |
| +const char FullScreen[] = "FullScreen"; |
| +const char Inline[] = "Inline"; |
| +const char Inspector[] = "Inspector"; |
| +const char Language[] = "Language"; |
| +const char LinkColorChange[] = "LinkColorChange"; |
| +const char PlatformColorChange[] = "PlatformColorChange"; |
| +const char Plugin[] = "Plugin"; |
| +const char PropagateInheritChangeToDistributedNodes[] = "PropagateInheritChangeToDistributedNodes"; |
| +const char PseudoClass[] = "PseudoClass"; |
| +const char SVGContainerSizeChange[] = "SVGContainerSizeChange"; |
| +const char SVGCursor[] = "SVGCursor"; |
| +const char SVGFilterLayerUpdate[] = "SVGFilterLayerUpdate"; |
| +const char Shadow[] = "Shadow"; |
| +const char SiblingSelector[] = "SiblingSelector"; |
| +const char StyleInvalidator[] = "StyleInvalidator"; |
| +const char StyleSheetChange[] = "StyleSheetChange"; |
| +const char Validate[] = "Validate"; |
| +const char ViewportUnits[] = "ViewportUnits"; |
| +const char VisitedLink[] = "VisitedLink"; |
| +const char VisuallyOrdered[] = "VisuallyOrdered"; |
| +const char WritingModeChange[] = "WritingModeChange"; |
| +const char Zoom[] = "Zoom"; |
| +} // namespace StyleChangeReasonForTracing |
| + |
| +namespace StyleChangeExtraData { |
| +WTF_EXPORT DEFINE_GLOBAL(String, Active) |
| +WTF_EXPORT DEFINE_GLOBAL(String, Disabled) |
| +WTF_EXPORT DEFINE_GLOBAL(String, Focus) |
| +WTF_EXPORT DEFINE_GLOBAL(String, Hover) |
| +WTF_EXPORT DEFINE_GLOBAL(String, Invalid) |
| +WTF_EXPORT DEFINE_GLOBAL(String, Unresolved) |
| + |
| +void init() |
| +{ |
| + ASSERT(isMainThread()); |
| + |
| + new (NotNull, (void*)&Active) String(":active"); |
|
esprehn
2014/09/29 02:30:23
I think there's some kind of special static string
kouhei (in TOK)
2014/09/29 03:24:44
Changed to AtomicString(ConstructFromLiteral)
|
| + new (NotNull, (void*)&Disabled) String(":disabled"); |
| + new (NotNull, (void*)&Focus) String(":focus"); |
| + new (NotNull, (void*)&Hover) String(":hover"); |
| + new (NotNull, (void*)&Invalid) String(":invalid"); |
| + new (NotNull, (void*)&Unresolved) String(":unresolved"); |
| +} |
| + |
| +} // namespace StyleChangeExtraData |
| + |
| +} // namespace blink |