Index: Source/core/rendering/RenderBlockLineLayout.cpp |
diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp |
index f4f6bfc6faaa6fb67410e57a67173745459f41a7..72c38faf6c7778a567397fb97c98608d5dd2cc85 100644 |
--- a/Source/core/rendering/RenderBlockLineLayout.cpp |
+++ b/Source/core/rendering/RenderBlockLineLayout.cpp |
@@ -1959,12 +1959,13 @@ void RenderBlockFlow::checkLinesForTextOverflow() |
float totalLogicalWidth = curr->placeEllipsis(ellipsisStr, ltr, blockLeftEdge, blockRightEdge, width); |
float logicalLeft = 0; // We are only intersted in the delta from the base position. |
- float truncatedWidth = pixelSnappedLogicalRightOffsetForLine(curr->lineTop(), firstLine); |
- updateLogicalWidthForAlignment(textAlign, curr, 0, logicalLeft, totalLogicalWidth, truncatedWidth, 0); |
+ float snappedLogicalLeft = pixelSnappedLogicalLeftOffsetForLine(curr->lineTop(), firstLine); |
+ float availableLogicalWidth = pixelSnappedLogicalRightOffsetForLine(curr->lineTop(), firstLine) - snappedLogicalLeft; |
+ updateLogicalWidthForAlignment(textAlign, curr, 0, logicalLeft, totalLogicalWidth, availableLogicalWidth, 0); |
if (ltr) |
curr->adjustLogicalPosition(logicalLeft, 0); |
else |
- curr->adjustLogicalPosition(-(truncatedWidth - (logicalLeft + totalLogicalWidth)), 0); |
+ curr->adjustLogicalPosition(logicalLeft - (availableLogicalWidth - totalLogicalWidth), 0); |
} |
} |
firstLine = false; |