Index: Source/core/rendering/RenderBlockLineLayout.cpp |
diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp |
index bf4ef4a89f934be907b19d5d2fdbbf6cfc5b95c5..722299ed03c61f1ecda46c886365a0180c62e6e9 100644 |
--- a/Source/core/rendering/RenderBlockLineLayout.cpp |
+++ b/Source/core/rendering/RenderBlockLineLayout.cpp |
@@ -626,7 +626,7 @@ BidiRun* RenderBlockFlow::computeInlineDirectionPositionsForSegment(RootInlineBo |
float& availableLogicalWidth, BidiRun* firstRun, BidiRun* trailingSpaceRun, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& verticalPositionCache, |
WordMeasurements& wordMeasurements) |
{ |
- bool needsWordSpacing = false; |
+ bool needsWordSpacing = true; |
float totalLogicalWidth = lineBox->getFlowSpacingLogicalWidth().toFloat(); |
unsigned expansionOpportunityCount = 0; |
bool isAfterExpansion = true; |
@@ -654,10 +654,10 @@ BidiRun* RenderBlockFlow::computeInlineDirectionPositionsForSegment(RootInlineBo |
expansionOpportunityCount += opportunitiesInRun; |
} |
- if (int length = rt->textLength()) { |
+ if (rt->textLength()) { |
if (!r->m_start && needsWordSpacing && isSpaceOrNewline(rt->characterAt(r->m_start))) |
totalLogicalWidth += rt->style(lineInfo.isFirstLine())->font().fontDescription().wordSpacing(); |
- needsWordSpacing = !isSpaceOrNewline(rt->characterAt(r->m_stop - 1)) && r->m_stop == length; |
+ needsWordSpacing = !isSpaceOrNewline(rt->characterAt(r->m_stop - 1)); |
} |
setLogicalWidthForTextRun(lineBox, r, rt, totalLogicalWidth, lineInfo, textBoxDataMap, verticalPositionCache, wordMeasurements); |