Index: Source/core/rendering/RenderText.cpp |
diff --git a/Source/core/rendering/RenderText.cpp b/Source/core/rendering/RenderText.cpp |
index 28033a2a08ccdbc3d7878af570620a5ee8ab5ab3..7947194bcaae2c281aaa329eba3f39e48a243801 100644 |
--- a/Source/core/rendering/RenderText.cpp |
+++ b/Source/core/rendering/RenderText.cpp |
@@ -808,7 +808,9 @@ void RenderText::trimmedPrefWidths(float leadWidth, |
const Font& font = style()->font(); // FIXME: This ignores first-line. |
if (stripFrontSpaces) { |
const UChar spaceChar = space; |
- float spaceWidth = font.width(constructTextRun(this, font, &spaceChar, 1, style(), direction)); |
+ TextRun run = constructTextRun(this, font, &spaceChar, 1, style(), direction); |
+ run.setUseComplexCodePath(!canUseSimpleFontCodePath()); |
+ float spaceWidth = font.width(run); |
maxWidth -= spaceWidth; |
} else { |
maxWidth += font.fontDescription().wordSpacing(); |