Closed
Bug 836155
Opened 13 years ago
Closed 13 years ago
Image::GetCurrentFrameRect should become Image::FrameRect(aWhichFrame)
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: seth, Assigned: seth)
Details
Attachments
(1 file, 1 obsolete file)
For some instances of an image to ignore animation, we need to eliminate as much as possible imgIContainer/Image methods that always act on the current frame. |GetCurrentFrameRect| is one such method. We should give it an |aWhichFrame| argument and rename it to |FrameRect|.
| Assignee | ||
Comment 1•13 years ago
|
||
Proposed patch. Try job here: https://tbpl.mozilla.org/?tree=Try&rev=80b643852f40
Attachment #707957 -
Flags: review?(joe)
Comment 2•13 years ago
|
||
Comment on attachment 707957 [details] [diff] [review]
Replace GetCurrentFrameRect() with FrameRect(aWhichFrame).
Review of attachment 707957 [details] [diff] [review]:
-----------------------------------------------------------------
I feel relatively strongly about the below comment, but I don't need to see this afterwards, so r=me.
::: image/src/Image.h
@@ +69,2 @@
> */
> + virtual nsresult FrameRect(uint32_t aWhichFrame, nsIntRect& aRect) = 0;
Oh, I am not happy about having an nsresult return value. I'd much rather return an empty rect in the error case.
Attachment #707957 -
Flags: review?(joe) → review+
| Assignee | ||
Comment 3•13 years ago
|
||
You got it, Joe. I'll make the change. Thanks for the review.
| Assignee | ||
Comment 4•13 years ago
|
||
Incidentally, the one thing we lose here is the ability to tell the caller that they passed in an invalid FRAME_* enumeration value, but as I mentioned in bug 836124, that doesn't seem important, since any code that does that is just wrong. I'll make that print an NS_WARNING instead.
| Assignee | ||
Comment 5•13 years ago
|
||
Made review changes. Shouldn't require another try run.
| Assignee | ||
Updated•13 years ago
|
Attachment #707957 -
Attachment is obsolete: true
| Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Comment 6•13 years ago
|
||
Keywords: checkin-needed
Comment 7•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in
before you can comment on or make changes to this bug.
Description
•