2022-04-22 Alan Coon Cherry-pick r292274. rdar://problem/80544133 [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. Source/WebCore: This patch simply calls setNeedsRecalcStyleInAllFrames on every Page when we receive a kCTFontManagerRegisteredFontsChangedNotification. FontCache::invalidateAllFontCaches() can't do this directly because it's in platform/ and therefore isn't allowed to know what Pages are. Instead, this patch takes a process-global callback and calls that instead. This callback is set at initialization time. Test: fast/text/install-font-style-recalc.html * page/Page.cpp: (WebCore::m_contentSecurityPolicyModeForExtension): (WebCore::Page::firstTimeInitialization): * page/Page.h: * platform/graphics/FontCache.cpp: (WebCore::Function [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. * TestExpectations: * fast/text/install-font-style-recalc-expected.txt: Added. * fast/text/install-font-style-recalc.html: Added. * platform/ios-wk2/TestExpectations: * platform/mac-wk2/TestExpectations: 2022-04-22 Alan Coon Cherry-pick r292072. rdar://problem/80544133 [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. Source/WebCore: This patch simply calls setNeedsRecalcStyleInAllFrames on every Page when we receive a kCTFontManagerRegisteredFontsChangedNotification. FontCache::invalidateAllFontCaches() can't do this directly because it's in platform/ and therefore isn't allowed to know what Pages are. Instead, this patch takes a process-global callback and calls that instead. This callback is set at initialization time. Test: fast/text/install-font-style-recalc.html * page/Page.cpp: (WebCore::m_attachmentElementClient): * platform/graphics/FontCache.cpp: (WebCore::Function [Cocoa] Automatically relayout the page when new fonts are installed https://bugs.webkit.org/show_bug.cgi?id=238483 Reviewed by Chris Dumez. * fast/text/install-font-style-recalc-expected.txt: Added. * fast/text/install-font-style-recalc.html: Added. 2022-04-22 Alan Coon Cherry-pick r291724. rdar://problem/91975589 Expose the AX tree of PDFs loaded via iframes on the Mac https://bugs.webkit.org/show_bug.cgi?id=238168 Reviewed by Chris Fleizach. Source/WebKit: Given this markup: