Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Scrolling away from and back to an individually playing animation wil…
…l cause it to be incorrectly paused https://bugs.webkit.org/show_bug.cgi?id=251759 rdar://105059884 Reviewed by Andres Gonzalez. Given this sequence: 1. Pause All Animations on the page 2. Individually play an animation, notice it is animating correctly. 3. Scroll away from the animation such that it's off-screen 4. Scroll back to the animation Notice the animation is paused when it should be playing (because it's respecting the page-wide pause state over its own play-state). This happened because RenderElement::repaintForPausedImageAnimationsIfNeeded referenced the Page::imageAnimationEnabled state rather than RenderElement::allowsAnimation. The former does not respect an individual animation's play-state (i.e. it could be playing individually while the rest of the animations on the page are forced to be paused.) * LayoutTests/fast/images/individual-animation-toggle-expected.txt: * LayoutTests/fast/images/individual-animation-toggle.html: Add a testcase verifying this bug doesn't happen again. * Source/WebCore/rendering/RenderElement.h: * Source/WebCore/rendering/RenderElement.cpp: (WebCore::RenderElement::allowsAnimation const): (WebCore::RenderElement::repaintForPausedImageAnimationsIfNeeded): * Source/WebCore/rendering/RenderImage.cpp: (WebCore::RenderImage::allowsAnimation const): Deleted -- the logic is moved into RenderElement::allowsAnimation. * Source/WebCore/rendering/RenderImage.h: Canonical link: https://commits.webkit.org/259910@main
- Loading branch information
Showing
6 changed files
with
58 additions
and
31 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
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