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

RESOLVED FIXED in mozilla21

Status

()

defect
RESOLVED FIXED
6 years ago
2 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

(Blocks 1 bug)

Trunk
mozilla21
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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: 6 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.