Chromium Code Reviews| Index: Source/core/rendering/RenderBlockLineLayout.cpp |
| diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp |
| index 4cd3937e549461039aa480e123f0871bd251c9bf..2f87a417b96e76df5db5049cf565935c66e99818 100644 |
| --- a/Source/core/rendering/RenderBlockLineLayout.cpp |
| +++ b/Source/core/rendering/RenderBlockLineLayout.cpp |
| @@ -1167,11 +1167,16 @@ static LayoutUnit getBorderPaddingMargin(RenderBoxModelObject* child, bool endOf |
| static inline void stripTrailingSpace(float& inlineMax, float& inlineMin, RenderObject* trailingSpaceChild) |
| { |
| if (trailingSpaceChild && trailingSpaceChild->isText()) { |
| + bool useComplexCodePath = !toRenderText(trailingSpaceChild)-> |
|
pdr.
2014/10/14 23:56:59
Can you move this below and use the (poorly-named)
|
| + canUseSimpleFontCodePath(); |
|
chrishtr
2014/10/14 23:50:09
Nit: make this one line.
eae
2014/10/15 00:30:37
96 characters seems rather long for a single line,
|
| // Collapse away the trailing space at the end of a block. |
| RenderText* t = toRenderText(trailingSpaceChild); |
| const UChar space = ' '; |
| const Font& font = t->style()->font(); // FIXME: This ignores first-line. |
| - float spaceWidth = font.width(constructTextRun(t, font, &space, 1, t->style(), LTR)); |
| + TextRun run = constructTextRun(t, font, &space, 1, t->style(), LTR); |
| + if (useComplexCodePath) |
|
pdr.
2014/10/14 23:21:20
Why doesn't constructTextRun handle setting whethe
|
| + run.setUseComplexCodePath(true); |
| + float spaceWidth = font.width(run); |
| inlineMax -= spaceWidth + font.fontDescription().wordSpacing(); |
| if (inlineMin > inlineMax) |
| inlineMin = inlineMax; |