[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 Mar 6 17:45:41 PST 2012


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





--- Comment #32 from Pablo Flouret <pablof at motorola.com>  2012-03-06 17:45:40 PST ---
(In reply to comment #31)
> (From update of attachment 128248 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=128248&action=review
> 
> > Source/WebCore/rendering/RenderObject.cpp:2593
> > +    Settings* settings = document()->settings();
> > +
> >      // If we're not in a window (i.e., we're dormant from being put in the b/f cache or in a background tab)
> >      // then we don't want to render either.
> > -    return !document()->inPageCache() && !document()->view()->isOffscreen();
> > +    return !document()->inPageCache() && !document()->view()->isOffscreen() && settings && settings->allowAnimatedImages();
> 
> I haven't looked at the rest of the patch, but this caught my eye. Presumably you're expecting there's some potential situation where settings could be null, since you added a null check.
> 
> Does it make sense, though, to change the return value of willRenderImage() in that case? (i.e. if (!document()->inPageCache() && !document()->view()->isOffscreen()) is true, but settings is null, you will now return false instead of true.

Yeah, you're right, since allowAnimatedImages defaults to true it should be checking (!settings || settings->allowAnimatedImages()) instead. Good catch :-)

-- 
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