[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-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



commit 04e603a60a13aed5434a6d5450b432a8f5ab7c46
Merge: 709dd9e 5b48b32
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
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)) {



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits