Closed Bug 72302 Opened 23 years ago Closed 23 years ago

Default namespace in <html:style> is HTML by default [NAMESPACE]

Categories

(Core :: CSS Parsing and Computation, defect, P3)

x86
Windows 2000
defect

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: ian, Assigned: glazou)

References

()

Details

(Keywords: css3, testcase, Whiteboard: [Hixie-P1] (the other last remaining namespaces-in-css bug ;-) ))

Attachments

(1 file)

This broke out of bug 71647.

STEPS TO REPRODUCE
   Build a stylesheet that defines some namespaces, but no default namespace,
   for example:
      @namespace html url(http://www.w3.org/1999/xhtml);
      @namespace test url(http://www.example.org/);
      test { color: green; }

ACTUAL RESULTS
   Our CSS parser generates the following type element selector:
      mTag          "testA"
      mNameSpace    0x00000003  (kNameSpaceID_HTML)
   ...so in fact the sheet above is actually stored as:
      @namespace html url(http://www.w3.org/1999/xhtml);
      @namespace test url(http://www.example.org/);
      html|testA  { color: green; }

EXPECTED RESULTS
   Without a default namespace declaration in CSS, "test" should be interpreted 
   as "*|test".

See: http://www.hixie.ch/tests/adhoc/css/selectors/namespace/002.xml
Blocks: 71647
Whiteboard: [Hixie-P1] (the other last remaining namespaces-in-css bug ;-) )
Well well. Good catch Daniel.

As can be seen from:
   http://www.hixie.ch/tests/adhoc/css/selectors/namespace/003.xml
...the problem is actually a little different. We seem to be saying that the
<html:style> element sets a default namespace! This is wrong.
Summary: first @namespace rule automatically sets default namespace [NAMESPACE] → Default namespace in <html:style> is HTML by default [NAMESPACE]
mozilla0.9/P3
Priority: -- → P3
Target Milestone: --- → mozilla0.9
Proposing fix for this bug. Ian's test goes green with it.

(s)reviews needed, in particular for possible (?) side effects of the proposed
modifications.

Ian, can you please torture it a little bit ? thanks.
[s]r=attinasi on the patch.  Seems like it was a bit presumptuous to assume the
HTML namespace in the first place, so any regressions should be fixed at the
regression site rather than by backing this out.
r=peterv.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
checked in ; Ian's tests about namespaces become green.

http://www.hixie.ch/tests/adhoc/css/selectors/namespace/
verified per 003 and 002.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: