Closed
Bug 517543
Opened 16 years ago
Closed 16 years ago
need a STATUS_DECODE_COMPLETE for imgIRequest
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(1 file, 1 obsolete file)
|
8.72 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
Right now checking GetAnimated on imgIRequests doesn't tell us very much, because the image might be in the process of being decoded. STATUS_FRAME_COMPLETE doesn't help here, because that only says we've got the _first_ frame, but there might be more. Under decode-on-draw and discarding, STATUS_LOAD_COMPLETE doesn't help either, meaning that this consumer is wrong:
http://mxr.mozilla.org/mozilla-central/source/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp#2182
I'm not sure about this one:
http://mxr.mozilla.org/mozilla-central/source/accessible/src/html/nsHTMLImageAccessible.cpp#119
Comment 1•16 years ago
|
||
GetAnimated is on imgIContainer ;)
And the method should throw some error value if it is unknown whether
the image is animated. Probably NS_ERROR_NOT_AVAILABLE.
| Assignee | ||
Comment 2•16 years ago
|
||
adding a patch. flagging joe for review.
Attachment #401510 -
Flags: review?(joe)
| Assignee | ||
Comment 3•16 years ago
|
||
slightly smarter patch to address smaug's concerns.
Attachment #401510 -
Attachment is obsolete: true
Attachment #401520 -
Flags: review?(joe)
Attachment #401510 -
Flags: review?(joe)
Comment 4•16 years ago
|
||
Comment on attachment 401520 [details] [diff] [review]
patch v2
>- PRUint32 statusBitsToClear = imgIRequest::STATUS_FRAME_COMPLETE;
>+ PRUint32 statusBitsToClear = imgIRequest::STATUS_FRAME_COMPLETE
>+ | imgIRequest::STATUS_DECODE_COMPLETE;
Style nit, this should be
PRUint32 statusBitsToClear = imgIRequest::STATUS_FRAME_COMPLETE |
imgIRequest::STATUS_DECODE_COMPLETE;
Comment 5•16 years ago
|
||
Comment on attachment 401520 [details] [diff] [review]
patch v2
Don't know if I should have caught this before, but I'm not in love with OnStopDecode taking an nsresult as a parameter. Not sure why, but it feels wrong-ish.
Something to keep in mind for future rearchitectings :)
Attachment #401520 -
Flags: review?(joe) → review+
| Assignee | ||
Comment 6•16 years ago
|
||
(In reply to comment #5)
> (From update of attachment 401520 [details] [diff] [review])
> Don't know if I should have caught this before, but I'm not in love with
> OnStopDecode taking an nsresult as a parameter. Not sure why, but it feels
> wrong-ish.
>
> Something to keep in mind for future rearchitectings :)
It's very much wrong. I've quite a bit about it in bug 505385, bug 435296, and in various inline comments.
| Assignee | ||
Comment 7•16 years ago
|
||
pushed to mc as 6ac9e403c8a5.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•