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

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: 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 unified diff | Download patch
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 class InspectorStyleInvalidatorInvalidateEvent { 73 class InspectorStyleInvalidatorInvalidateEvent {
49 public: 74 public:
50 static const char ElementHasPendingInvalidationList[]; 75 static const char ElementHasPendingInvalidationList[];
51 static const char InvalidateCustomPseudo[]; 76 static const char InvalidateCustomPseudo[];
52 static const char InvalidationSetMatchedAttribute[]; 77 static const char InvalidationSetMatchedAttribute[];
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 247
223 class InspectorTracingSessionIdForWorkerEvent { 248 class InspectorTracingSessionIdForWorkerEvent {
224 public: 249 public:
225 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const String& s essionId, WorkerThread*); 250 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> data(const String& s essionId, WorkerThread*);
226 }; 251 };
227 252
228 } // namespace blink 253 } // namespace blink
229 254
230 255
231 #endif // !defined(InspectorTraceEvents_h) 256 #endif // !defined(InspectorTraceEvents_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698