Closed Bug 1365511 Opened 3 years ago Closed 3 years ago
Display XULImage size problem which will cause some failures when turning on background color layer
nsDisplayXULImage calculates destination rect at , but the real painting destination rect is here . The two rect are different when the mUseSrcAttr is true.  https://dxr.mozilla.org/mozilla-central/source/layout/xul/nsImageBoxFrame.cpp#496  https://dxr.mozilla.org/mozilla-central/source/layout/xul/nsImageBoxFrame.cpp#380
A related test is "layout/reftests/xul/object-position-png-001.xul". I can reproduce the same problem with webrender off and background color layer on. In this patch, nsDisplayXULImage will call nsImageBoxFrame::GetDestRect to get the same destination rect. I also slightly change the order of checks in nsImageBoxFrame::PaintImage to make it more reasonable.
Attachment #8868420 - Flags: review?(matt.woodrow)
Attachment #8868420 - Flags: review?(matt.woodrow) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/b204857f08a1 Correct nsDisplayXULImage destination rect. r=mattwoodrow
You need to log in before you can comment on or make changes to this bug.