| Index: third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp b/third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp
|
| index fddb6c4aea6748ba1ea9a99221dffb885c1b9f6c..87fb70efad53ba02cb66a25dbc5ca45ab27890b7 100644
|
| --- a/third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp
|
| @@ -4,10 +4,14 @@
|
|
|
| #include "core/layout/TracedLayoutObject.h"
|
|
|
| +#include "core/frame/FrameView.h"
|
| #include "core/layout/LayoutInline.h"
|
| +#include "core/layout/LayoutPart.h"
|
| #include "core/layout/LayoutTableCell.h"
|
| #include "core/layout/LayoutText.h"
|
| #include "core/layout/LayoutView.h"
|
| +#include "public/web/WebLocalFrame.h"
|
| +#include "web/WebLocalFrameImpl.h"
|
| #include <inttypes.h>
|
|
|
| namespace blink {
|
| @@ -16,6 +20,17 @@ namespace {
|
|
|
| void dumpToTracedValue(const LayoutObject& object, bool traceGeometry, TracedValue* tracedValue)
|
| {
|
| + if (object.isLayoutPart()) {
|
| + FrameView* frameView = toFrameView(toLayoutPart(object).widget());
|
| + if (frameView) {
|
| + WebLocalFrame* frame = WebLocalFrameImpl::fromFrame(frameView->frame());
|
| + tracedValue->beginDictionary("tree");
|
| + tracedValue->setString("scope", "LayoutTree");
|
| + tracedValue->setString("id_ref", String::format("%p", frame));
|
| + tracedValue->endDictionary();
|
| + }
|
| + }
|
| +
|
| tracedValue->setString("address", String::format("%" PRIxPTR, reinterpret_cast<uintptr_t>(&object)));
|
| tracedValue->setString("name", object.name());
|
| if (Node* node = object.node()) {
|
| @@ -30,6 +45,10 @@ void dumpToTracedValue(const LayoutObject& object, bool traceGeometry, TracedVal
|
| tracedValue->pushString(element.classNames()[i]);
|
| tracedValue->endArray();
|
| }
|
| + if (object.isLayoutIFrame()
|
| + || object.isLayoutImage()
|
| + || object.isVideo())
|
| + tracedValue->setString("src", element.getAttribute("src"));
|
| }
|
| }
|
|
|
| @@ -70,8 +89,11 @@ void dumpToTracedValue(const LayoutObject& object, bool traceGeometry, TracedVal
|
| tracedValue->setBoolean("posChildNeeds", object.posChildNeedsLayout());
|
| if (object.isTableCell()) {
|
| const LayoutTableCell& c = toLayoutTableCell(object);
|
| - tracedValue->setDouble("row", c.rowIndex());
|
| - tracedValue->setDouble("col", c.absoluteColumnIndex());
|
| + if (c.row()->rowIndexWasSet() &&
|
| + (!c.row()->section() || !c.row()->section()->needsCellRecalc()))
|
| + tracedValue->setDouble("row", c.rowIndex());
|
| + if (c.hasSetAbsoluteColumnIndex())
|
| + tracedValue->setDouble("col", c.absoluteColumnIndex());
|
| if (c.rowSpan() != 1)
|
| tracedValue->setDouble("rowSpan", c.rowSpan());
|
| if (c.colSpan() != 1)
|
| @@ -103,6 +125,19 @@ PassOwnPtr<TracedValue> TracedLayoutObject::create(const LayoutView& view, bool
|
| {
|
| OwnPtr<TracedValue> tracedValue = TracedValue::create();
|
| dumpToTracedValue(view, traceGeometry, tracedValue.get());
|
| +
|
| + LayoutObject* o = view.frameView()->frame().ownerLayoutObject();
|
| + if (o) {
|
| + FrameView* frameView = toFrameView(toLayoutPart(o)->widget());
|
| + if (frameView) {
|
| + WebLocalFrame* wlf = WebLocalFrameImpl::fromFrame(frameView->frame());
|
| + tracedValue->beginDictionary("owner");
|
| + tracedValue->setString("LayoutObject", String::format("%" PRIxPTR, reinterpret_cast<uintptr_t>(o)));
|
| + tracedValue->setString("LayoutTree", String::format("%p", wlf));
|
| + tracedValue->endDictionary();
|
| + }
|
| + }
|
| +
|
| return tracedValue;
|
| }
|
|
|
|
|