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

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

Issue 2651123005: Place ellipsis correctly in presence of list markers (Closed)
Patch Set: bug 645938 Created 3 years, 11 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/InlineBox.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/line/InlineFlowBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp b/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp
index a3e77bff32e661a5b1991a9f7d9c25338410e0e6..9fb436bcd9df3591e43064a08f35df785782a635 100644
--- a/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp
+++ b/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp
@@ -1408,11 +1408,16 @@ LayoutUnit InlineFlowBox::placeEllipsisBox(bool ltr,
if (currResult != -1 && result == -1)
result = LayoutUnit(currResult);
+ // List markers will sit outside the box so don't let them contribute
+ // width.
+ int boxWidth = box->getLineLayoutItem().isListMarker()
+ ? 0
+ : box->logicalWidth().round();
if (ltr) {
- visibleLeftEdge += box->logicalWidth().round();
+ visibleLeftEdge += boxWidth;
box = box->nextOnLine();
} else {
- visibleRightEdge -= box->logicalWidth().round();
+ visibleRightEdge -= boxWidth;
box = box->prevOnLine();
}
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/InlineBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698