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

Unified Diff: third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp

Issue 2702043002: Use LayoutUnit for positioning ellipses (Closed)
Patch Set: bug 693905-2 Created 3 years, 10 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/line/RootInlineBox.h ('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/line/RootInlineBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp b/third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp
index 0927b4b821a68677684033df684baea0a99adfa2..329a87c653cf738521b0d948e8c30636e3238c86 100644
--- a/third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp
+++ b/third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp
@@ -92,12 +92,12 @@ LayoutUnit RootInlineBox::lineHeight() const {
}
bool RootInlineBox::lineCanAccommodateEllipsis(bool ltr,
- int blockEdge,
- int lineBoxEdge,
- int ellipsisWidth) {
+ LayoutUnit blockEdge,
+ LayoutUnit lineBoxEdge,
+ LayoutUnit ellipsisWidth) {
// First sanity-check the unoverflowed width of the whole line to see if there
// is sufficient room.
- int delta = ltr ? lineBoxEdge - blockEdge : blockEdge - lineBoxEdge;
+ LayoutUnit delta = ltr ? lineBoxEdge - blockEdge : blockEdge - lineBoxEdge;
if (logicalWidth() - delta < ellipsisWidth)
return false;
@@ -113,10 +113,9 @@ LayoutUnit RootInlineBox::placeEllipsis(const AtomicString& ellipsisStr,
LayoutUnit blockRightEdge,
LayoutUnit ellipsisWidth) {
// Create an ellipsis box.
- EllipsisBox* ellipsisBox =
- new EllipsisBox(getLineLayoutItem(), ellipsisStr, this, ellipsisWidth,
- logicalHeight().toFloat(), x().toInt(), y().toInt(),
- !prevRootBox(), isHorizontal());
+ EllipsisBox* ellipsisBox = new EllipsisBox(
+ getLineLayoutItem(), ellipsisStr, this, ellipsisWidth, logicalHeight(),
+ location(), !prevRootBox(), isHorizontal());
if (!gEllipsisBoxMap)
gEllipsisBoxMap = new EllipsisBoxMap();
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/RootInlineBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698