DescriptionPass the correct value for the available width to updateLogicalWidthForAlignment() after placing an ellipsis
The current code passes the right end of the line (normally equal to blockRightEdge) to
updateLogicalWidthForAlignment() after placing the ellipsis string for a truncated text with
'text-overflow: ellipsis', instead of passing the actual width between the left and right edges.
That mistake causes that left padding and border, when they exist, are not being properly taking
into account for ellipsized text, resulting in updateLogicalWidthForAlignment() thinking that
the value for availableLogicalWidth is bigger than what it actually is, thus misplacing the text
inside the container block after the adjustment.
Additionally, this patch renames one variable and changes the shape of the formula for RTL text
in RenderBlockFlow::checkLinesForTextOverflow(), to make it more readable and understandable.
BUG=166258, 166263
TEST=Added new test to ensure ellipsis is properly drawn for blocks with border and padding set.
R=tkent@chromium.org, dglazkov@chromium.org, eae@chromium.org, eseidel@chromium.org, leviw@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167194
Patch Set 1 #Patch Set 2 : Rebase patch against master #Patch Set 3 : Rebased patch again against master #
Messages
Total messages: 20 (0 generated)
|