XMLSerializer corrupts namespace prefixes when XHTML namespace is used

RESOLVED FIXED

Status

()

defect
--
major
RESOLVED FIXED
15 years ago
15 years ago

People

(Reporter: bedney, Assigned: peterv)

Tracking

({fixed-aviary1.0, fixed1.7.5, regression})

Trunk
x86
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

Reporter

Description

15 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

The XMLSerializer corrupts namespace prefixes when the XHTML namespace is used.
Note that the DOM itself contains the correct namespace information (i.e. you
can poke around and get 'namespaceURI's and 'prefix's) but the serializer
corrupts the output.

Note that this did not occur in Mozilla 1.6 and earlier. This is a new bug for
Mozilla 1.7.

Reproducible: Always
Steps to Reproduce:
1.Run testcase
2.Note the errors in the testcase (its well documented)
3.

Actual Results:  
Got incorrect serialization results.

Expected Results:  
Correctly serialized the input.

Check the testcase. There's 4 separate testcases. The first 2 work, the last 2
don't. Note again that this is a Mozilla 1.7 issue.
Assignee

Comment 2

15 years ago
Jonas: shouldn't the GetNodeInfo call in nsGenericHTMLElement::SetAttrAndNotify
(http://lxr.mozilla.org/seamonkey/source/content/html/content/src/nsGenericHTMLElement.cpp#1664)
use aPrefix?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee

Comment 3

15 years ago
Posted patch v1 (obsolete) — Splinter Review
Assignee: hjtoi-bugzilla → peterv
Status: NEW → ASSIGNED
Assignee

Comment 4

15 years ago
Comment on attachment 151528 [details] [diff] [review]
v1

This seems like the right thing and it fixes the bug. I can't think of anything
that this could be breaking, you?
Attachment #151528 - Flags: review?(bugmail)
Comment on attachment 151528 [details] [diff] [review]
v1

I think there is some other bug filed on this issue, or at least it was talked
about in some other bug.
The same problem exists in XUL. r=me if you fix it there too.
Attachment #151528 - Flags: review?(bugmail) → review+
Comment on attachment 151528 [details] [diff] [review]
v1

sr=jst
Attachment #151528 - Flags: superreview+
Assignee

Comment 7

15 years ago
Note that we probably get the wrong attribute for the mutation events (see
http://bugzilla.mozilla.org/show_bug.cgi?id=232009#c4).

Updated

15 years ago
Blocks: 155723
Assignee

Comment 8

15 years ago
Attachment #151528 - Attachment is obsolete: true
Assignee

Comment 9

15 years ago
Comment on attachment 151669 [details] [diff] [review]
Patch that was checked in

Carrying forward r/sr and asking for branch approval: trivial fix so that
attributes in XHTML and XUL elements don't lose their prefix. Low-risk.
Attachment #151669 - Flags: superreview+
Attachment #151669 - Flags: review+
Attachment #151669 - Flags: approval1.7.1?
Comment on attachment 151669 [details] [diff] [review]
Patch that was checked in

a=mkaply for 1.7.1
Attachment #151669 - Flags: approval1.7.1? → approval1.7.1+
Assignee

Comment 11

15 years ago
Checked in to trunk and 1.7 branch.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: fixed1.7.1
Resolution: --- → FIXED
Whiteboard: needed-aviary1.0?

Comment 12

15 years ago
AVIARY_1_0_20040515_BRANCH does not checkin yet.
Fixed on the aviary branch now too.
Keywords: fixed-aviary1.0
Whiteboard: needed-aviary1.0?
Reporter

Comment 14

15 years ago
I have been remiss in thanking everyone involved, especially Peter, for fixing
this bug so quickly. This was a showstopper for my product under 1.7.

Thanks guys!

Cheers,

- Bill
You need to log in before you can comment on or make changes to this bug.