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

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

Issue 2392433002: Avoid showing two dots in ellipsis (Closed)
Patch Set: bug 650083 Created 4 years, 2 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/LayoutTests/platform/linux/fast/text/ellipsis-rtl-text-in-ltr-flow-underline-expected.png ('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/InlineTextBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp b/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
index 52969afabf52874daa927df4ea4f61e8f0fb7e85..5011d4aa2217c916060e096669c57eccb4a578d2 100644
--- a/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
+++ b/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
@@ -361,7 +361,9 @@ LayoutUnit InlineTextBox::placeEllipsisBox(bool flowIsLTR,
: logicalRight() - visibleBoxWidth;
}
- int offset = offsetForPosition(ellipsisX, false);
+ // The box's width includes partial glyphs, so respect that when placing
+ // the ellipsis.
+ int offset = offsetForPosition(ellipsisX);
if (offset == 0 && ltr == flowIsLTR) {
// No characters should be laid out. Set ourselves to full truncation and
// place the ellipsis at the min of our start and the ellipsis edge.
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/linux/fast/text/ellipsis-rtl-text-in-ltr-flow-underline-expected.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698