[FIX]universal selector * is not prepended to pseudo elements

RESOLVED FIXED in mozilla1.8alpha1

Status

()

Core
DOM: CSS Object Model
P3
normal
RESOLVED FIXED
16 years ago
14 years ago

People

(Reporter: Vladimir Ermakov, Assigned: bz)

Tracking

Trunk
mozilla1.8alpha1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

16 years ago
universal selector * is appended to pseudo classes but not to pseudo elements.
See the testcase.
(Reporter)

Comment 1

16 years ago
Created attachment 102370 [details]
testcase
.
Assignee: jst → bzbarsky
Summary: universal selector * is not appended to pseudo elements → universal selector * is not appended to pseudo elements
So glazou, right now we do not prepend the "*" in the following situations:

1)  we have a tag name (including a pseudo-tag)
2)  we have a class name
3)  we have an ID

It almost seems like we may want to prepend it in all situations when we don't
have a non-pseudo tag name.  Thoghts?
OS: Windows 2000 → All
Hardware: PC → All
Whiteboard: Need to decide on something here
Excerpt from Selectors CR (http://www.w3.org/TR/css3-selectors)

   Note: it is recommended that the *, representing the universal selector, not be
         omitted.
OK.  should we also do the "all namespace" thing too? So ".foo" would turn into
"*|*.foo" ?
Beuuuuuhhhh. Hmmm. No. In case of an author stylesheet attached to an HTML
document only, the author does not want to see a namespace prefix, even if it's
perfectly legal...
The perfect solution would be the following one from my perspective :

  1. if no namespace is defined in the sheet, don't do the *| part
  2. if a default namespace is defined, don't do the *| part
  3. in other cases, do the *| part

I don't say it's easily feasible. I say it my best choice. Opinions ?
Priority: -- → P4
Target Milestone: --- → Future
Sorry for the spam, but I was all set to write up a discussion of why this was
wrong when I realized the subject was misleading.  So I'm fixing it.
Summary: universal selector * is not appended to pseudo elements → universal selector * is not prepended to pseudo elements
Created attachment 148007 [details]
More extensive testcase

This tests 4 sheets with slightly different @namespace rule combinations.
Created attachment 148008 [details] [diff] [review]
Patch to fix this

This fixes a bug with "|foo" selectors and some other namespace bugs, in
addition to this bug.
Priority: P5 → P3
Summary: universal selector * is not prepended to pseudo elements → [FIX]universal selector * is not prepended to pseudo elements
Whiteboard: Need to decide on something here
Target Milestone: Future → mozilla1.8alpha
Comment on attachment 148008 [details] [diff] [review]
Patch to fix this

Marking Daniel's review.

roc, could you sr?
Attachment #148008 - Flags: superreview?
Attachment #148008 - Flags: review?(daniel)
Attachment #148008 - Flags: review+
Comment on attachment 148008 [details] [diff] [review]
Patch to fix this

Er, even type roc's address... )
Attachment #148008 - Flags: superreview? → superreview?(roc)
Attachment #148008 - Flags: superreview?(roc) → superreview+
Fixed.
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.