Closed Bug 848421 Opened 7 years ago Closed 7 years ago

image-rendering: -moz-crisp-edges gets lost on html background image if body is display: none


(Core :: Layout, defect)

Not set





(Reporter: ted, Assigned: tnikkel)



(5 files)

Attached file testcase
The attachment is a HTML page with a background-image on the html element, with background-size: cover, and image-rendering: -moz-crisp-edges; The background image is a 2x2 white and black checkerboard (for maximum effect).

It should render as a crisp 2x2 checkerboard, but we lose the -moz-crisp-edges if the body element has display:none. If you remove display:none from body it works as expected.
Attached file expected
This is the same page as the testcase, with display:none removed from the body element. It renders as expected.
Attached patch patchSplinter Review
FindBackgroundStyleFrame just looks for the frame for the body element. Just use FindBackground like we go everywhere else, it does it right.
Assignee: nobody → tnikkel
Attachment #722004 - Flags: review?(roc)
Attachment #722005 - Flags: review?(matspal)
Attached patch reftestSplinter Review

I'll land the cleanup patch later when it gets review, but this bug can close when these merge.
Ted, where did you come across this testcase? Is this something we might want to uplift?
I found this bug while adding an easter egg to

It was driving me nuts so I manually reduced the testcase. It seems like a pretty minor edgecase, it's probably not worth worrying about.
(Thanks for fixing it, though!)
Comment on attachment 722005 [details] [diff] [review]
remove a prescontext argument, cleanup

Attachment #722005 - Flags: review?(matspal) → review+
Closed: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.