[css3-mediaqueries] should comma be an error handling recovery point?

One thing that I vaguely remember discussion of but that I'd like to
clarify before I go ahead with changing Mozilla's implementation is
the following:

The media queries spec clearly states that errors *within* an
expression (as long as the expression is still terminated by a
closing parenthesis) in a media query cause the query to be false
all the time, but the query can still parse successfully and other
queries in the same list can be true.  For example, either of:

  screen and (unknown-feature: 500px), screen and (min-width: 500px)
  screen and ( [ { } ] ), screen and (min-width: 500px)

can still be true when the width is at least 500px, because the
error inside the expression only has the scope of the query, and
other queries in the list can still parse and evaluate to true.  (In
the previous CR, the error was actually contained inside the
expression, such that if the query had a not at the front the query
as a whole could still be true.)

My question regards syntax errors that are not in expressions.  The
spec hasn't been very precise about whether those invalidate the
query or the entire query list (although Anne updated the editor's
draft to clarify his previous understanding, which is the former).
In particular, can a query list such as:

  screen and { not even an expression }, screen and (min-width: 500px)

evaluate to true, even though the error is not inside an expression?
Is that error contained by the query, or does it cause the entire
query list to be ignored because it doesn't match the grammar?

Given the previous change, already accepted, to make errors inside
expressions invalidate the whole query rather than the expression,
the former (Anne's position) seems to make sense to me, since it
makes the comma an error handling point.  So Anne's position makes
sense to me, although the spec could perhaps be a little clearer.
But I'd like to make sure others in the group agree before
implementing this change and asking Ian to change Acid3 (since the
Acid3 test for media queries specifies the opposite, just as it used
to require the opposite for the other change I described above).

More examples are in:


L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Sunday, 28 September 2008 01:51:28 UTC