OLD | NEW |
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 #include "config.h" | 5 #include "config.h" |
6 #include "core/inspector/InspectorTraceEvents.h" | 6 #include "core/inspector/InspectorTraceEvents.h" |
7 | 7 |
8 #include "bindings/core/v8/ScriptCallStackFactory.h" | 8 #include "bindings/core/v8/ScriptCallStackFactory.h" |
9 #include "bindings/core/v8/ScriptGCEvent.h" | 9 #include "bindings/core/v8/ScriptGCEvent.h" |
10 #include "bindings/core/v8/ScriptSourceCode.h" | 10 #include "bindings/core/v8/ScriptSourceCode.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 } | 161 } |
162 | 162 |
163 PassRefPtr<TracedValue> InspectorScheduleStyleInvalidationTrackingEvent::fillCom
monPart(Element& element, const DescendantInvalidationSet& invalidationSet, cons
t char* invalidatedSelector) | 163 PassRefPtr<TracedValue> InspectorScheduleStyleInvalidationTrackingEvent::fillCom
monPart(Element& element, const DescendantInvalidationSet& invalidationSet, cons
t char* invalidatedSelector) |
164 { | 164 { |
165 RefPtr<TracedValue> value = TracedValue::create(); | 165 RefPtr<TracedValue> value = TracedValue::create(); |
166 value->setString("frame", toHexString(element.document().frame())); | 166 value->setString("frame", toHexString(element.document().frame())); |
167 setNodeInfo(value.get(), &element, "nodeId", "nodeName"); | 167 setNodeInfo(value.get(), &element, "nodeId", "nodeName"); |
168 value->setString("invalidationSet", descendantInvalidationSetToIdString(inva
lidationSet)); | 168 value->setString("invalidationSet", descendantInvalidationSetToIdString(inva
lidationSet)); |
169 value->setString("invalidatedSelectorId", invalidatedSelector); | 169 value->setString("invalidatedSelectorId", invalidatedSelector); |
170 if (RefPtrWillBeRawPtr<ScriptCallStack> stackTrace = createScriptCallStack(m
axInvalidationTrackingCallstackSize, true)) | 170 if (RefPtrWillBeRawPtr<ScriptCallStack> stackTrace = createScriptCallStack(m
axInvalidationTrackingCallstackSize, true)) |
171 value->setArray("stackTrace", stackTrace->buildInspectorArray()->asArray
()); | 171 stackTrace->toTracedValue(value.get(), "stackTrace"); |
172 return value.release(); | 172 return value.release(); |
173 } | 173 } |
174 | 174 |
175 const char InspectorScheduleStyleInvalidationTrackingEvent::Attribute[] = "attri
bute"; | 175 const char InspectorScheduleStyleInvalidationTrackingEvent::Attribute[] = "attri
bute"; |
176 const char InspectorScheduleStyleInvalidationTrackingEvent::Class[] = "class"; | 176 const char InspectorScheduleStyleInvalidationTrackingEvent::Class[] = "class"; |
177 const char InspectorScheduleStyleInvalidationTrackingEvent::Id[] = "id"; | 177 const char InspectorScheduleStyleInvalidationTrackingEvent::Id[] = "id"; |
178 const char InspectorScheduleStyleInvalidationTrackingEvent::Pseudo[] = "pseudo"; | 178 const char InspectorScheduleStyleInvalidationTrackingEvent::Pseudo[] = "pseudo"; |
179 | 179 |
180 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorScheduleStyleInvalidat
ionTrackingEvent::idChange(Element& element, const DescendantInvalidationSet& in
validationSet, const AtomicString& id) | 180 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorScheduleStyleInvalidat
ionTrackingEvent::idChange(Element& element, const DescendantInvalidationSet& in
validationSet, const AtomicString& id) |
181 { | 181 { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorStyleRecalcInvalidatio
nTrackingEvent::data(Node* node, const StyleChangeReasonForTracing& reason) | 252 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorStyleRecalcInvalidatio
nTrackingEvent::data(Node* node, const StyleChangeReasonForTracing& reason) |
253 { | 253 { |
254 ASSERT(node); | 254 ASSERT(node); |
255 | 255 |
256 RefPtr<TracedValue> value = TracedValue::create(); | 256 RefPtr<TracedValue> value = TracedValue::create(); |
257 value->setString("frame", toHexString(node->document().frame())); | 257 value->setString("frame", toHexString(node->document().frame())); |
258 setNodeInfo(value.get(), node, "nodeId", "nodeName"); | 258 setNodeInfo(value.get(), node, "nodeId", "nodeName"); |
259 value->setString("reason", reason.reasonString()); | 259 value->setString("reason", reason.reasonString()); |
260 value->setString("extraData", reason.extraData()); | 260 value->setString("extraData", reason.extraData()); |
261 if (RefPtrWillBeRawPtr<ScriptCallStack> stackTrace = createScriptCallStack(m
axInvalidationTrackingCallstackSize, true)) | 261 if (RefPtrWillBeRawPtr<ScriptCallStack> stackTrace = createScriptCallStack(m
axInvalidationTrackingCallstackSize, true)) |
262 value->setArray("stackTrace", stackTrace->buildInspectorArray()->asArray
()); | 262 stackTrace->toTracedValue(value.get(), "stackTrace"); |
263 return value.release(); | 263 return value.release(); |
264 } | 264 } |
265 | 265 |
266 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorLayoutEvent::beginData
(FrameView* frameView) | 266 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorLayoutEvent::beginData
(FrameView* frameView) |
267 { | 267 { |
268 bool isPartial; | 268 bool isPartial; |
269 unsigned needsLayoutObjects; | 269 unsigned needsLayoutObjects; |
270 unsigned totalObjects; | 270 unsigned totalObjects; |
271 LocalFrame& frame = frameView->frame(); | 271 LocalFrame& frame = frameView->frame(); |
272 frame.countObjectsNeedingLayout(needsLayoutObjects, totalObjects, isPartial)
; | 272 frame.countObjectsNeedingLayout(needsLayoutObjects, totalObjects, isPartial)
; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 return value.release(); | 319 return value.release(); |
320 } | 320 } |
321 | 321 |
322 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorLayoutInvalidationTrac
kingEvent::data(const RenderObject* renderer) | 322 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorLayoutInvalidationTrac
kingEvent::data(const RenderObject* renderer) |
323 { | 323 { |
324 ASSERT(renderer); | 324 ASSERT(renderer); |
325 RefPtr<TracedValue> value = TracedValue::create(); | 325 RefPtr<TracedValue> value = TracedValue::create(); |
326 value->setString("frame", toHexString(renderer->frame())); | 326 value->setString("frame", toHexString(renderer->frame())); |
327 setGeneratingNodeInfo(value.get(), renderer, "nodeId", "nodeName"); | 327 setGeneratingNodeInfo(value.get(), renderer, "nodeId", "nodeName"); |
328 if (RefPtrWillBeRawPtr<ScriptCallStack> stackTrace = createScriptCallStack(m
axInvalidationTrackingCallstackSize, true)) | 328 if (RefPtrWillBeRawPtr<ScriptCallStack> stackTrace = createScriptCallStack(m
axInvalidationTrackingCallstackSize, true)) |
329 value->setArray("stackTrace", stackTrace->buildInspectorArray()->asArray
()); | 329 stackTrace->toTracedValue(value.get(), "stackTrace"); |
330 return value.release(); | 330 return value.release(); |
331 } | 331 } |
332 | 332 |
333 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorPaintInvalidationTrack
ingEvent::data(const RenderObject* renderer, const RenderObject* paintContainer) | 333 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorPaintInvalidationTrack
ingEvent::data(const RenderObject* renderer, const RenderObject* paintContainer) |
334 { | 334 { |
335 ASSERT(renderer); | 335 ASSERT(renderer); |
336 RefPtr<TracedValue> value = TracedValue::create(); | 336 RefPtr<TracedValue> value = TracedValue::create(); |
337 value->setString("frame", toHexString(renderer->frame())); | 337 value->setString("frame", toHexString(renderer->frame())); |
338 setGeneratingNodeInfo(value.get(), paintContainer, "paintId"); | 338 setGeneratingNodeInfo(value.get(), paintContainer, "paintId"); |
339 setGeneratingNodeInfo(value.get(), renderer, "nodeId", "nodeName"); | 339 setGeneratingNodeInfo(value.get(), renderer, "nodeId", "nodeName"); |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 | 606 |
607 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTracingSessionIdForWor
kerEvent::data(const String& sessionId, WorkerThread* workerThread) | 607 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTracingSessionIdForWor
kerEvent::data(const String& sessionId, WorkerThread* workerThread) |
608 { | 608 { |
609 RefPtr<TracedValue> value = TracedValue::create(); | 609 RefPtr<TracedValue> value = TracedValue::create(); |
610 value->setString("sessionId", sessionId); | 610 value->setString("sessionId", sessionId); |
611 value->setDouble("workerThreadId", workerThread->platformThreadId()); | 611 value->setDouble("workerThreadId", workerThread->platformThreadId()); |
612 return value.release(); | 612 return value.release(); |
613 } | 613 } |
614 | 614 |
615 } | 615 } |
OLD | NEW |