| Index: Source/platform/fonts/Font.cpp
|
| diff --git a/Source/platform/fonts/Font.cpp b/Source/platform/fonts/Font.cpp
|
| index f25a76fd3f12ee925ec1766c8d49a6504d3a8382..4670177678ea1905f4674086d1fb66348e4f4ca6 100644
|
| --- a/Source/platform/fonts/Font.cpp
|
| +++ b/Source/platform/fonts/Font.cpp
|
| @@ -160,9 +160,8 @@ float Font::width(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFo
|
| glyphOverflow = 0;
|
| }
|
|
|
| - bool hasKerningOrLigatures = fontDescription().typesettingFeatures() & (Kerning | Ligatures);
|
| bool hasWordSpacingOrLetterSpacing = fontDescription().wordSpacing() || fontDescription().letterSpacing();
|
| - bool isCacheable = (codePathToUse == ComplexPath || hasKerningOrLigatures)
|
| + bool isCacheable = codePathToUse == ComplexPath
|
| && !hasWordSpacingOrLetterSpacing // Word spacing and letter spacing can change the width of a word.
|
| && !run.allowTabs(); // If we allow tabs and a tab occurs inside a word, the width of the word varies based on its position on the line.
|
|
|
| @@ -180,8 +179,8 @@ float Font::width(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFo
|
| if (codePathToUse == ComplexPath) {
|
| result = floatWidthForComplexText(run, fallbackFonts, &glyphBounds);
|
| } else {
|
| - result = floatWidthForSimpleText(run, fallbackFonts,
|
| - glyphOverflow || isCacheable ? &glyphBounds : 0);
|
| + ASSERT(!isCacheable);
|
| + result = floatWidthForSimpleText(run, fallbackFonts, glyphOverflow ? &glyphBounds : 0);
|
| }
|
|
|
| if (cacheEntry && (!fallbackFonts || fallbackFonts->isEmpty())) {
|
|
|