From 0f8172224f648c94a1058a695f3d661806946e6d Mon Sep 17 00:00:00 2001 From: Henri Sivonen Date: Fri, 20 Mar 2009 16:58:37 +0200 Subject: [PATCH] More comprehensive fix for HTML nodes in XHTML namespace (bug 468708) --- .../html/content/src/nsHTMLOptionElement.cpp | 2 +- .../html/content/src/nsHTMLStyleElement.cpp | 3 ++- .../content/src/nsHTMLTableRowElement.cpp | 2 +- .../src/nsHTMLFragmentContentSink.cpp | 10 ++++---- content/html/document/src/nsImageDocument.cpp | 2 +- content/html/document/src/nsMediaDocument.cpp | 6 ++--- content/html/document/src/nsVideoDocument.cpp | 2 +- content/xslt/src/xslt/txMozillaXMLOutput.cpp | 24 +++++++++---------- content/xslt/src/xslt/txMozillaXMLOutput.h | 2 +- content/xslt/src/xslt/txUnknownHandler.cpp | 2 +- layout/build/nsContentDLF.cpp | 6 ++--- layout/generic/nsObjectFrame.cpp | 18 ++++---------- layout/html/tests/TestAttributes.cpp | 2 +- layout/style/nsCSSRuleProcessor.cpp | 12 ++++------ 14 files changed, 40 insertions(+), 53 deletions(-) diff --git a/content/html/content/src/nsHTMLOptionElement.cpp b/content/html/content/src/nsHTMLOptionElement.cpp index 7b90633d748e..ddb7c92a4469 100644 --- a/content/html/content/src/nsHTMLOptionElement.cpp +++ b/content/html/content/src/nsHTMLOptionElement.cpp @@ -152,7 +152,7 @@ NS_NewHTMLOptionElement(nsINodeInfo *aNodeInfo, PRBool aFromParser) NS_ENSURE_TRUE(doc, nsnull); nodeInfo = doc->NodeInfoManager()->GetNodeInfo(nsGkAtoms::option, nsnull, - kNameSpaceID_None); + kNameSpaceID_XHTML); NS_ENSURE_TRUE(nodeInfo, nsnull); } diff --git a/content/html/content/src/nsHTMLStyleElement.cpp b/content/html/content/src/nsHTMLStyleElement.cpp index 8c624506962a..fd1b3bfab8d4 100644 --- a/content/html/content/src/nsHTMLStyleElement.cpp +++ b/content/html/content/src/nsHTMLStyleElement.cpp @@ -319,7 +319,8 @@ nsHTMLStyleElement::GetStyleSheetURL(PRBool* aIsInline, if (*aIsInline) { return; } - if (mNodeInfo->NamespaceEquals(kNameSpaceID_XHTML)) { + if (GetOwnerDoc() && // XXX clean up after bug 335998 lands + !(GetOwnerDoc()->IsCaseSensitive())) { // We stopped supporting