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

RESOLVED FIXED in mozilla22

Status

()

Core
Layout
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: ted, Assigned: tnikkel)

Tracking

unspecified
mozilla22
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(5 attachments)

(Reporter)

Description

5 years ago
Created attachment 721768 [details]
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.
(Reporter)

Comment 1

5 years ago
Created attachment 721770 [details]
expected

This is the same page as the testcase, with display:none removed from the body element. It renders as expected.
(Assignee)

Comment 2

5 years ago
Created attachment 722004 [details] [diff] [review]
patch

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)
(Assignee)

Comment 3

5 years ago
Created attachment 722005 [details] [diff] [review]
remove a prescontext argument, cleanup
Attachment #722005 - Flags: review?(matspal)
(Assignee)

Comment 4

5 years ago
Created attachment 722006 [details] [diff] [review]
reftest
(Assignee)

Comment 5

5 years ago
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.
(Assignee)

Comment 6

5 years ago
Ted, where did you come across this testcase? Is this something we might want to uplift?
(Reporter)

Comment 7

5 years ago
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.
(Reporter)

Comment 8

5 years ago
(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
Last Resolved: 5 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.