mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-03 23:01:31 +00:00
Added a hack to use the tag's namespace as the default namespace in the lack of any other information. Not sure if this is correct.
This commit is contained in:
parent
4e6d046d98
commit
c7aaa78312
@ -1025,6 +1025,22 @@ XULContentSinkImpl::AddAttributes(const nsIParserNode& aNode,
|
||||
v = aNode.GetValueAt(i);
|
||||
nsRDFParserUtils::StripAndConvert(v);
|
||||
|
||||
#define USE_TAG_NAMESPACE_AS_DEFAULT_NAMESPACE
|
||||
#ifdef USE_TAG_NAMESPACE_AS_DEFAULT_NAMESPACE
|
||||
// XXX This is a hack that I'm not sure is legal: as a last
|
||||
// ditch effort, we treat attributes with an unknown (or no)
|
||||
// namespace as being in the same namespace as the tag itself.
|
||||
if ((nameSpaceID == kNameSpaceID_Unknown) ||
|
||||
(nameSpaceID == kNameSpaceID_None)) {
|
||||
nsAutoString tag = aNode.GetText();
|
||||
nsIAtom* prefix = CutNameSpacePrefix(tag);
|
||||
if (prefix) {
|
||||
nameSpaceID = GetNameSpaceID(prefix);
|
||||
NS_RELEASE(prefix);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Get the URI for the namespace, so we can construct a
|
||||
// fully-qualified property name.
|
||||
mNameSpaceManager->GetNameSpaceURI(nameSpaceID, k);
|
||||
|
Loading…
Reference in New Issue
Block a user