Closed Bug 807336 Opened 12 years ago Closed 12 years ago

"Unknown property" parse warnings appear in error console, for unrecognized properties in a failing @supports condition

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: dholbert, Assigned: heycam)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file testcase 1
I'm attaching a testcase, with this style: > @supports (display: pirate) { > #myDiv { > parrot: red; > leg: peg; > eyepatch: visible; > } > } Of course "display: pirate" is unsupported, so the question is -- how do we deal with the also-unsupported properties in the @supports condition? I'd expect that we wouldn't report parse errors for them, because they're in an @supports rule for some unsupported feature, so conceptually they're "skipped" and likely known-to-be-not-supported. Formal STR below. STR: 0. Open error console. Clear it if you like, to make it easier to see things. 1. Load testcase. 2. Inspect error console. EXPECTED RESULTS: No CSS errors/warnings reported. ACTUAL RESULTS: CSS parsing errors are reported.
Depends on: 649740
BTW: I filed bug 798592 on a situation like this, on the assumption that this sort of thing would produce EXPECTED RESULTS & prevent error-console spam. Maybe I was just mistaken about that, though...
OS: Linux → All
Hardware: x86_64 → All
I agree, I think parsing errors should only be reported for non-value related errors (like missing parens).
Assignee: nobody → cam
Blocks: 798592
Sorry, I read comment 0 too quickly so my comment 2 is wrong. What I should have said is that property related parse errors (bad property name or value) should be suppressed inside failing @supports rules. So things like a missing ":" in a declaration or an unexpected EOF would still get reported.
What about when we parse a declaration because of, say, assigning to cssText somewhere inside an existing failing @supports rule? Should we be searching up the tree to find if we should be suppressing the errors here?
Attached patch patchSplinter Review
Attachment #678606 - Flags: review?(dbaron)
Status: NEW → ASSIGNED
A design choice to consider: making these Info messages instead. Something like: Info: line/col value foo for property bar in @supports rule is/is not supported. may be more author-friendly.
Comment on attachment 678606 [details] [diff] [review] patch I was originally thinking you were going to hook into OUTPUT_ERROR/CLEAR_ERROR, but after looking at this for a bit I think this is fine. r=dbaron
Attachment #678606 - Flags: review?(dbaron) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Depends on: 824654
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: