Closed Bug 1619701 Opened 5 years ago Closed 5 years ago

Invalid background styling should resolve to `none` rather than `Ignore` when HCM is enabled

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: morgan, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Pasted from :emilio's phab comment :)

<!doctype html>
<style>
body { margin: 0 }
div {
width: 100vw;
height: 100vh;
background-image: url("red.png");
}

div {
background-image: linear-gradient(blue, blue);
}
</style>
<div></div>

The issue is that we're returning Ignore for linear-gradient, but Apply for the url. We should probably treat the linear-gradient as either none, or revert instead. The easiest is to pass an &mut Cow<PropertyDeclaration> instead of &PropertyDeclaration for this case, I suspect, and turn it into a none declaration.

That being said, this is already an issue for color as well, see:

<!doctype html>
<style>
body { margin: 0 }
div {
width: 100vw;
height: 100vh;
color: transparent;
}

div {
color: black;
}
</style>
<div>You should see me.</div>

?ni as requested :)

Flags: needinfo?(emilio)
Blocks: hcm
Assignee: nobody → emilio
Status: NEW → ASSIGNED
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b43d1064488f Respect the cascade properly when in high-contrast mode. r=morgan
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: