2022-03-15 Gabriel Nava Marino Crash in KeyframeList.cpp:183 in WebCore::KeyframeList::fillImplicitKeyframes https://bugs.webkit.org/show_bug.cgi?id=237858 Reviewed by Antoine Quint. * animations/fill-implicit-keyframes-crash-expected.txt: Added. * animations/fill-implicit-keyframes-crash.html: Added. 2022-05-25 Alan Coon Cherry-pick 1a810ee6f98a. rdar://problem/87980543 Expose the correct role, subrole and role description properties for the element. https://bugs.webkit.org/show_bug.cgi?id=236359 Reviewed by Chris Fleizach. Source/WebCore: Test: accessibility/dialog-properties.html Elements with role="dialog" are exposed to accessibility clients with role AXGroup, subrole AXApplicationDialog and role description "web dialog". This patch implements this behavior for the element. * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::determineAccessibilityRoleFromNode const): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::defaultObjectInclusion const): LayoutTests: Tests that these AX properties have the expected values both when the dialog is shown modal or modeless. * accessibility/dialog-properties-expected.txt: Added. * accessibility/dialog-properties.html: Added. Canonical link: https://commits.webkit.org/247198@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289713 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-02-13 Andres Gonzalez Expose the correct role, subrole and role description properties for the element. https://bugs.webkit.org/show_bug.cgi?id=236359 Reviewed by Chris Fleizach. Tests that these AX properties have the expected values both when the dialog is shown modal or modeless. * accessibility/dialog-properties-expected.txt: Added. * accessibility/dialog-properties.html: Added. 2022-05-19 Alan Coon Cherry-pick r294234. rdar://problem/93602100 Web Inspector: Regression(r266885) Crash sometimes when rehydrating imported audit results https://bugs.webkit.org/show_bug.cgi?id=240366 Reviewed by Devin Rousso. Source/JavaScriptCore: * inspector/protocol/DOM.json: Source/WebCore: Added test cases to inspector/model/dom-node.html After r266885, there is no path to handle the possibility that there may not be a resulting node for calls to `DOM.querySelector`. To correct this, mark the return value as optional (Web Inspector frontend already treats it as optional) and return early if there was no Element matching the selector. * inspector/agents/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::querySelector): * inspector/agents/InspectorDOMAgent.h: LayoutTests: * inspector/model/dom-node.html: * inspector/model/dom-node-expected.txt: Canonical link: https://commits.webkit.org/250592@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294234 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-05-16 Patrick Angle Web Inspector: Regression(r266885) Crash sometimes when rehydrating imported audit results https://bugs.webkit.org/show_bug.cgi?id=240366 Reviewed by Devin Rousso. * inspector/model/dom-node.html: * inspector/model/dom-node-expected.txt: 2022-05-19 Alan Coon Cherry-pick r293819. rdar://problem/93602086 Crash in WindowProxy::setDOMWindow https://bugs.webkit.org/show_bug.cgi?id=232763 Patch by Alex Christensen on 2022-05-04 Reviewed by Chris Dumez. Source/WebCore: Add a few null checks here and there. Test: fast/dom/set-dom-window-without-page.html * bindings/js/WindowProxy.cpp: (WebCore::WindowProxy::setDOMWindow): * loader/FrameLoader.cpp: (WebCore::FrameLoader::findFrameForNavigation): LayoutTests: * fast/dom/set-dom-window-without-page-expected.txt: Added. * fast/dom/set-dom-window-without-page.html: Added. Canonical link: https://commits.webkit.org/250292@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293819 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-05-04 Alex Christensen Crash in WindowProxy::setDOMWindow https://bugs.webkit.org/show_bug.cgi?id=232763 Reviewed by Chris Dumez. * fast/dom/set-dom-window-without-page-expected.txt: Added. * fast/dom/set-dom-window-without-page.html: Added. 2022-05-16 Alan Coon Cherry-pick r294012. rdar://problem/92425915 Fix inertness of pseudo-elements https://bugs.webkit.org/show_bug.cgi?id=239831 Reviewed by Antti Koivisto. When we adjust style for a pseudo-element, `m_element` and `document().activeModalDialog()` are both null. So we accidentally reset inertness to false in those cases. Fix this by making checking for m_element's existence too. LayoutTests/imported/w3c: * web-platform-tests/inert/inert-pseudo-element-hittest-expected.txt: Added. * web-platform-tests/inert/inert-pseudo-element-hittest.html: Added. Source/WebCore: Test: imported/w3c/web-platform-tests/inert/inert-pseudo-element-hittest.html * style/StyleAdjuster.cpp: (WebCore::Style::Adjuster::adjust const): LayoutTests: * platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-pseudo-element-hittest-expected.txt: Added. Canonical link: https://commits.webkit.org/250446@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294012 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-05-10 Tim Nguyen Fix inertness of pseudo-elements https://bugs.webkit.org/show_bug.cgi?id=239831 Reviewed by Antti Koivisto. When we adjust style for a pseudo-element, `m_element` and `document().activeModalDialog()` are both null. So we accidentally reset inertness to false in those cases. Fix this by making checking for m_element's existence too. * platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-pseudo-element-hittest-expected.txt: Added. 2022-05-16 Alan Coon Cherry-pick r293987. rdar://problem/92775435 Implement CSS :modal pseudo class https://bugs.webkit.org/show_bug.cgi?id=240109 Reviewed by Simon Fraser. LayoutTests/imported/w3c: Add and extend tests for :modal pseudo-class. * web-platform-tests/css/selectors/invalidation/modal-pseudo-class-in-has-expected.txt: Added. * web-platform-tests/css/selectors/invalidation/modal-pseudo-class-in-has.html: Added. * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-show-modal.html: Source/WebCore: Test: imported/w3c/web-platform-tests/css/selectors/invalidation/modal-pseudo-class-in-has.html Renames :-internal-modal-dialog to :modal and adds :has() invalidation support. * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText const): * css/CSSSelector.h: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne const): * css/SelectorCheckerTestFunctions.h: (WebCore::matchesModalPseudoClass): (WebCore::matchesModalDialogPseudoClass): Deleted. * css/SelectorPseudoClassAndCompatibilityElementMap.in: * css/dialog.css: (dialog:modal): (dialog:-internal-modal-dialog): Deleted. * css/parser/CSSSelectorParser.cpp: (WebCore::CSSSelectorParser::consumePseudo): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::JSC_DEFINE_JIT_OPERATION): (WebCore::SelectorCompiler::addPseudoClassType): * html/HTMLDialogElement.cpp: (WebCore::HTMLDialogElement::showModal): (WebCore::HTMLDialogElement::close): (WebCore::HTMLDialogElement::removedFromAncestor): (WebCore::HTMLDialogElement::setIsModal): * html/HTMLDialogElement.h: LayoutTests: Removes :-internal-modal-dialog from internal pseudo classes. * fast/css/pseudo-class-internal-expected.txt: * fast/css/pseudo-class-internal.html: Canonical link: https://commits.webkit.org/250424@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293987 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-05-09 Tim Nguyen Implement CSS :modal pseudo class https://bugs.webkit.org/show_bug.cgi?id=240109 Reviewed by Simon Fraser. Removes :-internal-modal-dialog from internal pseudo classes. * fast/css/pseudo-class-internal-expected.txt: * fast/css/pseudo-class-internal.html: 2022-05-16 Alan Coon Cherry-pick r293264. rdar://problem/92130849 Web Inspector: Regression(r287684) Resources from the memory cache show empty content in Network, Sources, and Search tabs https://bugs.webkit.org/show_bug.cgi?id=239667 Reviewed by Devin Rousso. Source/WebCore: Updated tests: - http/tests/inspector/network/resource-response-source-disk-cache.html - http/tests/inspector/network/resource-response-source-memory-cache.html r287684 introduced a subtle bug when calling InspectorInstrumentation::didReceiveData. We rely on there being a difference between real, but empty, data buffer and not having a data buffer, but after r287684 an empty SharedBuffer would be passed in the later case. Instead, we should continue to pass nullptr if there is no buffer so that InspectorNetworkAgent::didReceiveData can distiguish between the two. The bug is the result of having a non-nullptr `data` in `InspectorNetworkAgent::didReceiveData`, which causes us to call `maybeAddResourceData`, which means by the time `InspectorNetworkAgent::getResponseBody` is called, the ResourceData for the request will have an empty, not non-existant, `content()`, which means we will return the empty content instead, since we believe the response had actual content. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didReceiveDataImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didReceiveData): * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::dispatchDidReceiveData): LayoutTests: Add test steps to ensure that the resource has content, and that the base64Encoded value matches our expectations. While only the memory cache was affected by this regression, add the test steps to both the memory and disk caches to defend this functionality. * http/tests/inspector/network/resource-response-source-memory-cache-expected.txt: * http/tests/inspector/network/resource-response-source-memory-cache.html: * http/tests/inspector/network/resource-response-source-disk-cache-expected.txt: * http/tests/inspector/network/resource-response-source-disk-cache.html: Canonical link: https://commits.webkit.org/249905@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293264 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-04-22 Patrick Angle Web Inspector: Regression(r287684) Resources from the memory cache show empty content in Network, Sources, and Search tabs https://bugs.webkit.org/show_bug.cgi?id=239667 Reviewed by Devin Rousso. Add test steps to ensure that the resource has content, and that the base64Encoded value matches our expectations. While only the memory cache was affected by this regression, add the test steps to both the memory and disk caches to defend this functionality. * http/tests/inspector/network/resource-response-source-memory-cache-expected.txt: * http/tests/inspector/network/resource-response-source-memory-cache.html: * http/tests/inspector/network/resource-response-source-disk-cache-expected.txt: * http/tests/inspector/network/resource-response-source-disk-cache.html: 2022-05-16 Alan Coon Cherry-pick r293170. rdar://problem/91117803 AVSampleBufferRenderSynchronizer timeline sometimes goes backwards when playback begins https://bugs.webkit.org/show_bug.cgi?id=239471 rdar://91117803 Reviewed by Jer Noble. Source/WebCore: Test: media/media-source/media-source-current-time.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Log current time and requested playback rate. (WebCore::HTMLMediaElement::setPausedInternal): Log. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): If time has gone backward, clamp to the most recent seek time. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): INFO_LOG -> ALWAYS_LOG (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal): Ditto. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime const): Use clampTimeToLastSeekTime. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::clampTimeToLastSeekTime const): New, clamp time value to the most recent seek time. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCurrentTimeDidChangeCallback): Use clampTimeToLastSeekTime. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): INFO_LOG -> ALWAYS_LOG (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): INFO_LOG -> ALWAYS_LOG (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastPixelBuffer): INFO_LOG -> ALWAYS_LOG (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableVideoFrame): INFO_LOG -> ALWAYS_LOG (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged): INFO_LOG -> ALWAYS_LOG Source/WebKit: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::currentTimeChanged): Log when time jumps backwards. LayoutTests: * media/media-source/media-source-current-time-expected.txt: Added. * media/media-source/media-source-current-time.html: Added. Canonical link: https://commits.webkit.org/249852@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293170 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-04-21 Eric Carlson AVSampleBufferRenderSynchronizer timeline sometimes goes backwards when playback begins https://bugs.webkit.org/show_bug.cgi?id=239471 rdar://91117803 Reviewed by Jer Noble. * media/media-source/media-source-current-time-expected.txt: Added. * media/media-source/media-source-current-time.html: Added. 2022-05-16 Alan Coon Cherry-pick r293126. rdar://problem/90483049 REGRESSION (r281913): Map toolbar flickers when dragging the map on https://gis.ee/ https://bugs.webkit.org/show_bug.cgi?id=238589 Reviewed by Alan Bujtas. Source/WebCore: If a layer has negative z-order descendants, and one of those descendants becomes composited, then that layer also has to composite, because its foreground needs to render in front of those descendants. But this is tricky, because the compositing toggle is out-of-order; we only know that the layer has to get composited after processing descendants. In particular, this created a problem with the overlap map, which tracks sets of rectangles in "compositing scopes" via LayerOverlapMap. The delayed compositing toggle of the layer with negative z-order descendants meant that any layers processed up to that point had their bounds added in the wrong overlap scope. This resulted in subsequent bad overlap testing, and a failure to make later layers composited. The previous fix in this area (r281913) was incorrect. Revert it, and do a better fix, which is to speculatively push an overlap map entry for the layer with negative z-order descendants, if necessary. If this layer ends up not getting composited, we unwind the speculative push, which will merge that scope with its parent scope. In addition give OverlapMapContainer (an "overlap scope") a RenderLayer& which we can use for logging, and to assert on correct behavior; it is not otherwise used in release builds. Tests: compositing/layer-creation/overlap-with-negative-z-layers.html compositing/layer-creation/subtree-div-overlaps-multiple-negative-z-divs.html * rendering/LayerOverlapMap.cpp: (WebCore::OverlapMapContainer::OverlapMapContainer): (WebCore::OverlapMapContainer::scopeLayer const): (WebCore::OverlapMapContainer::dump const): (WebCore::LayerOverlapMap::LayerOverlapMap): (WebCore::LayerOverlapMap::add): (WebCore::LayerOverlapMap::pushCompositingContainer): (WebCore::LayerOverlapMap::popCompositingContainer): * rendering/LayerOverlapMap.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::computeCompositingRequirements): (WebCore::RenderLayerCompositor::traverseUnchangedSubtree): (WebCore::RenderLayerCompositor::updateOverlapMap const): LayoutTests: Move subtree-div-overlaps-multiple-negative-z-divs.html into the layer-creation directory. Add a new test. * compositing/layer-creation/overlap-with-negative-z-layers-expected.html: Added. * compositing/layer-creation/overlap-with-negative-z-layers.html: Added. * compositing/layer-creation/subtree-div-overlaps-multiple-negative-z-divs-expected.html: Renamed from LayoutTests/compositing/subtree-div-overlaps-multiple-negative-z-divs-expected.html. * compositing/layer-creation/subtree-div-overlaps-multiple-negative-z-divs.html: Renamed from LayoutTests/compositing/subtree-div-overlaps-multiple-negative-z-divs.html. * fast/harness/render-tree-as-text-options-expected.txt: Test progressed; update results. Canonical link: https://commits.webkit.org/249828@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293126 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-04-20 Simon Fraser REGRESSION (r281913): Map toolbar flickers when dragging the map on https://gis.ee/ https://bugs.webkit.org/show_bug.cgi?id=238589 Reviewed by Alan Bujtas. Move subtree-div-overlaps-multiple-negative-z-divs.html into the layer-creation directory. Add a new test. * compositing/layer-creation/overlap-with-negative-z-layers-expected.html: Added. * compositing/layer-creation/overlap-with-negative-z-layers.html: Added. * compositing/layer-creation/subtree-div-overlaps-multiple-negative-z-divs-expected.html: Renamed from LayoutTests/compositing/subtree-div-overlaps-multiple-negative-z-divs-expected.html. * compositing/layer-creation/subtree-div-overlaps-multiple-negative-z-divs.html: Renamed from LayoutTests/compositing/subtree-div-overlaps-multiple-negative-z-divs.html. * fast/harness/render-tree-as-text-options-expected.txt: Test progressed; update results. 2022-05-16 Alan Coon Cherry-pick r292350. rdar://problem/90589355 intersectsWithAncestor should take fragmented boxes into account. https://bugs.webkit.org/show_bug.cgi?id=238648 Reviewed by Dean Jackson. Source/WebCore: Test: compositing/backing/backing-store-columns-inside-position-fixed.html * rendering/RenderLayerBacking.cpp: (WebCore::intersectsWithAncestor): Use boundingBox() for intersectsWithAncestor, so that we can explicitly request the box that contains all fragment boxes. LayoutTests: * compositing/backing/backing-store-columns-inside-position-fixed-expected.txt: Added. * compositing/backing/backing-store-columns-inside-position-fixed.html: Added. Adds new test that scrolls content split into columns until the first column is offscreen, to confirm that we still have a backing store. Canonical link: https://commits.webkit.org/249215@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292350 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-04-04 Matt Woodrow intersectsWithAncestor should take fragmented boxes into account. https://bugs.webkit.org/show_bug.cgi?id=238648 Reviewed by Dean Jackson. * compositing/backing/backing-store-columns-inside-position-fixed-expected.txt: Added. * compositing/backing/backing-store-columns-inside-position-fixed.html: Added. Adds new test that scrolls content split into columns until the first column is offscreen, to confirm that we still have a backing store. 2022-05-03 Sihui Liu StorageMap::removeItem may fail to remove item from map https://bugs.webkit.org/show_bug.cgi?id=239982 rdar://80891555 Reviewed by Chris Dumez. * storage/domstorage/sessionstorage/resources/window-open-remove-item.html: Added. * storage/domstorage/sessionstorage/window-open-remove-item-expected.txt: Added. * storage/domstorage/sessionstorage/window-open-remove-item.html: Added. 2022-04-26 Russell Epstein Cherry-pick r290630. rdar://problem/89442583 AX: WebKit should ignore empty modals rather than trapping focus inside them https://bugs.webkit.org/show_bug.cgi?id=237163 Reviewed by Chris Fleizach and Andres Gonzalez. Source/WebCore: Given this markup:
There is no accessible content inside this modal, but WebKit traps user focus inside, making the rest of the page completely inaccessible. With this patch we ignore modals that don't have accessible content. We do this by walking the DOM to find any non-AX-ignored objects. Because determining whether or not an element is ignored is dependent on modals present on the page, this patch moves the call to `ignoredFromModalPresence` out of `AccessibilityObject::defaultObjectInclusion`, as this function is downstream of `computeAccessibilityIsIgnored`, and we need to call that on objects inside modal candidates. Without this move, we would recurse infinitely in `AXObjectCache::modalElementHasAccessibleContent`. We now check whether an object is ignored due to modal presence in `AccessibilityObject::accessibilityIsIgnored()`, so that function should be used as the final say in determining whether an object is ignored. Test: accessibility/ignore-modals-without-any-content.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::modalElementHasAccessibleContent): (WebCore::AXObjectCache::currentModalNode): * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::defaultObjectInclusion const): (WebCore::AccessibilityObject::accessibilityIsIgnored const): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::computeAccessibilityIsIgnored const): LayoutTests: * accessibility/ignore-modals-without-any-content-expected.txt: Added. * accessibility/ignore-modals-without-any-content.html: Added. * platform/glib/TestExpectations: Skip new test. * platform/ios/TestExpectations: Enable new test. * platform/ios/accessibility/ignore-modals-without-any-content-expected.txt: Added. * platform/win/TestExpectations: Skip new test. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290630 268f45cc-cd09-0410-ab3c-d52691b4dbfc 2022-02-28 Tyler Wilcock AX: WebKit should ignore empty modals rather than trapping focus inside them https://bugs.webkit.org/show_bug.cgi?id=237163 Reviewed by Chris Fleizach and Andres Gonzalez. * accessibility/ignore-modals-without-any-content-expected.txt: Added. * accessibility/ignore-modals-without-any-content.html: Added. * platform/glib/TestExpectations: Skip new test. * platform/ios/TestExpectations: Enable new test. * platform/ios/accessibility/ignore-modals-without-any-content-expected.txt: Added. * platform/win/TestExpectations: Skip new test. 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 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: