Fallback to using the ID attribute when NAME is empty for XUL iframes. b=254284 r=neil.parkwaycc.co.uk sr=bzbarsky

This commit is contained in:
mats.palmgren@bredband.net
2004-10-01 18:32:18 +00:00
parent 69be1b62eb
commit dfa0582a6f

View File

@@ -438,6 +438,11 @@ nsFrameLoader::EnsureDocShell()
mOwnerContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::id, frameName);
} else {
mOwnerContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::name, frameName);
// XXX if no NAME then use ID, after a transition period this will be
// changed so that XUL only uses ID too (bug 254284).
if (frameName.IsEmpty() && ni && ni->NamespaceID() == kNameSpaceID_XUL) {
mOwnerContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::id, frameName);
}
}
if (!frameName.IsEmpty()) {