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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 160 } |
161 | 161 |
162 } | 162 } |
163 | 163 |
164 PassRefPtr<TracedValue> InspectorScheduleStyleInvalidationTrackingEvent::fillCom
monPart(Element& element, const DescendantInvalidationSet& invalidationSet, cons
t char* invalidatedSelector) | 164 PassRefPtr<TracedValue> InspectorScheduleStyleInvalidationTrackingEvent::fillCom
monPart(Element& element, const DescendantInvalidationSet& invalidationSet, cons
t char* invalidatedSelector) |
165 { | 165 { |
166 RefPtr<TracedValue> value = TracedValue::create(); | 166 RefPtr<TracedValue> value = TracedValue::create(); |
167 value->setString("frame", toHexString(element.document().frame())); | 167 value->setString("frame", toHexString(element.document().frame())); |
168 setNodeInfo(value.get(), &element, "nodeId", "nodeName"); | 168 setNodeInfo(value.get(), &element, "nodeId", "nodeName"); |
169 value->setString("invalidationSet", descendantInvalidationSetToIdString(inva
lidationSet)); | 169 value->setString("invalidationSet", descendantInvalidationSetToIdString(inva
lidationSet)); |
170 value->setString("InvalidatedSelectorId", invalidatedSelector); | 170 value->setString("invalidatedSelectorId", invalidatedSelector); |
171 if (RefPtrWillBeRawPtr<ScriptCallStack> stackTrace = createScriptCallStack(m
axInvalidationTrackingCallstackSize, true)) | 171 if (RefPtrWillBeRawPtr<ScriptCallStack> stackTrace = createScriptCallStack(m
axInvalidationTrackingCallstackSize, true)) |
172 value->setArray("stackTrace", stackTrace->buildInspectorArray()->asArray
()); | 172 value->setArray("stackTrace", stackTrace->buildInspectorArray()->asArray
()); |
173 return value.release(); | 173 return value.release(); |
174 } | 174 } |
175 | 175 |
176 const char InspectorScheduleStyleInvalidationTrackingEvent::Attribute[] = "attri
bute"; | 176 const char InspectorScheduleStyleInvalidationTrackingEvent::Attribute[] = "attri
bute"; |
177 const char InspectorScheduleStyleInvalidationTrackingEvent::Class[] = "class"; | 177 const char InspectorScheduleStyleInvalidationTrackingEvent::Class[] = "class"; |
178 const char InspectorScheduleStyleInvalidationTrackingEvent::Id[] = "id"; | 178 const char InspectorScheduleStyleInvalidationTrackingEvent::Id[] = "id"; |
179 const char InspectorScheduleStyleInvalidationTrackingEvent::Pseudo[] = "pseudo"; | 179 const char InspectorScheduleStyleInvalidationTrackingEvent::Pseudo[] = "pseudo"; |
180 | 180 |
(...skipping 24 matching lines...) Expand all Loading... |
205 value->setString("changedPseudo", pseudoTypeToString(pseudoType)); | 205 value->setString("changedPseudo", pseudoTypeToString(pseudoType)); |
206 return value.release(); | 206 return value.release(); |
207 } | 207 } |
208 | 208 |
209 String descendantInvalidationSetToIdString(const DescendantInvalidationSet& set) | 209 String descendantInvalidationSetToIdString(const DescendantInvalidationSet& set) |
210 { | 210 { |
211 return toHexString(&set); | 211 return toHexString(&set); |
212 } | 212 } |
213 | 213 |
214 const char InspectorStyleInvalidatorInvalidateEvent::ElementHasPendingInvalidati
onList[] = "Element has pending invalidation list"; | 214 const char InspectorStyleInvalidatorInvalidateEvent::ElementHasPendingInvalidati
onList[] = "Element has pending invalidation list"; |
215 const char InspectorStyleInvalidatorInvalidateEvent::InvalidateCustomPseudo[] =
"Invalidate custom pseudo element."; | 215 const char InspectorStyleInvalidatorInvalidateEvent::InvalidateCustomPseudo[] =
"Invalidate custom pseudo element"; |
216 const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedAttri
bute[] = "Invalidation set matched attribute."; | 216 const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedAttri
bute[] = "Invalidation set matched attribute"; |
217 const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedClass
[] = "Invalidation set matched class."; | 217 const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedClass
[] = "Invalidation set matched class"; |
218 const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedId[]
= "Invalidation set matched id."; | 218 const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedId[]
= "Invalidation set matched id"; |
219 const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedTagNa
me[] = "Invalidation set matched tagName."; | 219 const char InspectorStyleInvalidatorInvalidateEvent::InvalidationSetMatchedTagNa
me[] = "Invalidation set matched tagName"; |
220 const char InspectorStyleInvalidatorInvalidateEvent::PreventStyleSharingForParen
t[] = "Prevent style sharing for parent."; | 220 const char InspectorStyleInvalidatorInvalidateEvent::PreventStyleSharingForParen
t[] = "Prevent style sharing for parent"; |
221 | 221 |
222 PassRefPtr<TracedValue> InspectorStyleInvalidatorInvalidateEvent::fillCommonPart
(Element& element, const char* reason) | 222 PassRefPtr<TracedValue> InspectorStyleInvalidatorInvalidateEvent::fillCommonPart
(Element& element, const char* reason) |
223 { | 223 { |
224 RefPtr<TracedValue> value = TracedValue::create(); | 224 RefPtr<TracedValue> value = TracedValue::create(); |
225 value->setString("frame", toHexString(element.document().frame())); | 225 value->setString("frame", toHexString(element.document().frame())); |
226 setNodeInfo(value.get(), &element, "nodeId", "nodeName"); | 226 setNodeInfo(value.get(), &element, "nodeId", "nodeName"); |
227 value->setString("reason", reason); | 227 value->setString("reason", reason); |
228 return value.release(); | 228 return value.release(); |
229 } | 229 } |
230 | 230 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 { | 481 { |
482 LocalFrame* frame = renderer.frame(); | 482 LocalFrame* frame = renderer.frame(); |
483 FrameView* view = frame->view(); | 483 FrameView* view = frame->view(); |
484 FloatQuad absolute = renderer.localToAbsoluteQuad(FloatQuad(rect)); | 484 FloatQuad absolute = renderer.localToAbsoluteQuad(FloatQuad(rect)); |
485 quad->setP1(view->contentsToRootView(roundedIntPoint(absolute.p1()))); | 485 quad->setP1(view->contentsToRootView(roundedIntPoint(absolute.p1()))); |
486 quad->setP2(view->contentsToRootView(roundedIntPoint(absolute.p2()))); | 486 quad->setP2(view->contentsToRootView(roundedIntPoint(absolute.p2()))); |
487 quad->setP3(view->contentsToRootView(roundedIntPoint(absolute.p3()))); | 487 quad->setP3(view->contentsToRootView(roundedIntPoint(absolute.p3()))); |
488 quad->setP4(view->contentsToRootView(roundedIntPoint(absolute.p4()))); | 488 quad->setP4(view->contentsToRootView(roundedIntPoint(absolute.p4()))); |
489 } | 489 } |
490 | 490 |
491 const char InspectorLayerInvalidationTrackingEvent::SquashingLayerGeometryWasUpd
ated[] = "Squashing layer geometry was updated."; | 491 const char InspectorLayerInvalidationTrackingEvent::SquashingLayerGeometryWasUpd
ated[] = "Squashing layer geometry was updated"; |
492 const char InspectorLayerInvalidationTrackingEvent::AddedToSquashingLayer[] = "T
he layer may have been added to an already-existing squashing layer."; | 492 const char InspectorLayerInvalidationTrackingEvent::AddedToSquashingLayer[] = "T
he layer may have been added to an already-existing squashing layer"; |
493 const char InspectorLayerInvalidationTrackingEvent::RemovedFromSquashingLayer[]
= "Removed the layer from a squashing layer."; | 493 const char InspectorLayerInvalidationTrackingEvent::RemovedFromSquashingLayer[]
= "Removed the layer from a squashing layer"; |
494 const char InspectorLayerInvalidationTrackingEvent::ReflectionLayerChanged[] = "
Reflection layer change."; | 494 const char InspectorLayerInvalidationTrackingEvent::ReflectionLayerChanged[] = "
Reflection layer change"; |
495 const char InspectorLayerInvalidationTrackingEvent::NewCompositedLayer[] = "Assi
gned a new composited layer."; | 495 const char InspectorLayerInvalidationTrackingEvent::NewCompositedLayer[] = "Assi
gned a new composited layer"; |
496 const char InspectorLayerInvalidationTrackingEvent::AncestorRequiresNewLayer[] =
"A new composited layer is needed based on the RenderLayer's compositing ancest
or's properties."; | 496 const char InspectorLayerInvalidationTrackingEvent::AncestorRequiresNewLayer[] =
"A new composited layer is needed based on the RenderLayer's compositing ancest
or's properties"; |
497 | 497 |
498 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorLayerInvalidationTrack
ingEvent::data(const RenderLayer* layer, const char* reason) | 498 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorLayerInvalidationTrack
ingEvent::data(const RenderLayer* layer, const char* reason) |
499 { | 499 { |
500 const RenderObject* paintInvalidationContainer = layer->renderer()->containe
rForPaintInvalidation(); | 500 const RenderObject* paintInvalidationContainer = layer->renderer()->containe
rForPaintInvalidation(); |
501 | 501 |
502 RefPtr<TracedValue> value = TracedValue::create(); | 502 RefPtr<TracedValue> value = TracedValue::create(); |
503 value->setString("frame", toHexString(paintInvalidationContainer->frame())); | 503 value->setString("frame", toHexString(paintInvalidationContainer->frame())); |
504 setGeneratingNodeInfo(value.get(), paintInvalidationContainer, "paintId"); | 504 setGeneratingNodeInfo(value.get(), paintInvalidationContainer, "paintId"); |
505 value->setString("reason", reason); | 505 value->setString("reason", reason); |
506 return value.release(); | 506 return value.release(); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 | 607 |
608 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTracingSessionIdForWor
kerEvent::data(const String& sessionId, WorkerThread* workerThread) | 608 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTracingSessionIdForWor
kerEvent::data(const String& sessionId, WorkerThread* workerThread) |
609 { | 609 { |
610 RefPtr<TracedValue> value = TracedValue::create(); | 610 RefPtr<TracedValue> value = TracedValue::create(); |
611 value->setString("sessionId", sessionId); | 611 value->setString("sessionId", sessionId); |
612 value->setDouble("workerThreadId", workerThread->platformThreadId()); | 612 value->setDouble("workerThreadId", workerThread->platformThreadId()); |
613 return value.release(); | 613 return value.release(); |
614 } | 614 } |
615 | 615 |
616 } | 616 } |
OLD | NEW |