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

Side by Side 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: rebased 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 unified diff | Download patch
« no previous file with comments | « Source/core/css/RuleFeature.cpp ('k') | Source/core/inspector/InspectorTraceEvents.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef InspectorTraceEvents_h 5 #ifndef InspectorTraceEvents_h
6 #define InspectorTraceEvents_h 6 #define InspectorTraceEvents_h
7 7
8 #include "core/css/CSSSelector.h"
8 #include "platform/EventTracer.h" 9 #include "platform/EventTracer.h"
9 #include "platform/TraceEvent.h" 10 #include "platform/TraceEvent.h"
10 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
11 #include "wtf/Forward.h" 12 #include "wtf/Forward.h"
12 #include "wtf/Functional.h" 13 #include "wtf/Functional.h"
13 14
14 namespace blink { 15 namespace blink {
15 16
16 class DescendantInvalidationSet; 17 class DescendantInvalidationSet;
17 class Document; 18 class Document;
18 class Element; 19 class Element;
19 class Event; 20 class Event;
20 class ExecutionContext; 21 class ExecutionContext;
21 class FrameView; 22 class FrameView;
22 class GraphicsLayer; 23 class GraphicsLayer;
23 class KURL; 24 class KURL;
24 class LayoutRect; 25 class LayoutRect;
25 class LocalFrame; 26 class LocalFrame;
26 class Node; 27 class Node;
28 class QualifiedName;
27 class RenderImage; 29 class RenderImage;
28 class RenderLayer; 30 class RenderLayer;
29 class RenderObject; 31 class RenderObject;
30 class ResourceRequest; 32 class ResourceRequest;
31 class ResourceResponse; 33 class ResourceResponse;
32 class StyleChangeReasonForTracing; 34 class StyleChangeReasonForTracing;
33 class TracedValue; 35 class TracedValue;
34 class WorkerThread; 36 class WorkerThread;
35 class XMLHttpRequest; 37 class XMLHttpRequest;
36 38
37 class InspectorLayoutEvent { 39 class InspectorLayoutEvent {
38 public: 40 public:
39 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> beginData(FrameView* ); 41 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> beginData(FrameView* );
40 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> endData(RenderObject * rootForThisLayout); 42 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> endData(RenderObject * rootForThisLayout);
41 }; 43 };
42 44
45 class InspectorScheduleStyleInvalidationTrackingEvent {
46 public:
47 static const char Attribute[];
48 static const char Class[];
49 static const char Id[];
50 static const char Pseudo[];
51
52 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> attributeChange(Elem ent&, const DescendantInvalidationSet&, const QualifiedName&);
53 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> classChange(Element& , const DescendantInvalidationSet&, const AtomicString&);
54 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> idChange(Element&, c onst DescendantInvalidationSet&, const AtomicString&);
55 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> pseudoChange(Element &, const DescendantInvalidationSet&, CSSSelector::PseudoType);
56
57 private:
58 static PassRefPtr<TracedValue> fillCommonPart(Element&, const DescendantInva lidationSet&, const char* invalidatedSelector);
59 };
60
61 #define TRACE_SCHEDULE_STYLE_INVALIDATION(element, invalidationSet, changeType, ...) \
62 TRACE_EVENT_INSTANT1( \
63 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), \
64 "ScheduleStyleInvalidationTracking", \
65 "data", \
66 InspectorScheduleStyleInvalidationTrackingEvent::changeType((element), ( invalidationSet), __VA_ARGS__))
67
43 class InspectorStyleRecalcInvalidationTrackingEvent { 68 class InspectorStyleRecalcInvalidationTrackingEvent {
44 public: 69 public:
45 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(Node*, const St yleChangeReasonForTracing&); 70 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(Node*, const St yleChangeReasonForTracing&);
46 }; 71 };
47 72
48 String descendantInvalidationSetToIdString(const DescendantInvalidationSet&); 73 String descendantInvalidationSetToIdString(const DescendantInvalidationSet&);
49 74
50 class InspectorStyleInvalidatorInvalidateEvent { 75 class InspectorStyleInvalidatorInvalidateEvent {
51 public: 76 public:
52 static const char ElementHasPendingInvalidationList[]; 77 static const char ElementHasPendingInvalidationList[];
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 249
225 class InspectorTracingSessionIdForWorkerEvent { 250 class InspectorTracingSessionIdForWorkerEvent {
226 public: 251 public:
227 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const String& s essionId, WorkerThread*); 252 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const String& s essionId, WorkerThread*);
228 }; 253 };
229 254
230 } // namespace blink 255 } // namespace blink
231 256
232 257
233 #endif // !defined(InspectorTraceEvents_h) 258 #endif // !defined(InspectorTraceEvents_h)
OLDNEW
« no previous file with comments | « Source/core/css/RuleFeature.cpp ('k') | Source/core/inspector/InspectorTraceEvents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698