Changeset 218284 in webkit
- Timestamp:
- Jun 14, 2017 12:36:45 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r218279 r218284 1 2017-06-14 Zalan Bujtas <zalan@apple.com> 2 3 Crash in WebCore::RenderStyle::colorIncludingFallback. 4 https://bugs.webkit.org/show_bug.cgi?id=173347 5 <rdar://problem/32675317> 6 7 Reviewed by Chris Dumez. 8 9 * svg/animations/animated-svg-image-removed-from-document-paused.html: animations are not started synchronously anymore. 10 * svg/as-image/svg-css-animation-expected.txt: Added. 11 * svg/as-image/svg-css-animation.html: Added. 12 1 13 2017-06-14 Matt Lewis <jlewis3@apple.com> 2 14 -
trunk/LayoutTests/svg/animations/animated-svg-image-removed-from-document-paused.html
r214503 r218284 30 30 evalAndLog("document.body.appendChild(imageA)"); 31 31 document.body.offsetWidth; // Force layout. 32 shouldBeTrue("internals.isImageAnimating(imageA)"); 33 evalAndLog("document.body.appendChild(imageB)"); 34 document.body.offsetWidth; // Force layout. 35 shouldBeTrue("internals.isImageAnimating(imageB)"); 32 setTimeout(function() { 33 shouldBeTrue("internals.isImageAnimating(imageA)"); 36 34 37 finishJSTest(); 35 evalAndLog("document.body.appendChild(imageB)"); 36 document.body.offsetWidth; // Force layout. 37 setTimeout(function() { 38 shouldBeTrue("internals.isImageAnimating(imageB)"); 39 finishJSTest(); 40 }, 30); 41 }, 30); 38 42 }, 30); 39 43 }, 30); -
trunk/Source/WebCore/ChangeLog
r218278 r218284 1 2017-06-14 Zalan Bujtas <zalan@apple.com> 2 3 Crash in WebCore::RenderStyle::colorIncludingFallback. 4 https://bugs.webkit.org/show_bug.cgi?id=173347 5 <rdar://problem/32675317> 6 7 Reviewed by Chris Dumez. 8 9 Starting an SVG image animation synchronously might trigger recursive style recalc. 10 We should kick off the animation on a zero timer to reduce callstack complexity. 11 12 Test: svg/as-image/svg-css-animation.html 13 14 * loader/cache/CachedImage.cpp: 15 (WebCore::CachedImage::didAddClient): 16 * platform/graphics/Image.cpp: 17 (WebCore::Image::Image): 18 (WebCore::Image::startAnimationAsynchronously): 19 * platform/graphics/Image.h: 20 1 21 2017-06-14 Brady Eidson <beidson@apple.com> 2 22 -
trunk/Source/WebCore/loader/cache/CachedImage.cpp
r218038 r218284 120 120 121 121 if (m_image) 122 m_image->startAnimation ();122 m_image->startAnimationAsynchronously(); 123 123 124 124 CachedResource::didAddClient(client); -
trunk/Source/WebCore/platform/graphics/Image.cpp
r216702 r218284 48 48 Image::Image(ImageObserver* observer) 49 49 : m_imageObserver(observer) 50 , m_animationStartTimer(*this, &Image::startAnimation) 50 51 { 51 52 } … … 308 309 } 309 310 311 void Image::startAnimationAsynchronously() 312 { 313 if (m_animationStartTimer.isActive()) 314 return; 315 m_animationStartTimer.startOneShot(0_s); 316 } 317 310 318 void Image::dump(TextStream& ts) const 311 319 { -
trunk/Source/WebCore/platform/graphics/Image.h
r216702 r218284 36 36 #include "ImageTypes.h" 37 37 #include "NativeImage.h" 38 #include "Timer.h" 38 39 #include <wtf/Optional.h> 39 40 #include <wtf/RefCounted.h> … … 130 131 // It will automatically pause once all observers no longer want to render the image anywhere. 131 132 virtual void startAnimation() { } 133 void startAnimationAsynchronously(); 132 134 virtual void stopAnimation() {} 133 135 virtual void resetAnimation() {} … … 199 201 RefPtr<SharedBuffer> m_encodedImageData; 200 202 ImageObserver* m_imageObserver; 203 Timer m_animationStartTimer; 201 204 }; 202 205
Note: See TracChangeset
for help on using the changeset viewer.