Index: Source/core/rendering/InlineFlowBox.cpp |
diff --git a/Source/core/rendering/InlineFlowBox.cpp b/Source/core/rendering/InlineFlowBox.cpp |
index 34dc81ea42276238da0b6a82aea1a98c5c20290c..2b7c1fd0f15ae785a398b3c43106ed11b87db8ea 100644 |
--- a/Source/core/rendering/InlineFlowBox.cpp |
+++ b/Source/core/rendering/InlineFlowBox.cpp |
@@ -382,12 +382,19 @@ float InlineFlowBox::placeBoxRangeInInlineDirection(InlineBox* firstChild, Inlin |
if (curr->renderer().isText()) { |
InlineTextBox* text = toInlineTextBox(curr); |
RenderText& rt = text->renderer(); |
+ float space = 0; |
if (rt.textLength()) { |
if (needsWordSpacing && isSpaceOrNewline(rt.characterAt(text->start()))) |
- logicalLeft += rt.style(isFirstLineStyle())->font().fontDescription().wordSpacing(); |
+ space = rt.style(isFirstLineStyle())->font().fontDescription().wordSpacing(); |
needsWordSpacing = !isSpaceOrNewline(rt.characterAt(text->end())); |
} |
- text->setLogicalLeft(logicalLeft); |
+ if (isLeftToRightDirection()) { |
+ logicalLeft += space; |
+ text->setLogicalLeft(logicalLeft); |
+ } else { |
+ text->setLogicalLeft(logicalLeft); |
+ logicalLeft += space; |
+ } |
if (knownToHaveNoOverflow()) |
minLogicalLeft = std::min(logicalLeft, minLogicalLeft); |
logicalLeft += text->logicalWidth(); |