CrashTracer: com.apple.WebKit.WebContent at WebCore: WebCore::Document::updateStyleIf...
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Jan 2018 19:46:38 +0000 (19:46 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Jan 2018 19:46:38 +0000 (19:46 +0000)
commitbdec185f3121d4e7e9cdba90d985a1abaa839cff
tree9114731688e6163aad12801e5da1a442fae860ac
parentcf89e5aa55b82b6f965a8af014cc502222d70659
CrashTracer: com.apple.WebKit.WebContent at WebCore: WebCore::Document::updateStyleIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=182299
<rdar://problem/36853088>

Reviewed by Simon Fraser.

Source/WebCore:

Mostly speculative fix for the case where a scrollTo moves an
animated SVG image into view, causing its animation to restart during
a paint operation. This was causing a release ASSERT, so we now defer
the resumption of the animation into a timer.

Test: svg/animated-svgImage-scroll.html

* rendering/RenderElement.cpp:
(WebCore::RenderElement::repaintForPausedImageAnimationsIfNeeded): Enqueue the
animation if it is an SVGImage.
* svg/graphics/SVGImage.cpp: Add a timer to enqueue animation starts.
(WebCore::SVGImage::SVGImage):
(WebCore::SVGImage::startAnimationTimerFired):
(WebCore::SVGImage::enqueueStartAnimation):
(WebCore::SVGImage::stopAnimation):
* svg/graphics/SVGImage.h:

LayoutTests:

* svg/animated-svgImage-scroll-expected.txt: Added.
* svg/animated-svgImage-scroll.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/animated-svgImage-scroll-expected.txt [new file with mode: 0644]
LayoutTests/svg/animated-svgImage-scroll.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/svg/graphics/SVGImage.cpp
Source/WebCore/svg/graphics/SVGImage.h