Chromium Code Reviews| Index: Source/core/rendering/RenderBlockLineLayout.cpp |
| diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp |
| index 372e507ef3510c5a42a38157139c2e3a24078503..73df43088a07a82d8a228a4c5ace8862c6d00b8e 100644 |
| --- a/Source/core/rendering/RenderBlockLineLayout.cpp |
| +++ b/Source/core/rendering/RenderBlockLineLayout.cpp |
| @@ -662,8 +662,33 @@ RootInlineBox* RenderBlockFlow::constructLine(BidiRunList<BidiRun>& bidiRuns, co |
| ETextAlign RenderBlock::textAlignmentForLine(bool endsWithSoftBreak) const |
| { |
| ETextAlign alignment = style()->textAlign(); |
| - if (!endsWithSoftBreak && alignment == JUSTIFY) |
| - alignment = TASTART; |
| + if (endsWithSoftBreak) |
| + return alignment; |
| + |
| + if (!RuntimeEnabledFeatures::css3TextEnabled()) { |
|
Julien - ping for review
2013/10/25 18:49:19
Stray open brace.
dw.im
2013/10/28 02:56:14
Done.
|
| + return (alignment == JUSTIFY) ? TASTART : alignment; |
| + |
| + TextAlignLast alignmentLast = style()->textAlignLast(); |
| + switch (alignmentLast) { |
| + case TextAlignLastStart: |
| + return TASTART; |
| + case TextAlignLastEnd: |
| + return TAEND; |
| + case TextAlignLastLeft: |
| + return LEFT; |
| + case TextAlignLastRight: |
| + return RIGHT; |
| + case TextAlignLastCenter: |
| + return CENTER; |
| + case TextAlignLastJustify: |
| + return JUSTIFY; |
| + case TextAlignLastAuto: |
| + if (alignment != JUSTIFY) |
| + return alignment; |
| + if (style()->textJustify() == TextJustifyDistribute) |
| + return JUSTIFY; |
| + return TASTART; |
| + } |
| return alignment; |
| } |