Why is the error reporting accumulating a second expectation?

RESOLVED FIXED

Status

()

Core
CSS Parsing and Computation
--
trivial
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: timeless, Assigned: mats)

Tracking

(Blocks: 1 bug, {testcase})

Trunk
testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
Error: Expected pseudo-element but found 'first-child'.  Expected ',' or '{' but
found 'first-child'.  Ruleset ignored due to bad selector.
Source File: data:text/html,<style>#test p::first-child {}</style>
Line: 1

<http://nemesis1.f2o.org/aarchive?id=6>
This is similar to bug 261291.  Here what happens is that ParseSelector() sees
the SELECTOR_PARSING_STOPPED_ERROR produced by ParsePseudoSelector() and returns
false to caller.  But that's all the info the caller gets.  So caller treats
this like any false return from ParseSelector, which simply indicates the end of
a selector (which may mean an error, or it may mean hitting a ',' or '{').

Perhaps we need to propagate more state out of ParseSelector to
ParseSelectorList?  It's silly to do more work if ParseSelector() encountered an
actual error as opposed to it just encountering a token it doesn't know what to
do with (like bug 261291).

David?  Thoughts?
Blocks: 261291
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
(Assignee)

Comment 2

13 years ago
With the fix for bug 265542, I get:

Error: Expected pseudo-element but found 'first-child'.  Ruleset ignored due to
bad selector.
Source File: data:text/html,<style>#test p::first-child {}</style>
Line: 1
Depends on: 265542
Keywords: testcase
(Assignee)

Updated

13 years ago
Assignee: dbaron → mats.palmgren
(Assignee)

Comment 3

13 years ago
Fixed by bug 265542
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.