| Index: Source/core/layout/line/BreakingContextInlineHeaders.h
|
| diff --git a/Source/core/layout/line/BreakingContextInlineHeaders.h b/Source/core/layout/line/BreakingContextInlineHeaders.h
|
| index 7127ed536fed6d72317e486ad18a462668589db4..872c379a4897da50c82a8be1341df502e048a916 100644
|
| --- a/Source/core/layout/line/BreakingContextInlineHeaders.h
|
| +++ b/Source/core/layout/line/BreakingContextInlineHeaders.h
|
| @@ -511,15 +511,18 @@ ALWAYS_INLINE TextDirection textDirectionFromUnicode(WTF::Unicode::Direction dir
|
|
|
| ALWAYS_INLINE float textWidth(LayoutText* text, unsigned from, unsigned len, const Font& font, float xPos, bool collapseWhiteSpace, HashSet<const SimpleFontData*>* fallbackFonts = nullptr)
|
| {
|
| - GlyphOverflow glyphOverflow;
|
| - if ((!from && len == text->textLength()) || text->style()->hasTextCombine())
|
| - return text->width(from, len, font, xPos, text->style()->direction(), fallbackFonts, &glyphOverflow);
|
| + if ((!from && len == text->textLength()) || text->style()->hasTextCombine()) {
|
| + GlyphOverflow glyphOverflow;
|
| + return text->width(from, len, font, xPos, text->style()->direction(), fallbackFonts,
|
| + // LayoutText caches fallbackFonts and glyphOverflow together, and requires them to be both null or both non-null.
|
| + fallbackFonts ? &glyphOverflow : nullptr);
|
| + }
|
|
|
| TextRun run = constructTextRun(text, font, text, from, len, text->styleRef());
|
| run.setCodePath(text->canUseSimpleFontCodePath() ? TextRun::ForceSimple : TextRun::ForceComplex);
|
| run.setTabSize(!collapseWhiteSpace, text->style()->tabSize());
|
| run.setXPos(xPos);
|
| - return font.width(run, fallbackFonts, &glyphOverflow);
|
| + return font.width(run, fallbackFonts, nullptr);
|
| }
|
|
|
| inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool& hyphenated)
|
|
|