Closed Bug 256165 Opened 21 years ago Closed 21 years ago

xmlns attribute on XUL elements doesn't have xmlns namespace

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8alpha4

People

(Reporter: steve.swanson, Assigned: bzbarsky)

Details

Attachments

(2 files)

Attributes of the form xmlns= and xmlns:prefix= should have http://www.w3.org/ 2000/xmlns/ as their namespaceURI. In XUL, the prefix type do, but the non- prefixed ones don't. See the testcase. This might be related to bug 75870. This issue came up in my patch for bug 133827 where I had to hack around the missing namespaceID on the xmlns attribute on XUL elements. Most likely, this is a problem in XULContentSinkImpl::NormalizeAttributeString (), http://lxr.mozilla.org/seamonkey/source/content/xul/document/src/nsXULContentSi nk.cpp#693
Attached file testcase
click the button, see the attributes and corresponding namespaceURI
Attachment #156517 - Attachment mime type: text/xml → application/vnd.mozilla.xul+xml
Comment on attachment 158841 [details] [diff] [review] Sync up XUL content sink to what XML does This makes XUL do the same thing that XML does (in AddAttributes in the XML sink) for the "xmlns" attribute.
Attachment #158841 - Flags: superreview?(jst)
Attachment #158841 - Flags: review?(peterv)
Comment on attachment 158841 [details] [diff] [review] Sync up XUL content sink to what XML does sr=jst
Attachment #158841 - Flags: superreview?(jst) → superreview+
Comment on attachment 158841 [details] [diff] [review] Sync up XUL content sink to what XML does >Index: content/xul/document/src/nsXULContentSink.cpp >=================================================================== >+ } else { >+ if (nameAtom == nsLayoutAtoms::xmlnsNameSpace) { >+ nameSpaceID = kNameSpaceID_XMLNS; >+ } >+ // else use kNameSpaceID_None > } I'd just make that an else if (...) { and move the comment one line down.
Attachment #158841 - Flags: review?(peterv) → review+
Assignee: nobody → bzbarsky
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → mozilla1.8alpha4
Fixed for 1.8a4.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: