Chromium Code Reviews| Index: Source/core/layout/LayoutView.cpp |
| diff --git a/Source/core/layout/LayoutView.cpp b/Source/core/layout/LayoutView.cpp |
| index c1790151cc635db4c78a5b810bc41ca3bbf8b1be..9f3743d7308a479a3ad0b113ff31ee39d32c29b4 100644 |
| --- a/Source/core/layout/LayoutView.cpp |
| +++ b/Source/core/layout/LayoutView.cpp |
| @@ -28,6 +28,7 @@ |
| #include "core/frame/Settings.h" |
| #include "core/html/HTMLFrameOwnerElement.h" |
| #include "core/html/HTMLIFrameElement.h" |
| +#include "core/inspector/InspectorTraceEvents.h" |
| #include "core/layout/HitTestResult.h" |
| #include "core/layout/LayoutFlowThread.h" |
| #include "core/layout/LayoutGeometryMap.h" |
| @@ -83,38 +84,9 @@ bool LayoutView::hitTest(HitTestResult& result) |
| return hitTest(result.hitTestRequest(), result.hitTestLocation(), result); |
| } |
| -namespace { |
| - |
| -PassRefPtr<TracedValue> hitTestInfo(const HitTestRequest& request, const HitTestLocation& location, const HitTestResult& result) |
| -{ |
| - RefPtr<TracedValue> value(TracedValue::create()); |
| - value->setInteger("x", location.roundedPoint().x()); |
| - value->setInteger("y", location.roundedPoint().y()); |
| - if (location.isRectBasedTest()) |
| - value->setBoolean("rect", true); |
| - if (location.isRectilinear()) |
| - value->setBoolean("rectilinear", true); |
| - if (request.touchEvent()) |
| - value->setBoolean("touch", true); |
| - if (request.move()) |
| - value->setBoolean("move", true); |
| - if (request.listBased()) { |
| - value->setBoolean("listBased", true); |
| - } else if (Node* node = result.innerNode()) { |
| - value->setString("nodeAddress", String::format("%" PRIx64, static_cast<uint64>(reinterpret_cast<intptr_t>(node)))); |
| - value->setString("tag", node->nodeName()); |
| - Element* elem = result.innerElement(); |
| - if (elem && elem->hasID()) |
| - value->setString("htmlId", elem->getIdAttribute()); |
| - } |
| - return value; |
| -} |
| - |
| -} // anonymous namespace |
| - |
| bool LayoutView::hitTest(const HitTestRequest& request, const HitTestLocation& location, HitTestResult& result) |
| { |
| - TRACE_EVENT_BEGIN0("blink", "LayoutView::hitTest"); |
| + TRACE_EVENT_BEGIN0("blink,devtools.timeline", "HitTest"); |
| m_hitTestCount++; |
| ASSERT(!location.isRectBasedTest() || request.listBased()); |
| @@ -136,7 +108,7 @@ bool LayoutView::hitTest(const HitTestRequest& request, const HitTestLocation& l |
| if (Scrollbar* frameScrollbar = frameView()->scrollbarAtFramePoint(framePoint)) |
| result.setScrollbar(frameScrollbar); |
| - TRACE_EVENT_END1("blink", "LayoutView::hitTest", "info", hitTestInfo(request, location, result)); |
|
yurys
2015/06/09 16:39:52
Is there a special handling of the info param that
|
| + TRACE_EVENT_END1("blink,devtools.timeline", "HitTest", "endData", InspectorHitTestEvent::endData(request, location, result)); |
| return hitLayer; |
| } |