[webkit-changes] [WebKit/WebKit] b722c6: Individually paused / playing animations are not e...
Tyler Wilcock
noreply at github.com
Tue Feb 7 11:59:59 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b722c6bcb96bfe5a945ddfe161ae8503591c0862
https://github.com/WebKit/WebKit/commit/b722c6bcb96bfe5a945ddfe161ae8503591c0862
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2023-02-07 (Tue, 07 Feb 2023)
Changed paths:
M LayoutTests/fast/images/mac/play-pause-individual-animation-context-menu-items.html
M LayoutTests/fast/images/page-wide-animation-toggle-expected.txt
M LayoutTests/fast/images/page-wide-animation-toggle.html
M Source/WebCore/html/HTMLImageElement.cpp
M Source/WebCore/html/HTMLImageElement.h
M Source/WebCore/page/FrameView.cpp
M Source/WebCore/page/FrameView.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/rendering/RenderView.cpp
M Source/WebCore/rendering/RenderView.h
Log Message:
-----------
Individually paused / playing animations are not effected by Play All Animations and Pause All Animations
https://bugs.webkit.org/show_bug.cgi?id=251738
rdar://105043493
Reviewed by Andres Gonzalez.
Prior to this patch, given this sequence:
1. Load a page with a GIF animation
2. Individually pause that animation
3. Perform Play All Animations
The animation does not start playing again.
With this patch, RenderView::updatePlayStateForAllAnimations now
overrides any individual animation state, making Play All Animations and
Pause All Animations behave as expected.
Test case added to fast/images/page-wide-animation-toggle.html to cover
this behavior.
* LayoutTests/fast/images/mac/play-pause-individual-animation-context-menu-items.html:
The js-test.js and resource import for this test was wrong, so I fixed it.
* LayoutTests/fast/images/page-wide-animation-toggle-expected.txt:
* LayoutTests/fast/images/page-wide-animation-toggle.html:
* Source/WebCore/html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::setAllowsAnimation):
* Source/WebCore/html/HTMLImageElement.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::setImageAnimationEnabled):
* Source/WebCore/rendering/RenderView.cpp:
(WebCore::RenderView::updatePlayStateForAllAnimations):
* Source/WebCore/html/HTMLImageElement.h:
* Source/WebCore/page/FrameView.cpp:
* Source/WebCore/page/FrameView.h:
* Source/WebCore/page/Page.cpp:
* Source/WebCore/page/Page.h:
* Source/WebCore/rendering/RenderView.h:
Use ENABLE(ACCESSIBILITY_ANIMATION_CONTROL) in more places (we have to,
because HTMLImageElement::setAllowsAnimation is only defined under this
flag, and with this patch we start using that function in
RenderView::updatePlayStateForAllAnimations).
Canonical link: https://commits.webkit.org/259971@main
More information about the webkit-changes
mailing list