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

RESOLVED FIXED in mozilla1.6beta

Status

()

Core
CSS Parsing and Computation
P2
normal
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: Hixie (not reading bugmail), Assigned: bz)

Tracking

({css2})

Trunk
mozilla1.6beta
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

14 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

14 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

14 years ago
Well, where's the combinator?

Comment 4

14 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

14 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.
Created attachment 134738 [details] [diff] [review]
Proposed patch
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)
Attachment #134738 - Flags: superreview?(dbaron)
Attachment #134738 - Flags: superreview+
Attachment #134738 - Flags: review?(dbaron)
Attachment #134738 - Flags: review+
(Reporter)

Comment 8

14 years ago
Ah yes, that rings a bell. The CSS2 prose and syntax contradicted themselves, IIRC.
taking.
Assignee: dbaron → bz-vacation
OS: Windows 2000 → All
Priority: -- → P2
Hardware: PC → All
Target Milestone: --- → mozilla1.6beta
checked in.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.