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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutInline.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/LayoutInline.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutInline.cpp b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
index 3fac8ec22d135c2cf42a42abf8e21f7bac153998..c4ec9f95d4a7d9131a836833f65961e607d049a2 100644
--- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
@@ -864,17 +864,17 @@ private:
} // unnamed namespace
-IntRect LayoutInline::linesBoundingBox() const
+LayoutRect LayoutInline::linesBoundingBox() const
{
if (!alwaysCreateLineBoxes()) {
ASSERT(!firstLineBox());
FloatRect floatResult;
LinesBoundingBoxGeneratorContext context(floatResult);
generateCulledLineBoxRects(context, this);
- return enclosingIntRect(floatResult);
+ return enclosingLayoutRect(floatResult);
}
- IntRect result;
+ LayoutRect result;
// See <rdar://problem/5289721>, for an unknown reason the linked list here is sometimes inconsistent, first is non-zero and last is zero. We have been
// unable to reproduce this at all (and consequently unable to figure ot why this is happening). The assert will hopefully catch the problem in debug
@@ -897,7 +897,7 @@ IntRect LayoutInline::linesBoundingBox() const
LayoutUnit y = isHorizontal ? firstLineBox()->y() : logicalLeftSide;
LayoutUnit width = isHorizontal ? logicalRightSide - logicalLeftSide : lastLineBox()->logicalBottom() - x;
LayoutUnit height = isHorizontal ? lastLineBox()->logicalBottom() - y : logicalRightSide - logicalLeftSide;
- result = enclosingIntRect(LayoutRect(x, y, width, height));
+ result = LayoutRect(x, y, width, height);
}
return result;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutInline.h ('k') | third_party/WebKit/Source/core/layout/LayoutText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698