Closed Bug 841983 Opened 11 years ago Closed 11 years ago

require whitespace around 'and', 'or', and after 'not' in @supports rules

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dbaron, Assigned: dbaron)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

      No description provided.
Comment on attachment 714709 [details] [diff] [review]
Require whitespace around 'not', 'and', and 'or' keywords in @supports rules.

Review of attachment 714709 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with that.

::: dom/locales/en-US/chrome/layout/css.properties
@@ +120,5 @@
>  PEBadDirValue=Expected 'ltr' or 'rtl' in direction selector but found '%1$S'.
>  PESupportsConditionStartEOF2='not', '(', or function
>  PESupportsConditionInParensEOF=')'
>  PESupportsConditionNotEOF='not'
> +PESupportsWhitespaceRequired=Expected whitespace after 'not', 'and', or 'or'.

This should be "Expected whitespace after 'not', or before and after 'and' or 'or'.", but that might be getting a bit confusing.  Can you find some wording that captures the "white space after 'and' and 'or'" requirement too, or maybe split this into two separate error messages (one for "not" and another for "and" and "or")?
Attachment #714709 - Flags: review?(cam) → review+
Except the way the code is structured, it'll never give that error before an 'and' or an 'or'; it'll just finish parsing the conjunction or disjunction and report the next thing as unexpected.
OK, fair enough.  One other thing I was going to mention that I forgot to: can you update the comments above each of the Parse*() functions that have the grammar snippets in them to match what you are now parsing?
https://hg.mozilla.org/mozilla-central/rev/20abb67042df
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: