Closed Bug 252730 Opened 20 years ago Closed 20 years ago

[FIX]Images should not animate if none of the proxies have a listener

Categories

(Core :: Graphics: ImageLib, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

Basically, we should only count proxies that would deliver notifications someone
cares about.

David, I talked to pav about this on IRC today.  In short, he'd prefer that the
imgRequest not point to the listeners directly, the lock stuff is irrelevant
(and he's working on removing it), and pav would rather the imgRequest pointed
to all its proxies.

Given those constraints, we decided the best thing is to have the imgRequest not
just get the count of the proxy array but check the individual proxies to see
whether it finds one with a listener.  If it does, it animates.

The chances of an imgRequest having a lot of listener-less proxies is pretty
low, so the linear search seems OK.

If done right this will fix bug 239197 too.  I may remove a large chunk of the
changes for bug 210001 also; I need to decide whether the gymnastics I may have
to do in nsImageLoadingContent (which just wants to listen for image completion
when it has an mPendingRequest) are worth that.  On the bright side, using the
clone() stuff we have for the image frame _could_ simplify the image loading
content code a good bit... (I may push off all of that stuff into a separate bug
if it starts to bog me down; this bug is going to focus on making changes such
that bug 236889 can land).
Attached patch PatchSplinter Review
Comment on attachment 154125 [details] [diff] [review]
Patch

I decided the bug 210001 code wasn't worth messing with -- when the secondary
request loads we need to notify the image frame somehow, which makes life very
complicated unless all notifications go through the nsImageLoadingContent
object.

This last could clone() requests as needed when observers are added/removed,
but that seems like overkill...
Attachment #154125 - Flags: superreview?(dbaron)
Attachment #154125 - Flags: review?(pavlov)
Summary: Images should not animate if none of the proxies have a listener → [FIX]Images should not animate if none of the proxies have a listener
Attachment #154125 - Flags: superreview?(dbaron) → superreview+
Comment on attachment 154125 [details] [diff] [review]
Patch

r=
Attachment #154125 - Flags: review?(pavlov) → review+
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: