Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp

Issue 2280153002: Refactoring out the code in LayoutTreeAsText::writeLayoutObject. (Closed)
Patch Set: Initial commit Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 efc34549d1ec8945943d321e6697697066066893..2577df4c5f2935766b846aba3ace0f8b91407521 100644
--- a/third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp
@@ -37,15 +37,7 @@ void dumpToTracedValue(const LayoutObject& object, bool traceGeometry, TracedVal
// FIXME: When the fixmes in LayoutTreeAsText::writeLayoutObject() are
// fixed, deduplicate it with this.
if (traceGeometry) {
- tracedValue->setDouble("absX", object.absoluteBoundingBoxRect().x());
benjhayden 2016/08/29 20:45:27 Can you restore absX and absY? Sorry, I realize I
lunalu1 2016/08/30 20:35:30 Done.
- tracedValue->setDouble("absY", object.absoluteBoundingBoxRect().y());
- LayoutRect rect;
- if (object.isText())
- rect = LayoutRect(toLayoutText(object).linesBoundingBox());
- else if (object.isLayoutInline())
- rect = LayoutRect(toLayoutInline(object).linesBoundingBox());
- else if (object.isBox())
- rect = toLayoutBox(&object)->frameRect();
+ LayoutRect rect = object.debugRect();
tracedValue->setDouble("relX", rect.x());
tracedValue->setDouble("relY", rect.y());
tracedValue->setDouble("width", rect.width());

Powered by Google App Engine
This is Rietveld 408576698