Closed Bug 454227 Opened 16 years ago Closed 16 years ago

Media Queries: incorrect EOF handling

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9.1b1

People

(Reporter: annevk, Assigned: dbaron)

References

()

Details

(Keywords: verified1.9.1)

Attachments

(1 file)

Given the default CSS error handling the media query "(min-width,all" should not apply.

Maybe the specification should be slightly more explicit about EOF handling. What do you think?

Tested with: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b1pre) Gecko/20080908054322 Minefield/3.1b1pre
Flags: blocking1.9.1?
I don't see what this has to do with EOF handling.  CSS 2.1 says that open constructs are closed on EOF, so "all and (min-width: 0" probably should apply, and we ought to test that.

However, this looks like an unparseable expression, so I agree it shouldn't apply.  (However, if we were implementing HTML4's media list parsing rules rather than HTML5's, it would apply in the uses of media lists in HTML.)
Oh, and your test is actually about "(min-width:,all" (which has a colon in it).
Attached patch patchSplinter Review
There are two changes here:

 (1) accept EOF in addition to ')' to terminate a media query expression that can have no value

 (2) rather than just doing an ExpectSymbol(')') at the end, do a SkipUntil(')') if the next symbol isn't ')'.

It's the latter that fixes Anne's test, but I added tests for both (I think).
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
Attachment #337956 - Flags: superreview?(bzbarsky)
Attachment #337956 - Flags: review?(bzbarsky)
Attachment #337956 - Flags: superreview?(bzbarsky)
Attachment #337956 - Flags: superreview+
Attachment #337956 - Flags: review?(bzbarsky)
Attachment #337956 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/95f310fa27bb

->fixed
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
OS: Linux → All
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
Flags: blocking1.9.1? → blocking1.9.1+
pushed http://hg.mozilla.org/releases/mozilla-1.9.1/rev/95f310fa27bb

verified FIXED on builds:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090416 Minefield/3.6a1pre ID:20090416030845

and

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b4pre) Gecko/20090417 Shiretoko/3.5b4pre ID:20090417030722
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: