Closed Bug 1141380 Opened 10 years ago Closed 3 years ago

Simplify image-orientation support in nsImageFrame::ComputeSize

Categories

(Core :: Graphics: ImageLib, task)

task
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: seth, Unassigned)

References

Details

Attachments

(1 file)

Bug 870021 added, among other things, code to handle image-orientation in nsImageFrame::ComputeSize. The code is more complex than necessary; it's only necessary to check mImage->GetOrientation().
Andrea, I thought this might be good for you to review because very few people currently understand image wrappers, even though they're used for a lot of things in Gecko. This particular code involves an image wrapper, but the author didn't realize that, so they wrote code that is more complex than necessary. To get up to speed with how this code uses image wrappers, take a look at the ImageWrapper and OrientedImage classes (there are comments in the header files), and then look at nsLayoutUtils::OrientImage and nsImageFrame::NotifyNewCurrentRequest. Hopefully it should be clear how everything fits together - mImage contains an ImageWrapper (an OrientedImage instance) and so mImage->GetOrientation() always does the right thing. Let me know if there's anything I can clarify!
Attachment #8574983 - Flags: review?(amarchesini)
Comment on attachment 8574983 [details] [diff] [review] Simplify image-orientation support in nsImageFrame::ComputeSize Review of attachment 8574983 [details] [diff] [review]: ----------------------------------------------------------------- sorry for the delay. I was in PTO.
Attachment #8574983 - Flags: review?(amarchesini) → review+
(In reply to Andrea Marchesini (:baku) from comment #2) > sorry for the delay. I was in PTO. No worries! Thanks for the review.
Keywords: feature

The bug assignee didn't login in Bugzilla in the last 7 months.
:aosmond, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: seth.bugzilla → nobody
Flags: needinfo?(aosmond)

Orientation is handled very differently now.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(aosmond)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: