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

Unified Diff: Source/core/inspector/InspectorTraceEvents.h

Issue 664033002: [Invalidation Tracking] Trace ScheduleStyleInvalidation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: no optimization Created 6 years, 2 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/inspector/InspectorTraceEvents.h
diff --git a/Source/core/inspector/InspectorTraceEvents.h b/Source/core/inspector/InspectorTraceEvents.h
index d658d9ff08e0c37e8c3fd69fa7df0f65c3dc6016..38d9760d3ec50435be4f316b71daa88959d02710 100644
--- a/Source/core/inspector/InspectorTraceEvents.h
+++ b/Source/core/inspector/InspectorTraceEvents.h
@@ -5,6 +5,7 @@
#ifndef InspectorTraceEvents_h
#define InspectorTraceEvents_h
+#include "core/css/CSSSelector.h"
#include "platform/EventTracer.h"
#include "platform/TraceEvent.h"
#include "platform/heap/Handle.h"
@@ -24,6 +25,7 @@ class KURL;
class LayoutRect;
class LocalFrame;
class Node;
+class QualifiedName;
class RenderImage;
class RenderLayer;
class RenderObject;
@@ -40,6 +42,29 @@ public:
static PassRefPtr<TraceEvent::ConvertableToTraceFormat> endData(RenderObject* rootForThisLayout);
};
+class InspectorScheduleStyleInvalidationTrackingEvent {
+public:
+ static const char Attribute[];
+ static const char Class[];
+ static const char Id[];
+ static const char Pseudo[];
+
+ static PassRefPtr<TraceEvent::ConvertableToTraceFormat> attributeChange(Element&, const DescendantInvalidationSet&, const QualifiedName&);
+ static PassRefPtr<TraceEvent::ConvertableToTraceFormat> classChange(Element&, const DescendantInvalidationSet&, const AtomicString&);
+ static PassRefPtr<TraceEvent::ConvertableToTraceFormat> idChange(Element&, const DescendantInvalidationSet&, const AtomicString&);
+ static PassRefPtr<TraceEvent::ConvertableToTraceFormat> pseudoChange(Element&, const DescendantInvalidationSet&, CSSSelector::PseudoType);
+
+private:
+ static PassRefPtr<TracedValue> fillCommonPart(Element&, const DescendantInvalidationSet&, const char* invalidatedSelector);
+};
+
+#define TRACE_SCHEDULE_STYLE_INVALIDATION(element, invalidationSet, changeType, ...) \
+ TRACE_EVENT_INSTANT1( \
+ TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), \
+ "ScheduleStyleInvalidationTracking", \
+ "data", \
+ InspectorScheduleStyleInvalidationTrackingEvent::changeType((element), (invalidationSet), __VA_ARGS__))
+
class InspectorStyleRecalcInvalidationTrackingEvent {
public:
static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(Node*, const StyleChangeReasonForTracing&);

Powered by Google App Engine
This is Rietveld 408576698