зеркало из https://github.com/mozilla/pjs.git
Use the ID attribute (and not NAME) for FRAME/IFRAME/OBJECT in XHTML. b=183683 r+sr=bzbarsky
This commit is contained in:
Родитель
b13ea1498b
Коммит
7dc10bb4c9
|
@ -430,7 +430,15 @@ nsFrameLoader::EnsureDocShell()
|
|||
nsCOMPtr<nsIDocShellTreeItem> docShellAsItem(do_QueryInterface(mDocShell));
|
||||
NS_ENSURE_TRUE(docShellAsItem, NS_ERROR_FAILURE);
|
||||
nsAutoString frameName;
|
||||
mOwnerContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::name, frameName);
|
||||
|
||||
// Don't use mOwnerContent->GetNameSpaceID() here since it returns
|
||||
// kNameSpaceID_XHTML for both HTML and XHTML, see bug 183683.
|
||||
nsINodeInfo* ni = mOwnerContent->GetNodeInfo();
|
||||
if (ni && ni->NamespaceID() == kNameSpaceID_XHTML) {
|
||||
mOwnerContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::id, frameName);
|
||||
} else {
|
||||
mOwnerContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::name, frameName);
|
||||
}
|
||||
|
||||
if (!frameName.IsEmpty()) {
|
||||
docShellAsItem->SetName(frameName.get());
|
||||
|
|
Загрузка…
Ссылка в новой задаче