| Index: Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
|
| diff --git a/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp b/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
|
| index 2a8ad0551d0a5c3bd95186e767c029658669ae95..4ef1cb4f7a5026e96e724ce664b88071e7474e53 100644
|
| --- a/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
|
| +++ b/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
|
| @@ -895,20 +895,9 @@ void LayoutDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool
|
| if (!lastVisibleLine)
|
| continue;
|
|
|
| - const UChar ellipsisAndSpace[2] = { horizontalEllipsis, ' ' };
|
| - DEFINE_STATIC_LOCAL(AtomicString, ellipsisAndSpaceStr, (ellipsisAndSpace, 2));
|
| DEFINE_STATIC_LOCAL(AtomicString, ellipsisStr, (&horizontalEllipsis, 1));
|
| const Font& font = style(numVisibleLines == 1)->font();
|
| -
|
| - // Get ellipsis width, and if the last child is an anchor, it will go after the ellipsis, so add in a space and the anchor width too
|
| - float totalWidth;
|
| - InlineBox* anchorBox = lastLine->lastChild();
|
| - if (anchorBox && anchorBox->layoutObject().style()->isLink()) {
|
| - totalWidth = anchorBox->logicalWidth() + font.width(constructTextRun(this, font, ellipsisAndSpace, 2, styleRef(), style()->direction()));
|
| - } else {
|
| - anchorBox = 0;
|
| - totalWidth = font.width(constructTextRun(this, font, &horizontalEllipsis, 1, styleRef(), style()->direction()));
|
| - }
|
| + float totalWidth = font.width(constructTextRun(this, font, &horizontalEllipsis, 1, styleRef(), style()->direction()));
|
|
|
| // See if this width can be accommodated on the last visible line
|
| LayoutBlockFlow& destBlock = lastVisibleLine->block();
|
| @@ -929,7 +918,7 @@ void LayoutDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool
|
| // Let the truncation code kick in.
|
| // FIXME: the text alignment should be recomputed after the width changes due to truncation.
|
| LayoutUnit blockLeftEdge = destBlock.logicalLeftOffsetForLine(lastVisibleLine->y(), false);
|
| - lastVisibleLine->placeEllipsis(anchorBox ? ellipsisAndSpaceStr : ellipsisStr, leftToRight, blockLeftEdge.toFloat(), blockRightEdge.toFloat(), totalWidth, anchorBox);
|
| + lastVisibleLine->placeEllipsis(ellipsisStr, leftToRight, blockLeftEdge.toFloat(), blockRightEdge.toFloat(), totalWidth);
|
| destBlock.setHasMarkupTruncation(true);
|
| }
|
| }
|
|
|