| Index: Source/core/layout/TracedLayoutObject.cpp
|
| diff --git a/Source/core/layout/TracedLayoutObject.cpp b/Source/core/layout/TracedLayoutObject.cpp
|
| index 68f5281b12a3a960c08690bfdbd5d7605bf8c6d5..ee60df3dcdedfef88bb996b50d8a887137531a8c 100644
|
| --- a/Source/core/layout/TracedLayoutObject.cpp
|
| +++ b/Source/core/layout/TracedLayoutObject.cpp
|
| @@ -13,9 +13,9 @@
|
|
|
| namespace blink {
|
|
|
| -PassRefPtr<TraceEvent::ConvertableToTraceFormat> TracedLayoutObject::create(const LayoutView& view)
|
| +PassRefPtr<TraceEvent::ConvertableToTraceFormat> TracedLayoutObject::create(const LayoutView& view, bool traceGeometry)
|
| {
|
| - return adoptRef(new TracedLayoutObject(view));
|
| + return adoptRef(new TracedLayoutObject(view, traceGeometry));
|
| }
|
|
|
| String TracedLayoutObject::asTraceFormat() const
|
| @@ -26,7 +26,7 @@ String TracedLayoutObject::asTraceFormat() const
|
| return builder.toString();
|
| }
|
|
|
| -TracedLayoutObject::TracedLayoutObject(const LayoutObject& object)
|
| +TracedLayoutObject::TracedLayoutObject(const LayoutObject& object, bool traceGeometry)
|
| : m_address((unsigned long) &object)
|
| , m_isAnonymous(object.isAnonymous())
|
| , m_isPositioned(object.isOutOfFlowPositioned())
|
| @@ -39,7 +39,7 @@ TracedLayoutObject::TracedLayoutObject(const LayoutObject& object)
|
| , m_posChildNeeds(object.posChildNeedsLayout())
|
| , m_isTableCell(object.isTableCell())
|
| , m_name(String(object.name()).isolatedCopy())
|
| - , m_absRect(object.absoluteBoundingBoxRect())
|
| + , m_absRect(traceGeometry ? object.absoluteBoundingBoxRect() : IntRect())
|
| {
|
| if (Node* node = object.node()) {
|
| m_tag = String(node->nodeName()).isolatedCopy();
|
| @@ -58,12 +58,14 @@ TracedLayoutObject::TracedLayoutObject(const LayoutObject& object)
|
|
|
| // FIXME: When the fixmes in LayoutTreeAsText::writeLayoutObject() are
|
| // fixed, deduplicate it with this.
|
| - if (object.isText()) {
|
| - m_rect = LayoutRect(toLayoutText(object).linesBoundingBox());
|
| - } else if (object.isLayoutInline()) {
|
| - m_rect = LayoutRect(toLayoutInline(object).linesBoundingBox());
|
| - } else if (object.isBox()) {
|
| - m_rect = toLayoutBox(&object)->frameRect();
|
| + if (traceGeometry) {
|
| + if (object.isText()) {
|
| + m_rect = LayoutRect(toLayoutText(object).linesBoundingBox());
|
| + } else if (object.isLayoutInline()) {
|
| + m_rect = LayoutRect(toLayoutInline(object).linesBoundingBox());
|
| + } else if (object.isBox()) {
|
| + m_rect = toLayoutBox(&object)->frameRect();
|
| + }
|
| }
|
|
|
| if (m_isTableCell) {
|
| @@ -78,7 +80,7 @@ TracedLayoutObject::TracedLayoutObject(const LayoutObject& object)
|
| }
|
|
|
| for (LayoutObject* child = object.slowFirstChild(); child; child = child->nextSibling()) {
|
| - m_children.append(adoptRef(new TracedLayoutObject(*child)));
|
| + m_children.append(adoptRef(new TracedLayoutObject(*child, traceGeometry)));
|
| }
|
| }
|
|
|
|
|