[FIX]FF 1.5 doesn't apply CSS stylesheets in document after XSLT transformation

RESOLVED FIXED in mozilla1.9alpha1

Status

()

Core
XSLT
P1
normal
RESOLVED FIXED
12 years ago
11 years ago

People

(Reporter: Pavel Franc - Mozilla.cz, Assigned: bz)

Tracking

(4 keywords)

Trunk
mozilla1.9alpha1
fixed1.8.1, regression, testcase, verified1.8.0.2
Points:
---
Bug Flags:
blocking1.8.0.2 +
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [rft-dl])

Attachments

(4 attachments)

(Reporter)

Description

12 years ago
FF 1.5 doesn't apply CSS rules with selector in uppercase in document after XSLT transformation with the output set to html.
(Reporter)

Comment 1

12 years ago
Created attachment 207601 [details]
Testcase

Comment 2

12 years ago
Created attachment 207603 [details]
result of the above as HTML

For reference, this is the output of the transform, as html.
As result of the testcase of comment #1 the culprit must be in this list:

http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=PhoenixTinderbox&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-04-18+08%3A00%3A00&maxdate=2005-04-19+06%3A00%3A00&cvsroot=%2Fcvsroot

Comment 4

12 years ago
Ria, could you explain that with a bit more detail? Did you test nightlies between
1.7 and 1.8?
Yes, that's what she did.
From that regression range, I would think this could be a regression from bug 290068.
Keywords: regression, testcase

Comment 6

12 years ago
Seems like we're setting case sensitivity eagerly, too.
So we call SetCaseSensitive() in the nsDocument Init() (and at this point we're assuming case-sensitive).  Then we reset it once we know whether we're HTML or XHTML, which is in nsHTMLDocument::StartDocumentLoad().  Of course XSLT doesn't call StartDocumentLoad(), right?

So how does XSLT actually create the document?  How is the document supposed to know it's an HTML document and not an XHTML one?
OK, I see what's up.  The document is created via createInstance, which never initializes the mDefaultNamespaceID member of HTMLDocument.  That means the zeroing allocator sets it to 0, which happens to be kNamespaceID_None.  We should probably fix this part.

But anyway, it looks like creating by contract id gives us an HTML document, not an XHTML one.  So we should probably override Init() in nsHTMLDocument to call the superclass Init() and then reset the case-sensitivity as needed...
Created attachment 207628 [details] [diff] [review]
Fix
Assignee: xslt → bzbarsky
Status: NEW → ASSIGNED
Attachment #207628 - Flags: superreview?(jst)
Attachment #207628 - Flags: review?(jst)
OS: Windows 2000 → All
Priority: -- → P1
Hardware: PC → All
Summary: FF 1.5 doesn't apply CSS stylesheets in document after XSLT transformation → [FIX]FF 1.5 doesn't apply CSS stylesheets in document after XSLT transformation
Target Milestone: --- → mozilla1.9alpha
Version: 1.8 Branch → Trunk
Why bother setting mDefaultNamespace to kNameSpaceID_None (== 0)?

This is a pretty bad regression (one that we should test for when we get automated tests), would be good to get this on the branches.
> Why bother setting mDefaultNamespace to kNameSpaceID_None (== 0)?

Because I think depending on kNameSpaceID_None == 0 is a bad idea.
Good point
Comment on attachment 207628 [details] [diff] [review]
Fix

r+sr=jst
Attachment #207628 - Flags: superreview?(jst)
Attachment #207628 - Flags: superreview+
Attachment #207628 - Flags: review?(jst)
Attachment #207628 - Flags: review+
Comment on attachment 207628 [details] [diff] [review]
Fix

This is probably serious enough a regression to be worth considering for 1.8.0.x.  I definitely think we should take this for 1.8.1.

The patch is very very safe.  Only cases where the document is not actually being loaded (like XSLT) are affected.
Attachment #207628 - Flags: approval1.8.1?
Attachment #207628 - Flags: approval1.8.0.1?
how will this affect things like document.implementation.createDocument? I guess not very much since such documents are never styled?
Fixed on trunk.

Sicking, createDocument creates the same thing after this patch as it always did.  But yes, those documents are never styled, at the moment.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED

Comment 17

12 years ago
createDocument only creates XML documents anyway.
Comment on attachment 207628 [details] [diff] [review]
Fix

This has come in too late for 1.8.0.1 (no trunk-baking time) but we'll consider for 1.8.0.2
Attachment #207628 - Flags: approval1.8.1?
Attachment #207628 - Flags: approval1.8.1+
Attachment #207628 - Flags: approval1.8.0.2?
Attachment #207628 - Flags: approval1.8.0.1?
Attachment #207628 - Flags: approval1.8.0.1-
Created attachment 208126 [details] [diff] [review]
Patch merged to 1.8.x branch
Fixed on the 1.8 branch.
Keywords: fixed1.8.1
Target Milestone: mozilla1.9alpha → mozilla1.8.1
Flags: blocking1.8.0.2+
Attachment #207628 - Flags: approval1.8.0.2?
Comment on attachment 208126 [details] [diff] [review]
Patch merged to 1.8.x branch

approved for 1.8.0 branch, a=dveditz
Attachment #208126 - Flags: approval1.8.0.2+
Fixed for 1.8.0.2
Keywords: fixed1.8.0.2
Marking [rft-dl] (ready for testing in Firefox 1.5.0.2 release candidates)
Whiteboard: [rft-dl]

Comment 24

12 years ago
v.fixed on 1.8.0 branch with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2, I see green.
Keywords: fixed1.8.0.2 → verified1.8.0.2
*** Bug 315380 has been marked as a duplicate of this bug. ***
*** Bug 327902 has been marked as a duplicate of this bug. ***
*** Bug 340980 has been marked as a duplicate of this bug. ***
Target Milestone: mozilla1.8.1 → mozilla1.9alpha
Added to reftest.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.