| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorParseHtmlEvent::beginD
ata(Document* document, unsigned startLine) | 200 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorParseHtmlEvent::beginD
ata(Document* document, unsigned startLine) |
| 201 { | 201 { |
| 202 RefPtr<TracedValue> value = TracedValue::create(); | 202 RefPtr<TracedValue> value = TracedValue::create(); |
| 203 value->setInteger("startLine", startLine); | 203 value->setInteger("startLine", startLine); |
| 204 value->setString("frame", toHexString(document->frame())); | 204 value->setString("frame", toHexString(document->frame())); |
| 205 return value; | 205 return value; |
| 206 } | 206 } |
| 207 | 207 |
| 208 static void localToPageQuad(const RenderObject& renderer, const LayoutRect& rect
, FloatQuad* quad) | 208 static void localToPageQuad(const RenderObject& renderer, const LayoutRect& rect
, FloatQuad* quad) |
| 209 { | 209 { |
| 210 LocalFrame* frame = renderer.frame(); | |
| 211 FrameView* view = frame->view(); | |
| 212 FloatQuad absolute = renderer.localToAbsoluteQuad(FloatQuad(rect)); | 210 FloatQuad absolute = renderer.localToAbsoluteQuad(FloatQuad(rect)); |
| 213 quad->setP1(view->contentsToRootView(roundedIntPoint(absolute.p1()))); | 211 quad->setP1(roundedIntPoint(absolute.p1())); |
| 214 quad->setP2(view->contentsToRootView(roundedIntPoint(absolute.p2()))); | 212 quad->setP2(roundedIntPoint(absolute.p2())); |
| 215 quad->setP3(view->contentsToRootView(roundedIntPoint(absolute.p3()))); | 213 quad->setP3(roundedIntPoint(absolute.p3())); |
| 216 quad->setP4(view->contentsToRootView(roundedIntPoint(absolute.p4()))); | 214 quad->setP4(roundedIntPoint(absolute.p4())); |
| 217 } | 215 } |
| 218 | 216 |
| 219 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorPaintEvent::data(Rende
rObject* renderer, const LayoutRect& clipRect, const GraphicsLayer* graphicsLaye
r) | 217 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorPaintEvent::data(Rende
rObject* renderer, const LayoutRect& clipRect, const GraphicsLayer* graphicsLaye
r) |
| 220 { | 218 { |
| 221 RefPtr<TracedValue> value = TracedValue::create(); | 219 RefPtr<TracedValue> value = TracedValue::create(); |
| 222 value->setString("frame", toHexString(renderer->frame())); | 220 value->setString("frame", toHexString(renderer->frame())); |
| 223 FloatQuad quad; | 221 FloatQuad quad; |
| 224 localToPageQuad(*renderer, clipRect, &quad); | 222 localToPageQuad(*renderer, clipRect, &quad); |
| 225 createQuad(value.get(), "clip", quad); | 223 createQuad(value.get(), "clip", quad); |
| 226 setGeneratingNodeId(value.get(), "nodeId", renderer); | 224 setGeneratingNodeId(value.get(), "nodeId", renderer); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTimeStampEvent::data(E
xecutionContext* context, const String& message) | 305 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTimeStampEvent::data(E
xecutionContext* context, const String& message) |
| 308 { | 306 { |
| 309 RefPtr<TracedValue> value = TracedValue::create(); | 307 RefPtr<TracedValue> value = TracedValue::create(); |
| 310 value->setString("message", message); | 308 value->setString("message", message); |
| 311 if (LocalFrame* frame = frameForExecutionContext(context)) | 309 if (LocalFrame* frame = frameForExecutionContext(context)) |
| 312 value->setString("frame", toHexString(frame)); | 310 value->setString("frame", toHexString(frame)); |
| 313 return value; | 311 return value; |
| 314 } | 312 } |
| 315 | 313 |
| 316 } | 314 } |
| OLD | NEW |