Closed Bug 848421 Opened 11 years ago Closed 11 years ago

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

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: ted, Assigned: tnikkel)

Details

Attachments

(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
https://hg.mozilla.org/integration/mozilla-inbound/rev/362ac27b9de0
https://hg.mozilla.org/integration/mozilla-inbound/rev/c2e60fc5e817

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 http://people.mozilla.org/~catlee/highscores/highscores.html

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

r=mats
Attachment #722005 - Flags: review?(matspal) → review+
https://hg.mozilla.org/mozilla-central/rev/362ac27b9de0
https://hg.mozilla.org/mozilla-central/rev/c2e60fc5e817
Status: NEW → RESOLVED
Closed: 11 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.

Attachment

General

Created:
Updated:
Size: