| Index: Source/core/rendering/RenderBlockFlow.cpp
|
| diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp
|
| index 2160493e2352d42588881d4d10641223c6b035f5..588e6067f8d5377bcb8a3ef9f20c20927cebc914 100644
|
| --- a/Source/core/rendering/RenderBlockFlow.cpp
|
| +++ b/Source/core/rendering/RenderBlockFlow.cpp
|
| @@ -2478,9 +2478,15 @@ GapRects RenderBlockFlow::inlineSelectionGaps(RenderBlock* rootBlock, const Layo
|
| template <typename CharacterType>
|
| static inline TextRun constructTextRunInternal(RenderObject* context, const Font& font, const CharacterType* characters, int length, RenderStyle* style, TextRun::ExpansionBehavior expansion)
|
| {
|
| + return constructTextRunInternal(context, font, characters, length, style, LTR, expansion);
|
| +}
|
| +
|
| +template <typename CharacterType>
|
| +static inline TextRun constructTextRunInternal(RenderObject* context, const Font& font, const CharacterType* characters, int length, RenderStyle* style, TextDirection direction, TextRun::ExpansionBehavior expansion)
|
| +{
|
| ASSERT(style);
|
|
|
| - TextDirection textDirection = LTR;
|
| + TextDirection textDirection = direction;
|
| bool directionalOverride = style->rtlOrdering() == VisualOrder;
|
|
|
| TextRun run(characters, length, 0, 0, expansion, textDirection, directionalOverride);
|
| @@ -2528,12 +2534,12 @@ TextRun RenderBlockFlow::constructTextRun(RenderObject* context, const Font& fon
|
| return constructTextRunInternal(context, font, text->characters16(), text->textLength(), style, expansion);
|
| }
|
|
|
| -TextRun RenderBlockFlow::constructTextRun(RenderObject* context, const Font& font, const RenderText* text, unsigned offset, unsigned length, RenderStyle* style, TextRun::ExpansionBehavior expansion)
|
| +TextRun RenderBlockFlow::constructTextRun(RenderObject* context, const Font& font, const RenderText* text, unsigned offset, unsigned length, RenderStyle* style, TextDirection direction, TextRun::ExpansionBehavior expansion)
|
| {
|
| ASSERT(offset + length <= text->textLength());
|
| if (text->is8Bit())
|
| - return constructTextRunInternal(context, font, text->characters8() + offset, length, style, expansion);
|
| - return constructTextRunInternal(context, font, text->characters16() + offset, length, style, expansion);
|
| + return constructTextRunInternal(context, font, text->characters8() + offset, length, style, direction, expansion);
|
| + return constructTextRunInternal(context, font, text->characters16() + offset, length, style, direction, expansion);
|
| }
|
|
|
| TextRun RenderBlockFlow::constructTextRun(RenderObject* context, const Font& font, const String& string, RenderStyle* style, TextRun::ExpansionBehavior expansion, TextRunFlags flags)
|
|
|