[Webkit-unassigned] [Bug 9767] WebPreference methods setAllowsAnimatedImages: and setAllowsAnimatedImageLooping: don't actually affect WebView behaviors

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 24 14:48:05 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=9767





--- Comment #36 from Pablo Flouret <pablof at motorola.com>  2012-04-24 14:48:00 PST ---
(In reply to comment #35)
> (From update of attachment 130705 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=130705&action=review
> 
> > Source/WebCore/platform/graphics/BitmapImage.cpp:454
> > -    if (!skippingFrames && imageObserver()->shouldPauseAnimation(this))
> > +    if (imageObserver()->shouldPauseAnimation(this))
> 
> Why was !skippingFrames removed?

If shouldPauseAnimation() is not checked when skipping frames, the effect is that in some situations (like changing tabs and back) the animation is advanced to catch up.
I suppose the question here is whether the animation should catch up to the frame that corresponds to the moment in time when image-animating was actually paused (even if the tab was hidden at the time, for instance), or if it doesn't really matter.
Personally, i don't think it matters too much, this sounds like something to save cpu cycles or to prevent annoyance.

> > Source/WebCore/rendering/RenderObject.cpp:2593
> > +    return !document()->inPageCache() && !document()->view()->isOffscreen() && (!settings || settings->allowAnimatedImages());
> 
> Does this also affect static images, not just animating ones?

It shouldn't affect static images. As far as i can see willRenderImage() is only called from code dealing with animated images, but it's probably wise to check that the image is an animated one. What's a good way to check this, BitmapImage::frameCount() > 1?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list