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

Unified 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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/StyleChangeReason.h ('k') | Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..363bb8be4050ed64471781174277e021fa4c20a0
--- /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 {
+DEFINE_GLOBAL(AtomicString, Active)
+DEFINE_GLOBAL(AtomicString, Disabled)
+DEFINE_GLOBAL(AtomicString, Focus)
+DEFINE_GLOBAL(AtomicString, Hover)
+DEFINE_GLOBAL(AtomicString, Invalid)
+DEFINE_GLOBAL(AtomicString, Unresolved)
+
+void init()
+{
+ ASSERT(isMainThread());
+
+ new (NotNull, (void*)&Active) AtomicString(":active", AtomicString::ConstructFromLiteral);
+ new (NotNull, (void*)&Disabled) AtomicString(":disabled", AtomicString::ConstructFromLiteral);
+ new (NotNull, (void*)&Focus) AtomicString(":focus", AtomicString::ConstructFromLiteral);
+ new (NotNull, (void*)&Hover) AtomicString(":hover", AtomicString::ConstructFromLiteral);
+ new (NotNull, (void*)&Invalid) AtomicString(":invalid", AtomicString::ConstructFromLiteral);
+ new (NotNull, (void*)&Unresolved) AtomicString(":unresolved", AtomicString::ConstructFromLiteral);
+}
+
+} // namespace StyleChangeExtraData
+
+} // namespace blink
« 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