Closed Bug 780337 Opened 12 years ago Closed 12 years ago

@supports rule should not parse if property value is empty

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: heycam, Assigned: heycam)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In

  @supports (a:) { ... }

the "a:" doesn't match declaration, so we should drop the whole at-rule.
Attached patch patchSplinter Review
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+
(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.
https://hg.mozilla.org/mozilla-central/rev/c9564834bfe1
https://hg.mozilla.org/mozilla-central/rev/92e7a70cc292
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: