-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 3839864. rdar://117215059
AX: Sometimes unable to see play/pause animation context menu item when setting is toggled https://bugs.webkit.org/show_bug.cgi?id=263735 rdar://117215059 Reviewed by Tyler Wilcock. When deciding whether to add the "Play/Pause all animations" or "Play/Pause animation" context menu item, we had previously used a softlink to reference _AXSReduceMotionAutoplayAnimatedImagesEnabled. The issue with using this from the web content process, however, is that distributed notifications are not permitted as per the sandbox, so updates to this setting were not reaching that process. To resolve this, this patch now piggybacks onto our existing cross-process update for the animation setting using the AccessibilityPreferencesChanged notification and WebPage::updateImageAnimationEnabled. A new flag, m_systemAllowsAnimationControls, now maintains the state of this setting, and allows the Page to have an up-to-date view of the setting without relying on the softlink. * Source/WebCore/page/ContextMenuController.cpp: (WebCore::ContextMenuController::populate): * Source/WebCore/page/Page.cpp: (WebCore::Page::setSystemAllowsAnimationControls): * Source/WebCore/page/Page.h: (WebCore::Page::systemAllowsAnimationControls const): * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updateImageAnimationEnabled): Canonical link: https://commits.webkit.org/269878@main Identifier: 267815.551@safari-7617.1.17.12-branch
- Loading branch information
Dan Robson
committed
Nov 9, 2023
1 parent
00283a2
commit abae04a
Showing
4 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters