[webkit-changes] [WebKit/WebKit] 383986: AX: Sometimes unable to see play/pause animation c...

Joshua Hoffman noreply at github.com
Fri Oct 27 18:23:13 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 38398649280b12506c8e9423f05bd6e0c3861226
      https://github.com/WebKit/WebKit/commit/38398649280b12506c8e9423f05bd6e0c3861226
  Author: Joshua Hoffman <jhoffman23 at apple.com>
  Date:   2023-10-27 (Fri, 27 Oct 2023)

  Changed paths:
    M Source/WebCore/page/ContextMenuController.cpp
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/page/Page.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp

  Log Message:
  -----------
  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




More information about the webkit-changes mailing list