[tbb-commits] [tor-browser/tor-browser-31.5.0esr-4.5-1] Merge remote-tracking branch 'pc/bug13548-01' into tor-browser-31.5.0esr-4.5-1
gk at torproject.org
gk at torproject.org
Mon Mar 23 08:09:32 UTC 2015
commit 04e603a60a13aed5434a6d5450b432a8f5ab7c46
Merge: 709dd9e 5b48b32
Author: Georg Koppen <gk at torproject.org>
Date: Mon Mar 23 08:02:02 2015 +0000
Merge remote-tracking branch 'pc/bug13548-01' into tor-browser-31.5.0esr-4.5-1
content/base/public/nsNameSpaceManager.h | 11 +++++---
content/base/src/nsNameSpaceManager.cpp | 43 ++++++++++++++++++++++++++++--
2 files changed, 49 insertions(+), 5 deletions(-)
diff --cc content/base/src/nsNameSpaceManager.cpp
index 3f4f9f8,d2a9722..d81d8d8
--- a/content/base/src/nsNameSpaceManager.cpp
+++ b/content/base/src/nsNameSpaceManager.cpp
@@@ -152,9 -166,20 +167,20 @@@ NS_NewElement(Element** aResult
}
#endif
if (ns == kNameSpaceID_MathML) {
- return NS_NewMathMLElement(aResult, ni.forget());
+ // If the mathml.disabled pref. is true, convert all MathML nodes into
+ // generic XML nodes by swapping the namespace.
+ nsNameSpaceManager* nsmgr = nsNameSpaceManager::GetInstance();
+ if (nsmgr && !nsmgr->mIsMathMLDisabled) {
+ return NS_NewMathMLElement(aResult, ni.forget());
+ }
+
+ nsNodeInfoManager *niMgr = ni->NodeInfoManager();
+ nsCOMPtr<nsINodeInfo> genericXMLNI = niMgr->GetNodeInfo(ni->NameAtom(),
+ ni->GetPrefixAtom(), kNameSpaceID_XML,
+ ni->NodeType(), ni->GetExtraName());
+ return NS_NewXMLElement(aResult, genericXMLNI.forget());
}
- if (ns == kNameSpaceID_SVG) {
+ if (ns == kNameSpaceID_SVG && NS_SVGEnabled(ni->GetDocument())) {
return NS_NewSVGElement(aResult, ni.forget(), aFromParser);
}
if (ns == kNameSpaceID_XBL && ni->Equals(nsGkAtoms::children)) {
More information about the tbb-commits
mailing list