RESOLVED FIXED 263735
AX: Sometimes unable to see play/pause animation context menu item when setting is toggled
https://bugs.webkit.org/show_bug.cgi?id=263735
Summary AX: Sometimes unable to see play/pause animation context menu item when setti...
Joshua Hoffman
Reported 2023-10-26 11:21:50 PDT
When the Autoplay Animated Images setting is toggled off and on, the setting often remains stale, so the context menu item does not reappear when it should.
Attachments
Patch (5.42 KB, patch)
2023-10-26 12:21 PDT, Joshua Hoffman
no flags
Patch (5.47 KB, patch)
2023-10-26 13:30 PDT, Joshua Hoffman
no flags
Patch (5.56 KB, patch)
2023-10-26 16:19 PDT, Joshua Hoffman
no flags
Patch (5.58 KB, patch)
2023-10-27 13:06 PDT, Joshua Hoffman
no flags
Radar WebKit Bug Importer
Comment 1 2023-10-26 11:22:24 PDT
Joshua Hoffman
Comment 2 2023-10-26 11:22:40 PDT
Joshua Hoffman
Comment 3 2023-10-26 12:21:03 PDT
chris fleizach
Comment 4 2023-10-26 12:30:44 PDT
Comment on attachment 468355 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=468355&action=review > Source/WebCore/page/Page.h:706 > bool imageAnimationEnabled() const { return m_imageAnimationEnabled; } why isn't the value of imageAnimationEnabled() sufficient for this? it ends up just being the inverse of whatever is set for imageAnimationEnabled
Tyler Wilcock
Comment 5 2023-10-26 12:33:37 PDT
Comment on attachment 468355 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=468355&action=review > Source/WebCore/page/Page.cpp:2186 > + > +void Page::setSystemAllowsAnimationControls(bool isAllowed) > +{ > + m_systemAllowsAnimationControls = isAllowed; > +} > #endif Seems like this block has grown long enough to comment this #endif. #endif // PLATFORM(FOO)
Joshua Hoffman
Comment 6 2023-10-26 13:27:43 PDT
Comment on attachment 468355 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=468355&action=review >> Source/WebCore/page/Page.cpp:2186 >> #endif > > Seems like this block has grown long enough to comment this #endif. > > #endif // PLATFORM(FOO) Will add that! >> Source/WebCore/page/Page.h:706 >> bool imageAnimationEnabled() const { return m_imageAnimationEnabled; } > > why isn't the value of imageAnimationEnabled() sufficient for this? it ends up just being the inverse of whatever is set for imageAnimationEnabled m_imageAnimationEnabled can be true even with the preference is off (for example, if the user has clicked "Play all animations"). See: anywhere we call setImageAnimationEnabled.
Joshua Hoffman
Comment 7 2023-10-26 13:30:01 PDT
chris fleizach
Comment 8 2023-10-26 14:30:33 PDT
Comment on attachment 468358 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=468358&action=review > Source/WebCore/page/Page.h:1240 > + bool m_systemAllowsAnimationControls { false }; should this concept be called m_imageAnimationControlsEnabled
Joshua Hoffman
Comment 9 2023-10-26 14:36:41 PDT
(In reply to chris fleizach from comment #8) > Comment on attachment 468358 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=468358&action=review > > > Source/WebCore/page/Page.h:1240 > > + bool m_systemAllowsAnimationControls { false }; > > should this concept be called > > m_imageAnimationControlsEnabled That does make sense, but I worry it is too similar to ImageAnimationControlEnabled, a preference which uses the ACCESSIBILITY_ANIMATION_CONTROL compile flag to determine if we should allow animation controls at all (used alongside the AX preference).
chris fleizach
Comment 10 2023-10-26 14:38:48 PDT
(In reply to Joshua Hoffman from comment #9) > (In reply to chris fleizach from comment #8) > > Comment on attachment 468358 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=468358&action=review > > > > > Source/WebCore/page/Page.h:1240 > > > + bool m_systemAllowsAnimationControls { false }; > > > > should this concept be called > > > > m_imageAnimationControlsEnabled > > That does make sense, but I worry it is too similar to > ImageAnimationControlEnabled, a preference which uses the > ACCESSIBILITY_ANIMATION_CONTROL compile flag to determine if we should allow > animation controls at all (used alongside the AX preference). M_systemImageAnimationEnabled ?
Joshua Hoffman
Comment 11 2023-10-26 14:39:51 PDT
(In reply to chris fleizach from comment #10) > (In reply to Joshua Hoffman from comment #9) > > (In reply to chris fleizach from comment #8) > > > Comment on attachment 468358 [details] > > > Patch > > > > > > View in context: > > > https://bugs.webkit.org/attachment.cgi?id=468358&action=review > > > > > > > Source/WebCore/page/Page.h:1240 > > > > + bool m_systemAllowsAnimationControls { false }; > > > > > > should this concept be called > > > > > > m_imageAnimationControlsEnabled > > > > That does make sense, but I worry it is too similar to > > ImageAnimationControlEnabled, a preference which uses the > > ACCESSIBILITY_ANIMATION_CONTROL compile flag to determine if we should allow > > animation controls at all (used alongside the AX preference). > > M_systemImageAnimationEnabled ? works for me!
Joshua Hoffman
Comment 12 2023-10-26 16:19:14 PDT
Tyler Wilcock
Comment 13 2023-10-26 21:50:06 PDT
Comment on attachment 468362 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=468362&action=review > Source/WebCore/page/Page.h:1240 > + bool m_systemImageAnimationEnabled { false }; This new name and the default value of false feel inconsistent to me. All systems / platforms allow animation by default, contrary to this default value of false. It also might be confusing to have two flags that are named so similarly (m_imageAnimationEnabled and m_systemImageAnimationEnabled). If we called this something like m_systemAllowsAnimationControls that might be more precise, and distinct from m_imageAnimationEnabled. What do y'all think?
Joshua Hoffman
Comment 14 2023-10-26 22:24:23 PDT
(In reply to Tyler Wilcock from comment #13) > Comment on attachment 468362 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=468362&action=review > > > Source/WebCore/page/Page.h:1240 > > + bool m_systemImageAnimationEnabled { false }; > > This new name and the default value of false feel inconsistent to me. All > systems / platforms allow animation by default, contrary to this default > value of false. It also might be confusing to have two flags that are named > so similarly (m_imageAnimationEnabled and m_systemImageAnimationEnabled). If > we called this something like m_systemAllowsAnimationControls that might be > more precise, and distinct from m_imageAnimationEnabled. What do y'all think? This does make sense—I think the more we can separate the two the better as to not make it more convoluted.
Joshua Hoffman
Comment 15 2023-10-27 13:06:36 PDT
EWS
Comment 16 2023-10-27 18:23:04 PDT
Committed 269878@main (38398649280b): <https://commits.webkit.org/269878@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 468372 [details].
Note You need to log in before you can comment on or make changes to this bug.