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

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

Issue 1922223003: Change linesBoundingBox to return LayoutRect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/LayoutTreeAsText.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp b/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp
index 9ba4d6e00bf872ffda085e6a873d279a25ae70fe..b0adbcb95fa7436e5b1abaaedfb44ca4fa888a4c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp
@@ -191,14 +191,15 @@ void LayoutTreeAsText::writeLayoutObject(TextStream& ts, const LayoutObject& o,
// FIXME: Would be better to dump the bounding box x and y rather than the first run's x and y, but that would involve updating
// many test results.
const LayoutText& text = toLayoutText(o);
- IntRect linesBox = text.linesBoundingBox();
+ IntRect linesBox = enclosingIntRect(text.linesBoundingBox());
r = LayoutRect(IntRect(text.firstRunX(), text.firstRunY(), linesBox.width(), linesBox.height()));
if (adjustForTableCells && !text.hasTextBoxes())
adjustForTableCells = false;
} else if (o.isLayoutInline()) {
// FIXME: Would be better not to just dump 0, 0 as the x and y here.
const LayoutInline& inlineFlow = toLayoutInline(o);
- r = LayoutRect(IntRect(0, 0, inlineFlow.linesBoundingBox().width(), inlineFlow.linesBoundingBox().height()));
+ IntRect linesBox = enclosingIntRect(inlineFlow.linesBoundingBox());
+ r = LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height()));
adjustForTableCells = false;
} else if (o.isTableCell()) {
// FIXME: Deliberately dump the "inner" box of table cells, since that is what current results reflect. We'd like
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698