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

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

Issue 2280153002: Refactoring out the code in LayoutTreeAsText::writeLayoutObject. (Closed)
Patch Set: Rebase Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..91ae0e3b5aa9fe04c20fcf9f9c341d5c56179ca8 100644
--- a/third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp
@@ -39,13 +39,7 @@ void dumpToTracedValue(const LayoutObject& object, bool traceGeometry, TracedVal
if (traceGeometry) {
tracedValue->setDouble("absX", object.absoluteBoundingBoxRect().x());
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());
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698