Closed Bug 261143 Opened 20 years ago Closed 20 years ago

Why is the error reporting accumulating a second expectation?

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: MatsPalmgren_bugz)

References

(Blocks 1 open bug, )

Details

(Keywords: testcase)

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
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: dbaron → mats.palmgren
Fixed by bug 265542
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.