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

Unified Diff: third_party/WebKit/Source/core/layout/line/InlineBox.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
Index: third_party/WebKit/Source/core/layout/line/InlineBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/line/InlineBox.cpp b/third_party/WebKit/Source/core/layout/line/InlineBox.cpp
index 7acdb22dc3cdc41c3b1964250ba65fae6421248c..822592a038391fd00584e8d1f9089a2a649627dc 100644
--- a/third_party/WebKit/Source/core/layout/line/InlineBox.cpp
+++ b/third_party/WebKit/Source/core/layout/line/InlineBox.cpp
@@ -305,17 +305,17 @@ SelectionState InlineBox::getSelectionState() const {
}
bool InlineBox::canAccommodateEllipsis(bool ltr,
- int blockEdge,
- int ellipsisWidth) const {
+ LayoutUnit blockEdge,
+ LayoutUnit ellipsisWidth) const {
// Non-atomic inline-level elements can always accommodate an ellipsis.
// Skip list markers and try the next box.
if (!getLineLayoutItem().isAtomicInlineLevel() ||
getLineLayoutItem().isListMarker())
return true;
- IntRect boxRect(x().toInt(), 0, m_logicalWidth.toInt(), 10);
- IntRect ellipsisRect(ltr ? blockEdge - ellipsisWidth : blockEdge, 0,
- ellipsisWidth, 10);
+ LayoutRect boxRect(x(), LayoutUnit(), m_logicalWidth, LayoutUnit(10));
+ LayoutRect ellipsisRect(ltr ? blockEdge - ellipsisWidth : blockEdge,
+ LayoutUnit(), ellipsisWidth, LayoutUnit(10));
return !(boxRect.intersects(ellipsisRect));
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/InlineBox.h ('k') | third_party/WebKit/Source/core/layout/line/InlineFlowBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698