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

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: reasons as tuple 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
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..7ff219c4aea34cdd013e58e619ce7320a78981e9
--- /dev/null
+++ b/Source/core/dom/StyleChangeReason.cpp
@@ -0,0 +1,76 @@
+// 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 "core/dom/QualifiedName.h"
+#include "platform/TraceEvent.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 {
+const char Active[] = ":active";
+const char Checked[] = ":checked";
+const char Disabled[] = ":disabled";
+const char Focus[] = ":focus";
+const char Hover[] = ":hover";
+const char Invalid[] = ":invalid";
+const char Indeterminate[] = ":indeterminate";
+const char LinkVisitedEnabled[] = ":link, :visited, or :enabled";
+const char Target[] = ":target";
+const char Unresolved[] = ":unresolved";
+} // namespace StyleChangeExtraData
+
+
+String StyleChangeReasonForTracing::getReasonString() const
+{
+ return String(m_reason);
esprehn 2014/09/26 03:53:01 These have hidden mallocs. Maybe that's okay.
kouhei (in TOK) 2014/09/29 02:05:32 This getter is only called when invalidation traci
+}
+
+String StyleChangeReasonForTracing::getExtraDataString() const
+{
+ if (m_attributeName)
+ return m_attributeName->toString();
+ if (m_extraData)
+ return String(m_extraData);
+
+ return String();
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698