| Index: Source/core/rendering/RenderBlockLineLayout.cpp
|
| diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp
|
| index 35540fab37bd914c92b34e68482cf7c37c389fbe..5490ea93e1d60b441efe7cc6a058c8e411520dbd 100644
|
| --- a/Source/core/rendering/RenderBlockLineLayout.cpp
|
| +++ b/Source/core/rendering/RenderBlockLineLayout.cpp
|
| @@ -667,8 +667,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())
|
| + 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;
|
| }
|
|
|