selector html* parsed as html * (universal selector implies combinator)

RESOLVED FIXED in mozilla1.6beta

Status

()

P2
normal
RESOLVED FIXED
15 years ago
15 years ago

People

(Reporter: ian, Assigned: bzbarsky)

Tracking

({css2})

Trunk
mozilla1.6beta
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
The following CSS:

   html* { color: red; }

...is not ignored. It should be. Those two type selectors have no combinator 
between them. See data: testcase in URL.
(Reporter)

Comment 1

15 years ago
(broke out of opera bug 130146 -- opera used to have this bug too but recently 
fixed it)
Um, this used to be correct, and http://dbaron.org/css/test/univsel tests for
it.  Did the spec change, or are we now considering 5.5 to override the grammar
rather than the other way around?
(Reporter)

Comment 3

15 years ago
Well, where's the combinator?

Comment 4

15 years ago
I propose invalid, based on CSS2.1
<http://www.w3.org/TR/CSS21/selector.html#descendant-selectors>:

>matches a P element that is a grandchild or later descendant of a DIV element.
>Note the whitespace on either side of the "*" is not part of the universal
>selector; the whitespace is the descendant selector indicating that the DIV must
>be the ancestor of some element, and that that element must be an ancestor of the
>P.

Comment 5

15 years ago
Oops, it is _correct_ based on CSS2.1. I think I mixed my comment up with the
things said in comment 2, sorry.
(Assignee)

Comment 6

15 years ago
Created attachment 134738 [details] [diff] [review]
Proposed patch
(Assignee)

Comment 7

15 years ago
Comment on attachment 134738 [details] [diff] [review]
Proposed patch

As far as I can tell, both 5.5 and the CSS2.1 grammar agree with hixie here...

Note that the CSS2 grammar does NOT agree with either 5.5, Hixie, or the CSS2.1
grammar.  In CSS2, we have:

combinator
  : '+' S* | '>' S* | /* empty */
  ;

while in CSS2.1 we have:

combinator
  : PLUS S*
  | GREATER S*
  | S+
  ;

So in fact it looks like the spec changed...
Attachment #134738 - Flags: superreview?(dbaron)
Attachment #134738 - Flags: review?(dbaron)
(Reporter)

Comment 8

15 years ago
Ah yes, that rings a bell. The CSS2 prose and syntax contradicted themselves, IIRC.
(Assignee)

Comment 9

15 years ago
taking.
Assignee: dbaron → bz-vacation
OS: Windows 2000 → All
Priority: -- → P2
Hardware: PC → All
Target Milestone: --- → mozilla1.6beta
(Assignee)

Comment 10

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