fast/text/font-promises-gc.html imported/w3c/web-platform-tests/css/css-fonts/fallback-remote-to-data-url.html imported/w3c/web-platform-tests/css/css-fonts/font-display/font-display-failure-fallback.html they fail/pass depending on whether we issue a call to FontCascade::glyphDataForCharacter in RenderText::styleDidChange (see canUseSimplifiedTextMeasuring) or not.
it looks like imported/w3c/web-platform-tests/css/css-fonts/font-size-adjust-012.html also sensitive to this "first glyph call" (fails in WKTR, works fine when loading in MiniBrowser)
<rdar://problem/106033917>
Created attachment 465475 [details] Early access Running imported/w3c/web-platform-tests/css/css-fonts/font-size-adjust-012.html with glyph data being access at tree construction time.
Created attachment 465476 [details] Delayed access Running imported/w3c/web-platform-tests/css/css-fonts/font-size-adjust-012.html with glyph data being access right before layout.
Created attachment 465477 [details] WebInspector timelines
Timeline recording shows that 1. reading glyph data triggers font loading 2. delayed reading may cause intermediate rendering with blank glyphs
stacktrace for font loading (initiated by accessing glyph data) * frame #0: 0x000000014af5130c WebCore`WebCore::DocumentFontLoader::beginLoadingFontSoon(this=0x000000010f0f12b0, font=0x000000010f06df00) at DocumentFontLoader.cpp:66:9 frame #1: 0x000000014af51284 WebCore`WebCore::Document::beginLoadingFontSoon(this={ origin = , url = , inMainFrame = Detached, backForwardCacheState = NotInBackForwardCache }, request=0x000000010f0f39c0) at Document.cpp:3203:19 frame #2: 0x000000014aa9545c WebCore`WebCore::CSSFontFaceSource::load(this=0x000000010f126c00, document={ origin = , url = , inMainFrame = Detached, backForwardCacheState = None }) at CSSFontFaceSource.cpp:159:22 frame #3: 0x000000014aa58260 WebCore`WebCore::CSSFontFace::pump(this=0x000000010f052220, policy=Allow) at CSSFontFace.cpp:644:25 frame #4: 0x000000014aa59b34 WebCore`WebCore::CSSFontFace::font(this=0x000000010f052220, fontDescription=0x000000010f0cf628, syntheticBold=false, syntheticItalic=false, policy=Allow, fontPaletteValues=0x000000010f0cf6d0, fontFeatureValues=RefPtr<WebCore::FontFeatureValues, WTF::RawPtrTraits<WebCore::FontFeatureValues>, WTF::DefaultRefDerefTraits<WebCore::FontFeatureValues> > @ 0x000000016f931780) at CSSFontFace.cpp:708:25 frame #5: 0x000000014ab08f34 WebCore`WebCore::CSSFontAccessor::font(this=0x000000010f0cf600, policy=Allow) const at CSSSegmentedFontFace.cpp:72:45 frame #6: 0x000000014c3275ec WebCore`WebCore::FontRanges::Range::font(this=0x000000010f0a9528, policy=Allow) const at FontRanges.cpp:38:28 frame #7: 0x000000014c2fa8d8 WebCore`WebCore::glyphPageFromFontRanges(pageNumber=7, fontRanges=0x000000010f0a9518) at FontCascadeFonts.cpp:465:26 frame #8: 0x000000014c2f1290 WebCore`WebCore::FontCascadeFonts::glyphDataForCharacter(this=0x000000010f0a9500, c=120, description=0x000000010f0a23b0, variant=NormalVariant) at FontCascadeFonts.cpp:507:38 frame #9: 0x000000014c2f0fb4 WebCore`WebCore::FontCascade::glyphDataForCharacter(this=0x000000010f0a23a0, c=120, mirror=false, variant=NormalVariant) const at FontCascade.cpp:333:21 frame #10: 0x000000014cb6a9d0 WebCore`WebCore::initiateFontLoadingByAccessingGlyphData(textContent={ length = 1, contents = 'x' }, fontCascade=0x000000010f0a23a0) at RenderText.cpp:256:21 frame #11: 0x000000014cb6a74c WebCore`WebCore::RenderText::styleDidChange(this=0x0000000111003af0, diff=Equal, oldStyle=0x0000000000000000) at RenderText.cpp:272:9 frame #12: 0x000000014c9b1158 WebCore`WebCore::RenderElement::didAttachChild(this=0x0000000111003400, child=0x0000000111003af0, (null)=0x0000000000000000) at RenderElement.cpp:547:37 frame #13: 0x000000014cd5fdac WebCore`WebCore::RenderTreeBuilder::attachToRenderElement(this=0x000000016f934c38, parent=0x0000000111003400, child=nullptr, beforeChild=0x0000000000000000) at RenderTreeBuilder.cpp:421:12 frame #14: 0x000000014cd60144 WebCore`WebCore::RenderTreeBuilder::Inline::attachIgnoringContinuation(this=0x000000010f149910, parent=0x0000000111003400, child=nullptr, beforeChild=0x0000000000000000) at RenderTreeBuilderInline.cpp:194:15 frame #15: 0x000000014cd5fbb8 WebCore`WebCore::RenderTreeBuilder::Inline::attach(this=0x000000010f149910, parent=0x0000000111003400, child=nullptr, beforeChild=0x0000000000000000) at RenderTreeBuilderInline.cpp:117:5 frame #16: 0x000000014cd5edd4 WebCore`WebCore::RenderTreeBuilder::attachInternal(this=0x000000016f934c38, parent=0x0000000111003400, child=nullptr, beforeChild=0x0000000000000000) at RenderTreeBuilder.cpp:330:25 frame #17: 0x000000014cd5e220 WebCore`WebCore::RenderTreeBuilder::attach(this=0x000000016f934c38, parent=0x0000000111003400, child=nullptr, beforeChild=0x0000000000000000) at RenderTreeBuilder.cpp:179:5 frame #18: 0x000000014cd7c600 WebCore`WebCore::RenderTreeUpdater::createTextRenderer(this=0x000000016f934c10, textNode=0x0000000111009800, textUpdate=0x0000000000000000) at RenderTreeUpdater.cpp:504:15