@supports rule should not parse if property value is empty

RESOLVED FIXED in mozilla17

Status

()

Core
CSS Parsing and Computation
RESOLVED FIXED
5 years ago
9 days ago

People

(Reporter: heycam, Assigned: heycam)

Tracking

(Blocks: 1 bug)

Trunk
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
In

  @supports (a:) { ... }

the "a:" doesn't match declaration, so we should drop the whole at-rule.
(Assignee)

Comment 1

5 years ago
Created attachment 648941 [details] [diff] [review]
patch
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #648941 - Flags: review?(dbaron)
Comment on attachment 648941 [details] [diff] [review]
patch

I think you should:

 (1) split the test rather than change it, and make one fork of it test what it was testing, but with "unknown:x" instead of "unknown:", and have your current fork of it.

 (2) move your new code above the 'if (propID == eCSSProperty_UNKNOWN)' test (and probably above the LookupProperty call too)

 (3) add another test for the same thing with a known property

Or is there a reason the same bug wouldn't have been present with a known property?

r=dbaron with that
Attachment #648941 - Flags: review?(dbaron) → review+
(Assignee)

Comment 3

5 years ago
(In reply to David Baron [:dbaron] from comment #2)
>  (1) split the test rather than change it, and make one fork of it test what
> it was testing, but with "unknown:x" instead of "unknown:", and have your
> current fork of it.

I think http://hg.mozilla.org/mozilla-central/file/a7fadfbad932/layout/reftests/w3c-css/submitted/conditional3/css-supports-021.xht already covers that case.

>  (2) move your new code above the 'if (propID == eCSSProperty_UNKNOWN)' test
> (and probably above the LookupProperty call too)

OK.

>  (3) add another test for the same thing with a known property

OK.

> Or is there a reason the same bug wouldn't have been present with a known
> property?

No, you're right the test needs to go earlier.
(Assignee)

Comment 4

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/c9564834bfe1

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/c9564834bfe1
https://hg.mozilla.org/mozilla-central/rev/92e7a70cc292
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Blocks: 1353219
You need to log in before you can comment on or make changes to this bug.