Bug 699041 - Remove MBool / MB_TRUE / MB_FALSE; f=Ms2ger r=sicking
authorAbhishek Singh <abhishekkumarsingh.cse@gmail.com>
Thu, 10 Nov 2011 20:26:13 +0100
changeset 80145 33d34da275ed942822531afb7b3739579dfb67a5
parent 80144 57aea6749943167710d4bfff28822db0a8989d7c
child 80146 6da51a2cebb0177a3e7efb0c0ee58d0aaeb30ebe
push idunknown
push userunknown
push dateunknown
reviewerssicking
bugs699041
milestone11.0a1
Bug 699041 - Remove MBool / MB_TRUE / MB_FALSE; f=Ms2ger r=sicking
content/xslt/src/base/txCore.h
content/xslt/src/base/txDouble.cpp
content/xslt/src/base/txExpandedNameMap.h
content/xslt/src/base/txList.cpp
content/xslt/src/base/txList.h
content/xslt/src/xml/txDOM.h
content/xslt/src/xml/txXMLUtils.cpp
content/xslt/src/xml/txXMLUtils.h
content/xslt/src/xpath/nsXPathExpression.cpp
content/xslt/src/xpath/txBooleanResult.cpp
content/xslt/src/xpath/txCoreFunctionCall.cpp
content/xslt/src/xpath/txExprParser.cpp
content/xslt/src/xpath/txExprParser.h
content/xslt/src/xpath/txExprResult.h
content/xslt/src/xpath/txForwardContext.cpp
content/xslt/src/xpath/txIXPathContext.h
content/xslt/src/xpath/txNameTest.cpp
content/xslt/src/xpath/txNodeSetContext.cpp
content/xslt/src/xpath/txNodeSetContext.h
content/xslt/src/xpath/txNumberResult.cpp
content/xslt/src/xpath/txPathExpr.cpp
content/xslt/src/xpath/txSingleNodeContext.h
content/xslt/src/xpath/txStringResult.cpp
content/xslt/src/xslt/txDocumentFunctionCall.cpp
content/xslt/src/xslt/txFormatNumberFunctionCall.cpp
content/xslt/src/xslt/txNodeSorter.cpp
content/xslt/src/xslt/txPatternParser.cpp
content/xslt/src/xslt/txStylesheet.h
content/xslt/src/xslt/txStylesheetCompileHandlers.cpp
content/xslt/src/xslt/txStylesheetCompileHandlers.h
content/xslt/src/xslt/txStylesheetCompiler.cpp
content/xslt/src/xslt/txTextHandler.cpp
content/xslt/src/xslt/txTextHandler.h
content/xslt/src/xslt/txXPathResultComparator.cpp
content/xslt/src/xslt/txXPathResultComparator.h
content/xslt/src/xslt/txXSLTFunctions.h
content/xslt/src/xslt/txXSLTNumber.cpp
content/xslt/src/xslt/txXSLTNumber.h
content/xslt/src/xslt/txXSLTNumberCounters.cpp
content/xslt/src/xslt/txXSLTPatterns.cpp
content/xslt/src/xslt/txXSLTPatterns.h
content/xslt/src/xslt/txXSLTProcessor.cpp
content/xslt/src/xslt/txXSLTProcessor.h
--- a/content/xslt/src/base/txCore.h
+++ b/content/xslt/src/base/txCore.h
@@ -104,15 +104,12 @@ public:
      * represent a double, NaN will be returned.
      */
     static double toDouble(const nsAString& aStr);
 };
 
 // XXX These should go away eventually.
 #define TxObject txObject
 typedef txDouble Double;
-typedef bool MBool;
 
-#define MB_TRUE  true
-#define MB_FALSE false
 // XXX
 
 #endif
--- a/content/xslt/src/base/txDouble.cpp
+++ b/content/xslt/src/base/txDouble.cpp
@@ -58,34 +58,34 @@ const dpun Double::NEGATIVE_INFINITY = {
 const dpun Double::POSITIVE_INFINITY = {{0, DOUBLE_HI32_EXPMASK}};
 const dpun Double::NEGATIVE_INFINITY = {{0, DOUBLE_HI32_EXPMASK | DOUBLE_HI32_SIGNBIT}};
 #endif
 
 /*
  * Determines whether the given double represents positive or negative
  * inifinity
  */
-MBool Double::isInfinite(double aDbl)
+bool Double::isInfinite(double aDbl)
 {
     return ((DOUBLE_HI32(aDbl) & ~DOUBLE_HI32_SIGNBIT) == DOUBLE_HI32_EXPMASK &&
             !DOUBLE_LO32(aDbl));
 }
 
 /*
  * Determines whether the given double is NaN
  */
-MBool Double::isNaN(double aDbl)
+bool Double::isNaN(double aDbl)
 {
     return DOUBLE_IS_NaN(aDbl);
 }
 
 /*
  * Determines whether the given double is negative
  */
-MBool Double::isNeg(double aDbl)
+bool Double::isNeg(double aDbl)
 {
     return (DOUBLE_HI32(aDbl) & DOUBLE_HI32_SIGNBIT) != 0;
 }
 
 /*
  * Converts the given String to a double, if the String value does not
  * represent a double, NaN will be returned
  */
--- a/content/xslt/src/base/txExpandedNameMap.h
+++ b/content/xslt/src/base/txExpandedNameMap.h
@@ -90,17 +90,17 @@ protected:
     class iterator_base {
     public:
         iterator_base(txExpandedNameMap_base& aMap)
             : mMap(aMap),
               mCurrentPos(PRUint32(-1))
         {
         }
 
-        MBool next()
+        bool next()
         {
             return ++mCurrentPos < mMap.mItems.Length();
         }
 
         const txExpandedName key()
         {
             NS_ASSERTION(mCurrentPos >= 0 &&
                          mCurrentPos < mMap.mItems.Length(),
--- a/content/xslt/src/base/txList.cpp
+++ b/content/xslt/src/base/txList.cpp
@@ -238,17 +238,17 @@ void txList::clear()
 
 /**
  * Creates a new txListIterator for the given txList
  * @param list, the txList to create an Iterator for
 **/
 txListIterator::txListIterator(txList* list) {
    this->list   = list;
    currentItem  = 0;
-   atEndOfList  = MB_FALSE;
+   atEndOfList  = false;
 } //-- txListIterator
 
 /**
  * Adds the Object pointer to the txList pointed to by this txListIterator.
  * The Object pointer is inserted as the next item in the txList
  * based on the current position within the txList
  * @param objPtr the Object pointer to add to the list
 **/
@@ -271,36 +271,36 @@ nsresult txListIterator::addBefore(void*
     if (currentItem || atEndOfList)
         return list->insertBefore(objPtr, currentItem);
     return list->insertAfter(objPtr, 0);
 
 } //-- addBefore
 
 /**
  * Returns true if a successful call to the next() method can be made
- * @return MB_TRUE if a successful call to the next() method can be made,
- * otherwise MB_FALSE
+ * @return true if a successful call to the next() method can be made,
+ * otherwise false
 **/
-MBool txListIterator::hasNext() {
-    MBool hasNext = MB_FALSE;
+bool txListIterator::hasNext() {
+    bool hasNext = false;
     if (currentItem)
         hasNext = (currentItem->nextItem != 0);
     else if (!atEndOfList)
         hasNext = (list->firstItem != 0);
 
     return hasNext;
 } //-- hasNext
 
 /**
  * Returns true if a successful call to the previous() method can be made
- * @return MB_TRUE if a successful call to the previous() method can be made,
- * otherwise MB_FALSE
+ * @return true if a successful call to the previous() method can be made,
+ * otherwise false
 **/
-MBool txListIterator::hasPrevious() {
-    MBool hasPrevious = MB_FALSE;
+bool txListIterator::hasPrevious() {
+    bool hasPrevious = false;
     if (currentItem)
         hasPrevious = (currentItem->prevItem != 0);
     else if (atEndOfList)
         hasPrevious = (list->lastItem != 0);
 
     return hasPrevious;
 } //-- hasPrevious
 
@@ -313,17 +313,17 @@ void* txListIterator::next() {
     if (currentItem)
         currentItem = currentItem->nextItem;
     else if (!atEndOfList)
         currentItem = list->firstItem;
 
     if (currentItem)
         obj = currentItem->objPtr;
     else
-        atEndOfList = MB_TRUE;
+        atEndOfList = true;
 
     return obj;
 } //-- next
 
 /**
  * Returns the previous Object in the list
 **/
 void* txListIterator::previous() {
@@ -333,17 +333,17 @@ void* txListIterator::previous() {
     if (currentItem)
         currentItem = currentItem->prevItem;
     else if (atEndOfList)
         currentItem = list->lastItem;
     
     if (currentItem)
         obj = currentItem->objPtr;
 
-    atEndOfList = MB_FALSE;
+    atEndOfList = false;
 
     return obj;
 } //-- previous
 
 /**
  * Returns the current Object
 **/
 void* txListIterator::current() {
@@ -374,17 +374,17 @@ void* txListIterator::advance(int i) {
     else if (i < 0) {
         if (!currentItem && atEndOfList) {
             currentItem = list->lastItem;
             ++i;
         }
         for (; currentItem && i < 0; i++)
             currentItem = currentItem->prevItem;
 
-        atEndOfList = MB_FALSE;
+        atEndOfList = false;
     }
 
     if (currentItem)
         obj = currentItem->objPtr;
 
     return obj;
 } //-- advance
 
@@ -404,19 +404,19 @@ void* txListIterator::remove() {
     }
     return obj;
 } //-- remove
 
 /**
  * Resets the current location within the txList to the beginning of the txList
 **/
 void txListIterator::reset() {
-   atEndOfList = MB_FALSE;
+   atEndOfList = false;
    currentItem = 0;
 } //-- reset
 
 /**
  * Move the iterator to right after the last element
 **/
 void txListIterator::resetToEnd() {
-   atEndOfList = MB_TRUE;
+   atEndOfList = true;
    currentItem = 0;
 } //-- moveToEnd
--- a/content/xslt/src/base/txList.h
+++ b/content/xslt/src/base/txList.h
@@ -156,27 +156,27 @@ public:
      * The Object pointer is inserted as the previous item in the txList
      * based on the current position within the txList
      * @param objPtr the Object pointer to add to the list
     **/
     nsresult addBefore(void* objPtr);
 
     /**
      * Returns true if a successful call to the next() method can be made
-     * @return MB_TRUE if a successful call to the next() method can be made,
-     * otherwise MB_FALSE
+     * @return true if a successful call to the next() method can be made,
+     * otherwise false
     **/
-    MBool  hasNext();
+    bool  hasNext();
 
     /**
      * Returns true if a successful call to the previous() method can be made
-     * @return MB_TRUE if a successful call to the previous() method can be made,
-     * otherwise MB_FALSE
+     * @return true if a successful call to the previous() method can be made,
+     * otherwise false
     **/
-    MBool  hasPrevious();
+    bool  hasPrevious();
 
     /**
      * Returns the next Object pointer from the list
     **/
     void* next();
 
     /**
      * Returns the previous Object pointer from the list
@@ -213,14 +213,14 @@ private:
 
    //-- points to the current list item
    txList::ListItem* currentItem;
 
    //-- points to the list to iterator over
    txList* list;
 
    //-- we've moved off the end of the list
-   MBool atEndOfList;
+   bool atEndOfList;
 };
 
 typedef txList List;
 
 #endif
--- a/content/xslt/src/xml/txDOM.h
+++ b/content/xslt/src/xml/txDOM.h
@@ -111,26 +111,26 @@ class Node : public TxObject
     virtual Node* getLastChild() const = 0;
     virtual Node* getPreviousSibling() const = 0;
     virtual Node* getNextSibling() const = 0;
     virtual Document* getOwnerDocument() const = 0;
 
     //Node manipulation functions
     virtual Node* appendChild(Node* newChild) = 0;
 
-    virtual MBool hasChildNodes() const = 0;
+    virtual bool hasChildNodes() const = 0;
     
     //From DOM3 26-Jan-2001 WD
     virtual nsresult getBaseURI(nsAString& aURI) = 0;
 
     //Introduced in DOM2
     virtual nsresult getNamespaceURI(nsAString& aNSURI) = 0;
 
     //txXPathNode functions
-    virtual MBool getLocalName(nsIAtom** aLocalName) = 0;
+    virtual bool getLocalName(nsIAtom** aLocalName) = 0;
     virtual PRInt32 getNamespaceID() = 0;
     virtual Node* getXPathParent() = 0;
     virtual PRInt32 compareDocumentPosition(Node* aOther) = 0;
 };
 
 //
 // Definition and Implementation of Node and NodeList functionality.  This is
 // the central class, from which all other DOM classes (objects) are derrived.
@@ -151,26 +151,26 @@ class NodeDefinition : public Node
     Node* getLastChild() const;
     Node* getPreviousSibling() const;
     Node* getNextSibling() const;
     Document* getOwnerDocument() const;
 
     //Child node manipulation functions
     virtual Node* appendChild(Node* newChild);
 
-    MBool hasChildNodes() const;
+    bool hasChildNodes() const;
     
     //From DOM3 26-Jan-2001 WD
     virtual nsresult getBaseURI(nsAString& aURI);
 
     //Introduced in DOM2
     nsresult getNamespaceURI(nsAString& aNSURI);
 
     //txXPathNode functions
-    virtual MBool getLocalName(nsIAtom** aLocalName);
+    virtual bool getLocalName(nsIAtom** aLocalName);
     virtual PRInt32 getNamespaceID();
     virtual Node* getXPathParent();
     virtual PRInt32 compareDocumentPosition(Node* aOther);
 
     //Only to be used from XMLParser
     void appendData(const PRUnichar* aData, int aLength)
     {
       nodeValue.Append(aData, aLength);
@@ -294,20 +294,20 @@ class Element : public NodeDefinition
     nsresult appendAttributeNS(nsIAtom *aPrefix, nsIAtom *aLocalName,
                                PRInt32 aNamespaceID, const nsAString& aValue);
 
     // Node manipulation functions
     Node* appendChild(Node* newChild);
 
     //txXPathNode functions override
     nsresult getNodeName(nsAString& aName) const;
-    MBool getLocalName(nsIAtom** aLocalName);
+    bool getLocalName(nsIAtom** aLocalName);
     PRInt32 getNamespaceID();
-    MBool getAttr(nsIAtom* aLocalName, PRInt32 aNSID, nsAString& aValue);
-    MBool hasAttr(nsIAtom* aLocalName, PRInt32 aNSID);
+    bool getAttr(nsIAtom* aLocalName, PRInt32 aNSID, nsAString& aValue);
+    bool hasAttr(nsIAtom* aLocalName, PRInt32 aNSID);
 
     // ID getter
     bool getIDValue(nsAString& aValue);
 
     Attr *getFirstAttribute()
     {
       return mFirstAttribute;
     }
@@ -332,17 +332,17 @@ class Element : public NodeDefinition
 //
 class Attr : public NodeDefinition
 {
   public:
     Node* appendChild(Node* newChild);
 
     //txXPathNode functions override
     nsresult getNodeName(nsAString& aName) const;
-    MBool getLocalName(nsIAtom** aLocalName);
+    bool getLocalName(nsIAtom** aLocalName);
     PRInt32 getNamespaceID();
     Node* getXPathParent();
     bool equals(nsIAtom *aLocalName, PRInt32 aNamespaceID)
     {
       return mLocalName == aLocalName && aNamespaceID == mNamespaceID;
     }
     Attr *getNextAttribute()
     {
@@ -368,17 +368,17 @@ class Attr : public NodeDefinition
 //  inherrited from NodeDefinition.
 //  The Data of a processing instruction is stored in the nodeValue datamember
 //  inherrited from NodeDefinition
 //
 class ProcessingInstruction : public NodeDefinition
 {
   public:
     //txXPathNode functions override
-    MBool getLocalName(nsIAtom** aLocalName);
+    bool getLocalName(nsIAtom** aLocalName);
 
   private:
     friend class Document;
     ProcessingInstruction(nsIAtom *theTarget, const nsAString& theData,
                           Document* owner);
 };
 
 class txStandaloneNamespaceManager
@@ -410,40 +410,40 @@ public:
             aID > mNamespaces->Count()) {
             return NS_OK;
         }
 
         aNSURI = *mNamespaces->StringAt(aID - 1);
         return NS_OK;
     }
 
-    static MBool init()
+    static bool init()
     {
         NS_ASSERTION(!mNamespaces,
                      "called without matching shutdown()");
         if (mNamespaces)
-            return MB_TRUE;
+            return true;
         mNamespaces = new nsStringArray();
         if (!mNamespaces)
-            return MB_FALSE;
+            return false;
         /*
          * Hardwiring some Namespace IDs.
          * no Namespace is 0
          * xmlns prefix is 1, mapped to http://www.w3.org/2000/xmlns/
          * xml prefix is 2, mapped to http://www.w3.org/XML/1998/namespace
          */
         if (!mNamespaces->AppendString(NS_LITERAL_STRING("http://www.w3.org/2000/xmlns/")) ||
             !mNamespaces->AppendString(NS_LITERAL_STRING("http://www.w3.org/XML/1998/namespace")) ||
             !mNamespaces->AppendString(NS_LITERAL_STRING("http://www.w3.org/1999/XSL/Transform"))) {
             delete mNamespaces;
             mNamespaces = 0;
-            return MB_FALSE;
+            return false;
         }
 
-        return MB_TRUE;
+        return true;
     }
 
     static void shutdown()
     {
         NS_ASSERTION(mNamespaces, "called without matching init()");
         if (!mNamespaces)
             return;
         delete mNamespaces;
--- a/content/xslt/src/xml/txXMLUtils.cpp
+++ b/content/xslt/src/xml/txXMLUtils.cpp
@@ -46,17 +46,17 @@
 #include "nsReadableUtils.h"
 #include "nsGkAtoms.h"
 #include "txStringUtils.h"
 #include "txNamespaceMap.h"
 #include "txXPathTreeWalker.h"
 
 nsresult
 txExpandedName::init(const nsAString& aQName, txNamespaceMap* aResolver,
-                     MBool aUseDefault)
+                     bool aUseDefault)
 {
     const nsAFlatString& qName = PromiseFlatString(aQName);
     const PRUnichar* colon;
     bool valid = XMLUtils::isValidQName(qName, &colon);
     if (!valid) {
         return NS_ERROR_FAILURE;
     }
 
@@ -225,17 +225,17 @@ void XMLUtils::normalizePIValue(nsAStrin
         }
         piValue.Append(ch);
         prevCh = ch;
         ++conversionLoop;
     }
 }
 
 //static
-MBool XMLUtils::getXMLSpacePreserve(const txXPathNode& aNode)
+bool XMLUtils::getXMLSpacePreserve(const txXPathNode& aNode)
 {
     nsAutoString value;
     txXPathTreeWalker walker(aNode);
     do {
         if (walker.getAttr(nsGkAtoms::space, kNameSpaceID_XML, value)) {
             if (TX_StringEqualsAtom(value, nsGkAtoms::preserve)) {
                 return true;
             }
--- a/content/xslt/src/xml/txXMLUtils.h
+++ b/content/xslt/src/xml/txXMLUtils.h
@@ -70,17 +70,17 @@ public:
 
     txExpandedName(const txExpandedName& aOther) :
         mNamespaceID(aOther.mNamespaceID),
         mLocalName(aOther.mLocalName)
     {
     }
 
     nsresult init(const nsAString& aQName, txNamespaceMap* aResolver,
-                  MBool aUseDefault);
+                  bool aUseDefault);
 
     void reset()
     {
         mNamespaceID = kNameSpaceID_None;
         mLocalName = nsnull;
     }
 
     bool isNull()
@@ -90,23 +90,23 @@ public:
 
     txExpandedName& operator = (const txExpandedName& rhs)
     {
         mNamespaceID = rhs.mNamespaceID;
         mLocalName = rhs.mLocalName;
         return *this;
     }
 
-    MBool operator == (const txExpandedName& rhs) const
+    bool operator == (const txExpandedName& rhs) const
     {
         return ((mLocalName == rhs.mLocalName) &&
                 (mNamespaceID == rhs.mNamespaceID));
     }
 
-    MBool operator != (const txExpandedName& rhs) const
+    bool operator != (const txExpandedName& rhs) const
     {
         return ((mLocalName != rhs.mLocalName) ||
                 (mNamespaceID != rhs.mNamespaceID));
     }
 
     PRInt32 mNamespaceID;
     nsCOMPtr<nsIAtom> mLocalName;
 };
@@ -119,17 +119,17 @@ public:
                                    PRInt32* aNameSpaceID);
     static nsresult splitQName(const nsAString& aName, nsIAtom** aPrefix,
                                nsIAtom** aLocalName);
     static const nsDependentSubstring getLocalPart(const nsAString& src);
 
     /*
      * Returns true if the given character is whitespace.
      */
-    static MBool isWhitespace(const PRUnichar& aChar)
+    static bool isWhitespace(const PRUnichar& aChar)
     {
         return (aChar <= ' ' &&
                 (aChar == ' ' || aChar == '\r' ||
                  aChar == '\n'|| aChar == '\t'));
     }
 
     /**
      * Returns true if the given string has only whitespace characters
@@ -168,12 +168,12 @@ public:
         nsIParserService* ps = nsContentUtils::GetParserService();
         return ps && ps->IsXMLNCNameChar(aChar);
     }
 
     /*
      * Walks up the document tree and returns true if the closest xml:space
      * attribute is "preserve"
      */
-    static MBool getXMLSpacePreserve(const txXPathNode& aNode);
+    static bool getXMLSpacePreserve(const txXPathNode& aNode);
 };
 
 #endif
--- a/content/xslt/src/xpath/nsXPathExpression.cpp
+++ b/content/xslt/src/xpath/nsXPathExpression.cpp
@@ -191,19 +191,19 @@ nsresult
 nsXPathExpression::EvalContextImpl::getVariable(PRInt32 aNamespace,
                                                 nsIAtom* aLName,
                                                 txAExprResult*& aResult)
 {
     aResult = 0;
     return NS_ERROR_INVALID_ARG;
 }
 
-MBool nsXPathExpression::EvalContextImpl::isStripSpaceAllowed(const txXPathNode& aNode)
+bool nsXPathExpression::EvalContextImpl::isStripSpaceAllowed(const txXPathNode& aNode)
 {
-    return MB_FALSE;
+    return false;
 }
 
 void* nsXPathExpression::EvalContextImpl::getPrivateContext()
 {
     // we don't have a private context here.
     return nsnull;
 }
 
--- a/content/xslt/src/xpath/txBooleanResult.cpp
+++ b/content/xslt/src/xpath/txBooleanResult.cpp
@@ -38,18 +38,18 @@
 
 /*
  * Boolean Expression result
 */
 
 #include "txExprResult.h"
 
 /**
- * Creates a new BooleanResult with the value of the given MBool parameter
- * @param boolean the MBool to use for initialization of this BooleanResult's value
+ * Creates a new BooleanResult with the value of the given bool parameter
+ * @param boolean the bool to use for initialization of this BooleanResult's value
 **/
 BooleanResult::BooleanResult(bool boolean)
     : txAExprResult(nsnull)
 {
     this->value = boolean;
 } //-- BooleanResult
 
 /*
@@ -75,15 +75,15 @@ const nsString*
 BooleanResult::stringValuePointer()
 {
     // In theory we could set strings containing "true" and "false" somewhere,
     // but most stylesheets never get the stringvalue of a bool so that won't
     // really buy us anything.
     return nsnull;
 }
 
-MBool BooleanResult::booleanValue() {
+bool BooleanResult::booleanValue() {
    return this->value;
 } //-- toBoolean
 
 double BooleanResult::numberValue() {
     return ( value ) ? 1.0 : 0.0;
 } //-- toNumber
--- a/content/xslt/src/xpath/txCoreFunctionCall.cpp
+++ b/content/xslt/src/xpath/txCoreFunctionCall.cpp
@@ -298,33 +298,33 @@ txCoreFunctionCall::evaluate(txIEvalCont
                 txXPathNodeUtils::appendNodeValue(aContext->getContextNode(),
                                                   resultStr);
             }
 
             nsRefPtr<StringResult> strRes;
             rv = aContext->recycler()->getStringResult(getter_AddRefs(strRes));
             NS_ENSURE_SUCCESS(rv, rv);
 
-            MBool addSpace = MB_FALSE;
-            MBool first = MB_TRUE;
+            bool addSpace = false;
+            bool first = true;
             strRes->mValue.SetCapacity(resultStr.Length());
             PRUnichar c;
             PRUint32 src;
             for (src = 0; src < resultStr.Length(); src++) {
                 c = resultStr.CharAt(src);
                 if (XMLUtils::isWhitespace(c)) {
-                    addSpace = MB_TRUE;
+                    addSpace = true;
                 }
                 else {
                     if (addSpace && !first)
                         strRes->mValue.Append(PRUnichar(' '));
 
                     strRes->mValue.Append(c);
-                    addSpace = MB_FALSE;
-                    first = MB_FALSE;
+                    addSpace = false;
+                    first = false;
                 }
             }
             *aResult = strRes;
             NS_ADDREF(*aResult);
 
             return NS_OK;
         }
         case STARTS_WITH:
--- a/content/xslt/src/xpath/txExprParser.cpp
+++ b/content/xslt/src/xpath/txExprParser.cpp
@@ -297,17 +297,17 @@ txExprParser::createBinaryExpr(nsAutoPtr
 
 nsresult
 txExprParser::createExpr(txExprLexer& lexer, txIParseContext* aContext,
                          Expr** aResult)
 {
     *aResult = nsnull;
 
     nsresult rv = NS_OK;
-    MBool done = MB_FALSE;
+    bool done = false;
 
     nsAutoPtr<Expr> expr;
 
     txStack exprs;
     txStack ops;
 
     while (!done) {
 
--- a/content/xslt/src/xpath/txExprParser.h
+++ b/content/xslt/src/xpath/txExprParser.h
@@ -117,17 +117,17 @@ protected:
 
     /**
      * Resolve a QName, given the mContext parse context.
      * Returns prefix and localName as well as namespace ID
      */
     static nsresult resolveQName(const nsAString& aQName, nsIAtom** aPrefix,
                                  txIParseContext* aContext,
                                  nsIAtom** aLocalName, PRInt32& aNamespace,
-                                 bool aIsNameTest = MB_FALSE);
+                                 bool aIsNameTest = false);
 
     /**
      * Using the given lexer, parses the tokens if they represent a
      * predicate list
      * If an error occurs a non-zero String pointer will be returned
      * containing the error message.
      * @param predicateList, the PredicateList to add predicate expressions to
      * @param lexer the ExprLexer to use for parsing tokens
--- a/content/xslt/src/xpath/txExprResult.h
+++ b/content/xslt/src/xpath/txExprResult.h
@@ -99,20 +99,20 @@ public:
 
     /**
      * Returns a pointer to the stringvalue if possible. Otherwise null is
      * returned.
      */
     virtual const nsString* stringValuePointer() = 0;
 
     /**
-     * Converts this ExprResult to a Boolean (MBool) value
+     * Converts this ExprResult to a Boolean (bool) value
      * @return the Boolean value
     **/
-    virtual MBool booleanValue()          = 0;
+    virtual bool booleanValue()          = 0;
 
     /**
      * Converts this ExprResult to a Number (double) value
      * @return the Number value
     **/
     virtual double numberValue()          = 0;
 
 private:
@@ -126,22 +126,22 @@ private:
     virtual const nsString* stringValuePointer();                 \
     virtual bool booleanValue();                                \
     virtual double numberValue();                                 \
 
 
 class BooleanResult : public txAExprResult {
 
 public:
-    BooleanResult(MBool aValue);
+    BooleanResult(bool aValue);
 
     TX_DECL_EXPRRESULT
 
 private:
-    MBool value;
+    bool value;
 };
 
 class NumberResult : public txAExprResult {
 
 public:
     NumberResult(double aValue, txResultRecycler* aRecycler);
 
     TX_DECL_EXPRRESULT
--- a/content/xslt/src/xpath/txForwardContext.cpp
+++ b/content/xslt/src/xpath/txForwardContext.cpp
@@ -58,17 +58,17 @@ PRUint32 txForwardContext::position()
 
 nsresult txForwardContext::getVariable(PRInt32 aNamespace, nsIAtom* aLName,
                                        txAExprResult*& aResult)
 {
     NS_ASSERTION(mInner, "mInner is null!!!");
     return mInner->getVariable(aNamespace, aLName, aResult);
 }
 
-MBool txForwardContext::isStripSpaceAllowed(const txXPathNode& aNode)
+bool txForwardContext::isStripSpaceAllowed(const txXPathNode& aNode)
 {
     NS_ASSERTION(mInner, "mInner is null!!!");
     return mInner->isStripSpaceAllowed(aNode);
 }
 
 void* txForwardContext::getPrivateContext()
 {
     NS_ASSERTION(mInner, "mInner is null!!!");
--- a/content/xslt/src/xpath/txIXPathContext.h
+++ b/content/xslt/src/xpath/txIXPathContext.h
@@ -108,17 +108,17 @@ public:
      */
     virtual nsresult getVariable(PRInt32 aNamespace, nsIAtom* aLName,
                                  txAExprResult*& aResult) = 0;
 
     /*
      * Is whitespace stripping allowed for the given node?
      * See http://www.w3.org/TR/xslt#strip
      */
-    virtual MBool isStripSpaceAllowed(const txXPathNode& aNode) = 0;
+    virtual bool isStripSpaceAllowed(const txXPathNode& aNode) = 0;
 
     /**
      * Returns a pointer to the private context
      */
     virtual void* getPrivateContext() = 0;
 
     virtual txResultRecycler* recycler() = 0;
 
@@ -126,17 +126,17 @@ public:
      * Callback to be used by the expression/pattern if errors are detected.
      */
     virtual void receiveError(const nsAString& aMsg, nsresult aRes) = 0;
 };
 
 #define TX_DECL_MATCH_CONTEXT \
     nsresult getVariable(PRInt32 aNamespace, nsIAtom* aLName, \
                          txAExprResult*& aResult); \
-    MBool isStripSpaceAllowed(const txXPathNode& aNode); \
+    bool isStripSpaceAllowed(const txXPathNode& aNode); \
     void* getPrivateContext(); \
     txResultRecycler* recycler(); \
     void receiveError(const nsAString& aMsg, nsresult aRes)
 
 class txIEvalContext : public txIMatchContext
 {
 public:
     /*
--- a/content/xslt/src/xpath/txNameTest.cpp
+++ b/content/xslt/src/xpath/txNameTest.cpp
@@ -64,28 +64,28 @@ bool txNameTest::matches(const txXPathNo
          !txXPathNodeUtils::isAttribute(aNode)) ||
         (mNodeType == txXPathNodeType::DOCUMENT_NODE &&
          !txXPathNodeUtils::isRoot(aNode))) {
         return false;
     }
 
     // Totally wild?
     if (mLocalName == nsGkAtoms::_asterix && !mPrefix)
-        return MB_TRUE;
+        return true;
 
     // Compare namespaces
     if (mNamespace != txXPathNodeUtils::getNamespaceID(aNode) 
         && !(mNamespace == kNameSpaceID_None &&
              txXPathNodeUtils::isHTMLElementInHTMLDocument(aNode))
        )
-        return MB_FALSE;
+        return false;
 
     // Name wild?
     if (mLocalName == nsGkAtoms::_asterix)
-        return MB_TRUE;
+        return true;
 
     // Compare local-names
     return txXPathNodeUtils::localNameEquals(aNode, mLocalName);
 }
 
 /*
  * Returns the default priority of this txNodeTest
  */
--- a/content/xslt/src/xpath/txNodeSetContext.cpp
+++ b/content/xslt/src/xpath/txNodeSetContext.cpp
@@ -57,17 +57,17 @@ PRUint32 txNodeSetContext::position()
 
 nsresult txNodeSetContext::getVariable(PRInt32 aNamespace, nsIAtom* aLName,
                                        txAExprResult*& aResult)
 {
     NS_ASSERTION(mInner, "mInner is null!!!");
     return mInner->getVariable(aNamespace, aLName, aResult);
 }
 
-MBool txNodeSetContext::isStripSpaceAllowed(const txXPathNode& aNode)
+bool txNodeSetContext::isStripSpaceAllowed(const txXPathNode& aNode)
 {
     NS_ASSERTION(mInner, "mInner is null!!!");
     return mInner->isStripSpaceAllowed(aNode);
 }
 
 void* txNodeSetContext::getPrivateContext()
 {
     NS_ASSERTION(mInner, "mInner is null!!!");
--- a/content/xslt/src/xpath/txNodeSetContext.h
+++ b/content/xslt/src/xpath/txNodeSetContext.h
@@ -47,17 +47,17 @@ class txNodeSetContext : public txIEvalC
 {
 public:
     txNodeSetContext(txNodeSet* aContextNodeSet, txIMatchContext* aContext)
         : mContextSet(aContextNodeSet), mPosition(0), mInner(aContext)
     {
     }
 
     // Iteration over the given NodeSet
-    MBool hasNext()
+    bool hasNext()
     {
         return mPosition < size();
     }
     void next()
     {
         NS_ASSERTION(mPosition < size(), "Out of bounds.");
         mPosition++;
     }
--- a/content/xslt/src/xpath/txNumberResult.cpp
+++ b/content/xslt/src/xpath/txNumberResult.cpp
@@ -71,20 +71,20 @@ NumberResult::stringValue(nsString& aRes
 }
 
 const nsString*
 NumberResult::stringValuePointer()
 {
     return nsnull;
 }
 
-MBool NumberResult::booleanValue() {
+bool NumberResult::booleanValue() {
   // OG+
   // As per the XPath spec, the boolean value of a number is true if and only if
   // it is neither positive 0 nor negative 0 nor NaN
-  return (MBool)(value != 0.0 && !Double::isNaN(value));
+  return (bool)(value != 0.0 && !Double::isNaN(value));
   // OG-
 } //-- booleanValue
 
 double NumberResult::numberValue() {
     return this->value;
 } //-- numberValue
 
--- a/content/xslt/src/xpath/txPathExpr.cpp
+++ b/content/xslt/src/xpath/txPathExpr.cpp
@@ -188,17 +188,17 @@ PathExpr::evalDescendants(Expr* aStep, c
                                    (static_cast<txAExprResult*>(res));
     nsRefPtr<txNodeSet> newSet;
     rv = aContext->recycler()->getNonSharedNodeSet(oldSet,
                                                    getter_AddRefs(newSet));
     NS_ENSURE_SUCCESS(rv, rv);
 
     resNodes->addAndTransfer(newSet);
 
-    MBool filterWS = aContext->isStripSpaceAllowed(aNode);
+    bool filterWS = aContext->isStripSpaceAllowed(aNode);
 
     txXPathTreeWalker walker(aNode);
     if (!walker.moveToFirstChild()) {
         return NS_OK;
     }
 
     do {
         const txXPathNode& node = walker.getCurrentPosition();
--- a/content/xslt/src/xpath/txSingleNodeContext.h
+++ b/content/xslt/src/xpath/txSingleNodeContext.h
@@ -54,17 +54,17 @@ public:
 
     nsresult getVariable(PRInt32 aNamespace, nsIAtom* aLName,
                          txAExprResult*& aResult)
     {
         NS_ASSERTION(mInner, "mInner is null!!!");
         return mInner->getVariable(aNamespace, aLName, aResult);
     }
 
-    MBool isStripSpaceAllowed(const txXPathNode& aNode)
+    bool isStripSpaceAllowed(const txXPathNode& aNode)
     {
         NS_ASSERTION(mInner, "mInner is null!!!");
         return mInner->isStripSpaceAllowed(aNode);
     }
 
     void* getPrivateContext()
     {
         NS_ASSERTION(mInner, "mInner is null!!!");
--- a/content/xslt/src/xpath/txStringResult.cpp
+++ b/content/xslt/src/xpath/txStringResult.cpp
@@ -74,16 +74,16 @@ StringResult::stringValue(nsString& aRes
 }
 
 const nsString*
 StringResult::stringValuePointer()
 {
     return &mValue;
 }
 
-MBool StringResult::booleanValue() {
+bool StringResult::booleanValue() {
    return !mValue.IsEmpty();
 } //-- booleanValue
 
 double StringResult::numberValue() {
     return Double::toDouble(mValue);
 } //-- numberValue
 
--- a/content/xslt/src/xslt/txDocumentFunctionCall.cpp
+++ b/content/xslt/src/xslt/txDocumentFunctionCall.cpp
@@ -116,30 +116,30 @@ DocumentFunctionCall::evaluate(txIEvalCo
         return NS_ERROR_XPATH_BAD_ARGUMENT_COUNT;
     }
 
     nsRefPtr<txAExprResult> exprResult1;
     rv = mParams[0]->evaluate(aContext, getter_AddRefs(exprResult1));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoString baseURI;
-    MBool baseURISet = MB_FALSE;
+    bool baseURISet = false;
 
     if (mParams.Length() == 2) {
         // We have 2 arguments, get baseURI from the first node
         // in the resulting nodeset
         nsRefPtr<txNodeSet> nodeSet2;
         rv = evaluateToNodeSet(mParams[1],
                                aContext, getter_AddRefs(nodeSet2));
         NS_ENSURE_SUCCESS(rv, rv);
 
         // Make this true, even if nodeSet2 is empty. For relative URLs,
         // we'll fail to load the document with an empty base URI, and for
         // absolute URLs, the base URI doesn't matter
-        baseURISet = MB_TRUE;
+        baseURISet = true;
 
         if (!nodeSet2->isEmpty()) {
             txXPathNodeUtils::getBaseURI(nodeSet2->get(0), baseURI);
         }
     }
 
     if (exprResult1->getResultType() == txAExprResult::NODESET) {
         // The first argument is a NodeSet, iterate on its nodes
--- a/content/xslt/src/xslt/txFormatNumberFunctionCall.cpp
+++ b/content/xslt/src/xslt/txFormatNumberFunctionCall.cpp
@@ -91,17 +91,17 @@ txFormatNumberFunctionCall::evaluate(txI
     rv = mParams[1]->evaluateToString(aContext, formatStr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (mParams.Length() == 3) {
         nsAutoString formatQName;
         rv = mParams[2]->evaluateToString(aContext, formatQName);
         NS_ENSURE_SUCCESS(rv, rv);
 
-        rv = formatName.init(formatQName, mMappings, MB_FALSE);
+        rv = formatName.init(formatQName, mMappings, false);
         NS_ENSURE_SUCCESS(rv, rv);
     }
 
     txDecimalFormat* format = mStylesheet->getDecimalFormat(formatName);
     if (!format) {
         nsAutoString err(NS_LITERAL_STRING("unknown decimal format"));
 #ifdef TX_TO_STRING
         err.AppendLiteral(" for: ");
@@ -134,20 +134,20 @@ txFormatNumberFunctionCall::evaluate(txI
     int minIntegerSize=0;
     int minFractionSize=0;
     int maxFractionSize=0;
     int multiplier=1;
     int groupSize=-1;
 
     PRUint32 pos = 0;
     PRUint32 formatLen = formatStr.Length();
-    MBool inQuote;
+    bool inQuote;
 
     // Get right subexpression
-    inQuote = MB_FALSE;
+    inQuote = false;
     if (Double::isNeg(value)) {
         while (pos < formatLen &&
                (inQuote ||
                 formatStr.CharAt(pos) != format->mPatternSeparator)) {
             if (formatStr.CharAt(pos) == FORMAT_QUOTE)
                 inQuote = !inQuote;
             pos++;
         }
@@ -157,17 +157,17 @@ txFormatNumberFunctionCall::evaluate(txI
             prefix.Append(format->mMinusSign);
         }
         else
             pos++;
     }
 
     // Parse the format string
     FormatParseState pState = Prefix;
-    inQuote = MB_FALSE;
+    inQuote = false;
 
     PRUnichar c = 0;
     while (pos < formatLen && pState != Finished) {
         c=formatStr.CharAt(pos++);
 
         switch (pState) {
 
         case Prefix:
@@ -322,18 +322,18 @@ txFormatNumberFunctionCall::evaluate(txI
     // XXX We shouldn't use SetLength.
     res.SetLength(res.Length() +
                   intDigits +               // integer digits
                   1 +                       // decimal separator
                   maxFractionSize +         // fractions
                   (intDigits-1)/groupSize); // group separators
 
     PRInt32 i = bufIntDigits + maxFractionSize - 1;
-    MBool carry = (i+1 < buflen) && (buf[i+1] >= '5');
-    MBool hasFraction = MB_FALSE;
+    bool carry = (i+1 < buflen) && (buf[i+1] >= '5');
+    bool hasFraction = false;
 
     PRUint32 resPos = res.Length()-1;
 
     // Fractions
     for (; i >= bufIntDigits; --i) {
         int digit;
         if (i >= buflen || i < 0) {
             digit = 0;
@@ -343,17 +343,17 @@ txFormatNumberFunctionCall::evaluate(txI
         }
         
         if (carry) {
             digit = (digit + 1) % 10;
             carry = digit == 0;
         }
 
         if (hasFraction || digit != 0 || i < bufIntDigits+minFractionSize) {
-            hasFraction = MB_TRUE;
+            hasFraction = true;
             res.SetCharAt((PRUnichar)(digit + format->mZeroDigit),
                           resPos--);
         }
         else {
             res.Truncate(resPos--);
         }
     }
 
@@ -443,17 +443,17 @@ txDecimalFormat::txDecimalFormat() : mIn
     mMinusSign = '-';
     mPercent = '%';
     mPerMille = 0x2030;
     mZeroDigit = '0';
     mDigit = '#';
     mPatternSeparator = ';';
 }
 
-MBool txDecimalFormat::isEqual(txDecimalFormat* other)
+bool txDecimalFormat::isEqual(txDecimalFormat* other)
 {
     return mDecimalSeparator == other->mDecimalSeparator &&
            mGroupingSeparator == other->mGroupingSeparator &&
            mInfinity.Equals(other->mInfinity) &&
            mMinusSign == other->mMinusSign &&
            mNaN.Equals(other->mNaN) &&
            mPercent == other->mPercent &&
            mPerMille == other->mPerMille &&
--- a/content/xslt/src/xslt/txNodeSorter.cpp
+++ b/content/xslt/src/xslt/txNodeSorter.cpp
@@ -73,24 +73,24 @@ txNodeSorter::addSortElement(Expr* aSele
     nsAutoPtr<SortKey> key(new SortKey);
     NS_ENSURE_TRUE(key, NS_ERROR_OUT_OF_MEMORY);
     nsresult rv = NS_OK;
 
     // Select
     key->mExpr = aSelectExpr;
 
     // Order
-    MBool ascending = MB_TRUE;
+    bool ascending = true;
     if (aOrderExpr) {
         nsAutoString attrValue;
         rv = aOrderExpr->evaluateToString(aContext, attrValue);
         NS_ENSURE_SUCCESS(rv, rv);
 
         if (TX_StringEqualsAtom(attrValue, nsGkAtoms::descending)) {
-            ascending = MB_FALSE;
+            ascending = false;
         }
         else if (!TX_StringEqualsAtom(attrValue, nsGkAtoms::ascending)) {
             // XXX ErrorReport: unknown value for order attribute
             return NS_ERROR_XSLT_BAD_VALUE;
         }
     }
 
 
@@ -107,17 +107,17 @@ txNodeSorter::addSortElement(Expr* aSele
         // Language
         nsAutoString lang;
         if (aLangExpr) {
             rv = aLangExpr->evaluateToString(aContext, lang);
             NS_ENSURE_SUCCESS(rv, rv);
         }
 
         // Case-order 
-        MBool upperFirst = false;
+        bool upperFirst = false;
         if (aCaseOrderExpr) {
             nsAutoString attrValue;
 
             rv = aCaseOrderExpr->evaluateToString(aContext, attrValue);
             NS_ENSURE_SUCCESS(rv, rv);
 
             if (TX_StringEqualsAtom(attrValue, nsGkAtoms::upperFirst)) {
                 upperFirst = true;
--- a/content/xslt/src/xslt/txPatternParser.cpp
+++ b/content/xslt/src/xslt/txPatternParser.cpp
@@ -134,31 +134,31 @@ nsresult txPatternParser::createUnionPat
 }
 
 nsresult txPatternParser::createLocPathPattern(txExprLexer& aLexer,
                                                txIParseContext* aContext,
                                                txPattern*& aPattern)
 {
     nsresult rv = NS_OK;
 
-    MBool isChild = MB_TRUE;
-    MBool isAbsolute = MB_FALSE;
+    bool isChild = true;
+    bool isAbsolute = false;
     txPattern* stepPattern = 0;
     txLocPathPattern* pathPattern = 0;
 
     Token::Type type = aLexer.peek()->mType;
     switch (type) {
         case Token::ANCESTOR_OP:
-            isChild = MB_FALSE;
-            isAbsolute = MB_TRUE;
+            isChild = false;
+            isAbsolute = true;
             aLexer.nextToken();
             break;
         case Token::PARENT_OP:
             aLexer.nextToken();
-            isAbsolute = MB_TRUE;
+            isAbsolute = true;
             if (aLexer.peek()->mType == Token::END || 
                 aLexer.peek()->mType == Token::UNION_OP) {
                 aPattern = new txRootPattern();
 
                 return aPattern ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
             }
             break;
         case Token::FUNCTION_NAME_AND_PAREN:
@@ -294,32 +294,32 @@ nsresult txPatternParser::createKeyPatte
     return aPattern ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
 }
 
 nsresult txPatternParser::createStepPattern(txExprLexer& aLexer,
                                             txIParseContext* aContext,
                                             txPattern*& aPattern)
 {
     nsresult rv = NS_OK;
-    MBool isAttr = MB_FALSE;
+    bool isAttr = false;
     Token* tok = aLexer.peek();
     if (tok->mType == Token::AXIS_IDENTIFIER) {
         if (TX_StringEqualsAtom(tok->Value(), nsGkAtoms::attribute)) {
-            isAttr = MB_TRUE;
+            isAttr = true;
         }
         else if (!TX_StringEqualsAtom(tok->Value(), nsGkAtoms::child)) {
             // all done already for CHILD_AXIS, for all others
             // XXX report unexpected axis error
             return NS_ERROR_XPATH_PARSE_FAILURE;
         }
         aLexer.nextToken();
     }
     else if (tok->mType == Token::AT_SIGN) {
         aLexer.nextToken();
-        isAttr = MB_TRUE;
+        isAttr = true;
     }
     tok = aLexer.nextToken();
 
     txNodeTest* nodeTest;
     if (tok->mType == Token::CNAME) {
         // resolve QName
         nsCOMPtr<nsIAtom> prefix, lName;
         PRInt32 nspace;
--- a/content/xslt/src/xslt/txStylesheet.h
+++ b/content/xslt/src/xslt/txStylesheet.h
@@ -187,37 +187,37 @@ private:
 
 /**
  * txStripSpaceTest holds both an txNameTest and a bool for use in
  * whitespace stripping.
  */
 class txStripSpaceTest {
 public:
     txStripSpaceTest(nsIAtom* aPrefix, nsIAtom* aLocalName, PRInt32 aNSID,
-                     MBool stripSpace)
+                     bool stripSpace)
         : mNameTest(aPrefix, aLocalName, aNSID, txXPathNodeType::ELEMENT_NODE),
           mStrips(stripSpace)
     {
     }
 
-    MBool matches(const txXPathNode& aNode, txIMatchContext* aContext) {
+    bool matches(const txXPathNode& aNode, txIMatchContext* aContext) {
         return mNameTest.matches(aNode, aContext);
     }
 
-    MBool stripsSpace() {
+    bool stripsSpace() {
         return mStrips;
     }
 
     double getDefaultPriority() {
         return mNameTest.getDefaultPriority();
     }
 
 protected:
     txNameTest mNameTest;
-    MBool mStrips;
+    bool mStrips;
 };
 
 /**
  * Value of a global parameter
  */
 class txIGlobalParameter
 {
 public:
--- a/content/xslt/src/xslt/txStylesheetCompileHandlers.cpp
+++ b/content/xslt/src/xslt/txStylesheetCompileHandlers.cpp
@@ -1362,17 +1362,17 @@ txFnEndLRE(txStylesheetCompilerState& aS
 
   txText
 */
 static nsresult
 txFnText(const nsAString& aStr, txStylesheetCompilerState& aState)
 {
     TX_RETURN_IF_WHITESPACE(aStr, aState);
 
-    nsAutoPtr<txInstruction> instr(new txText(aStr, MB_FALSE));
+    nsAutoPtr<txInstruction> instr(new txText(aStr, false));
     NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
 
     nsresult rv = aState.addInstruction(instr);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
 }
 
@@ -2408,17 +2408,17 @@ txFnStartText(PRInt32 aNamespaceID,
     aState.mDOE = doe == eTrue;
 
     return aState.pushHandlerTable(gTxTextHandler);
 }
 
 static nsresult
 txFnEndText(txStylesheetCompilerState& aState)
 {
-    aState.mDOE = MB_FALSE;
+    aState.mDOE = false;
     aState.popHandlerTable();
     return NS_OK;
 }
 
 static nsresult
 txFnTextText(const nsAString& aStr, txStylesheetCompilerState& aState)
 {
     nsAutoPtr<txInstruction> instr(new txText(aStr, aState.mDOE));
@@ -3039,17 +3039,17 @@ txHandlerTable::find(PRInt32 aNamespaceI
     if (NS_FAILED(rv))                                               \
         return false
 
 #define SHUTDOWN_HANDLER(_name)                                      \
     delete gTx##_name##Handler;                                      \
     gTx##_name##Handler = nsnull
 
 // static
-MBool
+bool
 txHandlerTable::init()
 {
     nsresult rv = NS_OK;
 
     INIT_HANDLER_WITH_ELEMENT_HANDLERS(Root);
     INIT_HANDLER(Embed);
     INIT_HANDLER_WITH_ELEMENT_HANDLERS(Top);
     INIT_HANDLER(Ignore);
@@ -3061,17 +3061,17 @@ txHandlerTable::init()
     INIT_HANDLER_WITH_ELEMENT_HANDLERS(ForEach);
     INIT_HANDLER(TopVariable);
     INIT_HANDLER_WITH_ELEMENT_HANDLERS(Choose);
     INIT_HANDLER_WITH_ELEMENT_HANDLERS(Param);
     INIT_HANDLER_WITH_ELEMENT_HANDLERS(Import);
     INIT_HANDLER_WITH_ELEMENT_HANDLERS(AttributeSet);
     INIT_HANDLER_WITH_ELEMENT_HANDLERS(Fallback);
 
-    return MB_TRUE;
+    return true;
 }
 
 // static
 void
 txHandlerTable::shutdown()
 {
     SHUTDOWN_HANDLER(Root);
     SHUTDOWN_HANDLER(Embed);
--- a/content/xslt/src/xslt/txStylesheetCompileHandlers.h
+++ b/content/xslt/src/xslt/txStylesheetCompileHandlers.h
@@ -70,17 +70,17 @@ public:
                    const txElementHandler* aLREHandler,
                    const txElementHandler* aOtherHandler);
     nsresult init(const txElementHandler* aHandlers, PRUint32 aCount);
     const txElementHandler* find(PRInt32 aNamespaceID, nsIAtom* aLocalName);
     
     const HandleTextFn mTextHandler;
     const txElementHandler* const mLREHandler;
 
-    static MBool init();
+    static bool init();
     static void shutdown();
 
 private:
     const txElementHandler* const mOtherHandler;
     txExpandedNameMap<const txElementHandler> mHandlers;
 };
 
 extern txHandlerTable* gTxRootHandler;
--- a/content/xslt/src/xslt/txStylesheetCompiler.cpp
+++ b/content/xslt/src/xslt/txStylesheetCompiler.cpp
@@ -222,20 +222,20 @@ txStylesheetCompiler::startElementIntern
 
         // xml:space
         if (attr->mNamespaceID == kNameSpaceID_XML &&
             attr->mLocalName == nsGkAtoms::space) {
             rv = ensureNewElementContext();
             NS_ENSURE_SUCCESS(rv, rv);
 
             if (TX_StringEqualsAtom(attr->mValue, nsGkAtoms::preserve)) {
-                mElementContext->mPreserveWhitespace = MB_TRUE;
+                mElementContext->mPreserveWhitespace = true;
             }
             else if (TX_StringEqualsAtom(attr->mValue, nsGkAtoms::_default)) {
-                mElementContext->mPreserveWhitespace = MB_FALSE;
+                mElementContext->mPreserveWhitespace = false;
             }
             else {
                 return NS_ERROR_XSLT_PARSE_FAILURE;
             }
         }
 
         // xml:base
         if (attr->mNamespaceID == kNameSpaceID_XML &&
@@ -286,30 +286,30 @@ txStylesheetCompiler::startElementIntern
              attr->mLocalName == nsGkAtoms::version &&
              aNamespaceID == kNameSpaceID_XSLT &&
              (aLocalName == nsGkAtoms::stylesheet ||
               aLocalName == nsGkAtoms::transform))) {
             rv = ensureNewElementContext();
             NS_ENSURE_SUCCESS(rv, rv);
 
             if (attr->mValue.EqualsLiteral("1.0")) {
-                mElementContext->mForwardsCompatibleParsing = MB_FALSE;
+                mElementContext->mForwardsCompatibleParsing = false;
             }
             else {
-                mElementContext->mForwardsCompatibleParsing = MB_TRUE;
+                mElementContext->mForwardsCompatibleParsing = true;
             }
         }
     }
 
     // Find the right elementhandler and execute it
-    MBool isInstruction = MB_FALSE;
+    bool isInstruction = false;
     PRInt32 count = mElementContext->mInstructionNamespaces.Length();
     for (i = 0; i < count; ++i) {
         if (mElementContext->mInstructionNamespaces[i] == aNamespaceID) {
-            isInstruction = MB_TRUE;
+            isInstruction = true;
             break;
         }
     }
 
     if (mEmbedStatus == eNeedEmbed) {
         // handle embedded stylesheets
         if (aIDOffset >= 0 && aAttributes[aIDOffset].mValue.Equals(mTarget)) {
             // We found the right ID, signal to compile the 
--- a/content/xslt/src/xslt/txTextHandler.cpp
+++ b/content/xslt/src/xslt/txTextHandler.cpp
@@ -34,17 +34,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "txTextHandler.h"
 #include "nsAString.h"
 
-txTextHandler::txTextHandler(MBool aOnlyText) : mLevel(0),
+txTextHandler::txTextHandler(bool aOnlyText) : mLevel(0),
                                                 mOnlyText(aOnlyText)
 {
 }
 
 nsresult
 txTextHandler::attribute(nsIAtom* aPrefix, nsIAtom* aLocalName,
                          nsIAtom* aLowercaseLocalName, PRInt32 aNsID,
                          const nsString& aValue)
--- a/content/xslt/src/xslt/txTextHandler.h
+++ b/content/xslt/src/xslt/txTextHandler.h
@@ -40,20 +40,20 @@
 #define TRANSFRMX_TEXT_HANDLER_H
 
 #include "txXMLEventHandler.h"
 #include "nsString.h"
 
 class txTextHandler : public txAXMLEventHandler
 {
 public:
-    txTextHandler(MBool aOnlyText);
+    txTextHandler(bool aOnlyText);
 
     TX_DECL_TXAXMLEVENTHANDLER
 
     nsString mValue;
 
 private:
     PRUint32 mLevel;
-    MBool mOnlyText;
+    bool mOnlyText;
 };
 
 #endif
--- a/content/xslt/src/xslt/txXPathResultComparator.cpp
+++ b/content/xslt/src/xslt/txXPathResultComparator.cpp
@@ -45,18 +45,18 @@
 #include "nsILocaleService.h"
 #include "nsIServiceManager.h"
 #include "nsLocaleCID.h"
 #include "prmem.h"
 
 #define kAscending (1<<0)
 #define kUpperFirst (1<<1)
 
-txResultStringComparator::txResultStringComparator(MBool aAscending,
-                                                   MBool aUpperFirst,
+txResultStringComparator::txResultStringComparator(bool aAscending,
+                                                   bool aUpperFirst,
                                                    const nsAFlatString& aLanguage)
 {
     mSorting = 0;
     if (aAscending)
         mSorting |= kAscending;
     if (aUpperFirst)
         mSorting |= kUpperFirst;
     nsresult rv = init(aLanguage);
@@ -210,17 +210,17 @@ txResultStringComparator::StringValue::~
 {
     PR_Free(mKey);
     if (mCaseLength > 0)
         PR_Free((PRUint8*)mCaseKey);
     else
         delete (nsString*)mCaseKey;
 }
 
-txResultNumberComparator::txResultNumberComparator(MBool aAscending)
+txResultNumberComparator::txResultNumberComparator(bool aAscending)
 {
     mAscending = aAscending ? 1 : -1;
 }
 
 nsresult
 txResultNumberComparator::createSortableValue(Expr *aExpr,
                                               txIEvalContext *aContext,
                                               TxObject *&aResult)
--- a/content/xslt/src/xslt/txXPathResultComparator.h
+++ b/content/xslt/src/xslt/txXPathResultComparator.h
@@ -72,17 +72,17 @@ public:
 };
 
 /*
  * Compare results as stings (data-type="text")
  */
 class txResultStringComparator : public txXPathResultComparator
 {
 public:
-    txResultStringComparator(MBool aAscending, MBool aUpperFirst,
+    txResultStringComparator(bool aAscending, bool aUpperFirst,
                              const nsAFlatString& aLanguage);
 
     int compareValues(TxObject* aVal1, TxObject* aVal2);
     nsresult createSortableValue(Expr *aExpr, txIEvalContext *aContext,
                                  TxObject *&aResult);
 private:
     nsCOMPtr<nsICollation> mCollation;
     nsresult init(const nsAFlatString& aLanguage);
@@ -105,17 +105,17 @@ private:
 };
 
 /*
  * Compare results as numbers (data-type="number")
  */
 class txResultNumberComparator : public txXPathResultComparator
 {
 public:
-    txResultNumberComparator(MBool aAscending);
+    txResultNumberComparator(bool aAscending);
 
     int compareValues(TxObject* aVal1, TxObject* aVal2);
     nsresult createSortableValue(Expr *aExpr, txIEvalContext *aContext,
                                  TxObject *&aResult);
 
 private:
     int mAscending;
 
--- a/content/xslt/src/xslt/txXSLTFunctions.h
+++ b/content/xslt/src/xslt/txXSLTFunctions.h
@@ -122,17 +122,17 @@ private:
 class txDecimalFormat {
 
 public:
     /*
      * Creates a new decimal format and initilizes all properties with
      * default values
      */
     txDecimalFormat();
-    MBool isEqual(txDecimalFormat* other);
+    bool isEqual(txDecimalFormat* other);
     
     PRUnichar       mDecimalSeparator;
     PRUnichar       mGroupingSeparator;
     nsString        mInfinity;
     PRUnichar       mMinusSign;
     nsString        mNaN;
     PRUnichar       mPercent;
     PRUnichar       mPerMille;
--- a/content/xslt/src/xslt/txXSLTNumber.cpp
+++ b/content/xslt/src/xslt/txXSLTNumber.cpp
@@ -71,33 +71,33 @@ nsresult txXSLTNumber::createNumber(Expr
     if (!valueString.IsEmpty()) {
         aResult = valueString;
 
         return NS_OK;
     }
 
     // Create resulting string
     aResult = head;
-    MBool first = MB_TRUE;
+    bool first = true;
     txListIterator valueIter(&values);
     txListIterator counterIter(&counters);
     valueIter.resetToEnd();
     PRInt32 value;
     txFormattedCounter* counter = 0;
     while ((value = NS_PTR_TO_INT32(valueIter.previous()))) {
         if (counterIter.hasNext()) {
             counter = (txFormattedCounter*)counterIter.next();
         }
 
         if (!first) {
             aResult.Append(counter->mSeparator);
         }
 
         counter->appendNumber(value, aResult);
-        first = MB_FALSE;
+        first = false;
     }
     
     aResult.Append(tail);
     
     txListIterator iter(&counters);
     while (iter.hasNext()) {
         delete (txFormattedCounter*)iter.next();
     }
@@ -131,23 +131,23 @@ txXSLTNumber::getValueList(Expr* aValueE
         aValues.add(NS_INT32_TO_PTR((PRInt32)floor(value + 0.5)));
         return NS_OK;
     }
 
 
     // Otherwise use count/from/level
 
     txPattern* countPattern = aCountPattern;
-    MBool ownsCountPattern = MB_FALSE;
+    bool ownsCountPattern = false;
     const txXPathNode& currNode = aContext->getContextNode();
 
     // Parse count- and from-attributes
 
     if (!aCountPattern) {
-        ownsCountPattern = MB_TRUE;
+        ownsCountPattern = true;
         txNodeTest* nodeTest;
         PRUint16 nodeType = txXPathNodeUtils::getNodeType(currNode);
         switch (nodeType) {
             case txXPathNodeType::ELEMENT_NODE:
             {
                 nsCOMPtr<nsIAtom> localName =
                     txXPathNodeUtils::getLocalName(currNode);
                 PRInt32 namespaceID = txXPathNodeUtils::getNamespaceID(currNode);
@@ -186,17 +186,17 @@ txXSLTNumber::getValueList(Expr* aValueE
                 // but it's what the spec says to do
                 nodeTest = new txNameTest(0, nsGkAtoms::_asterix, 0,
                                           nodeType);
                 break;
             }
         }
         NS_ENSURE_TRUE(nodeTest, NS_ERROR_OUT_OF_MEMORY);
 
-        countPattern = new txStepPattern(nodeTest, MB_FALSE);
+        countPattern = new txStepPattern(nodeTest, false);
         if (!countPattern) {
             // XXX error reporting
             delete nodeTest;
             return NS_ERROR_OUT_OF_MEMORY;
         }
     }
 
 
@@ -234,22 +234,22 @@ txXSLTNumber::getValueList(Expr* aValueE
                 aValues.clear();
             }
         }
     }
     // level = "multiple"
     else if (aLevel == eLevelMultiple) {
         // find all ancestor-or-selfs that matches count until...
         txXPathTreeWalker walker(currNode);
-        MBool matchedFrom = MB_FALSE;
+        bool matchedFrom = false;
         do {
             if (aFromPattern && !walker.isOnNode(currNode) &&
                 aFromPattern->matches(walker.getCurrentPosition(), aContext)) {
                 //... we find one that matches from
-                matchedFrom = MB_TRUE;
+                matchedFrom = true;
                 break;
             }
 
             if (countPattern->matches(walker.getCurrentPosition(), aContext)) {
                 aValues.add(NS_INT32_TO_PTR(getSiblingCount(walker, countPattern,
                                                             aContext)));
             }
         } while (walker.moveToParent());
@@ -259,23 +259,23 @@ txXSLTNumber::getValueList(Expr* aValueE
         // we shouldn't search anything
         if (aFromPattern && !matchedFrom) {
             aValues.clear();
         }
     }
     // level = "any"
     else if (aLevel == eLevelAny) {
         PRInt32 value = 0;
-        MBool matchedFrom = MB_FALSE;
+        bool matchedFrom = false;
 
         txXPathTreeWalker walker(currNode);
         do {
             if (aFromPattern && !walker.isOnNode(currNode) &&
                 aFromPattern->matches(walker.getCurrentPosition(), aContext)) {
-                matchedFrom = MB_TRUE;
+                matchedFrom = true;
                 break;
             }
 
             if (countPattern->matches(walker.getCurrentPosition(), aContext)) {
                 ++value;
             }
 
         } while (getPrevInDocumentOrder(walker));
@@ -445,22 +445,22 @@ txXSLTNumber::getPrevInDocumentOrder(txX
         while (aWalker.moveToLastChild()) {
             // do nothing
         }
         return true;
     }
     return aWalker.moveToParent();
 }
 
-#define TX_CHAR_RANGE(ch, a, b) if (ch < a) return MB_FALSE; \
-    if (ch <= b) return MB_TRUE
-#define TX_MATCH_CHAR(ch, a) if (ch < a) return MB_FALSE; \
-    if (ch == a) return MB_TRUE
+#define TX_CHAR_RANGE(ch, a, b) if (ch < a) return false; \
+    if (ch <= b) return true
+#define TX_MATCH_CHAR(ch, a) if (ch < a) return false; \
+    if (ch == a) return true
 
-MBool txXSLTNumber::isAlphaNumeric(PRUnichar ch)
+bool txXSLTNumber::isAlphaNumeric(PRUnichar ch)
 {
     TX_CHAR_RANGE(ch, 0x0030, 0x0039);
     TX_CHAR_RANGE(ch, 0x0041, 0x005A);
     TX_CHAR_RANGE(ch, 0x0061, 0x007A);
     TX_MATCH_CHAR(ch, 0x00AA);
     TX_CHAR_RANGE(ch, 0x00B2, 0x00B3);
     TX_MATCH_CHAR(ch, 0x00B5);
     TX_CHAR_RANGE(ch, 0x00B9, 0x00BA);
@@ -742,10 +742,10 @@ MBool txXSLTNumber::isAlphaNumeric(PRUni
     TX_CHAR_RANGE(ch, 0xFE76, 0xFEFC);
     TX_CHAR_RANGE(ch, 0xFF10, 0xFF19);
     TX_CHAR_RANGE(ch, 0xFF21, 0xFF3A);
     TX_CHAR_RANGE(ch, 0xFF41, 0xFF5A);
     TX_CHAR_RANGE(ch, 0xFF66, 0xFFBE);
     TX_CHAR_RANGE(ch, 0xFFC2, 0xFFC7);
     TX_CHAR_RANGE(ch, 0xFFCA, 0xFFCF);
     TX_CHAR_RANGE(ch, 0xFFD2, 0xFFD7);
-    return MB_FALSE;
+    return false;
 }
--- a/content/xslt/src/xslt/txXSLTNumber.h
+++ b/content/xslt/src/xslt/txXSLTNumber.h
@@ -80,17 +80,17 @@ private:
      *
      */
     static PRInt32 getSiblingCount(txXPathTreeWalker& aWalker,
                                    txPattern* aCountPattern,
                                    txIMatchContext* aContext);
     
     static bool getPrevInDocumentOrder(txXPathTreeWalker& aWalker);
 
-    static MBool isAlphaNumeric(PRUnichar ch);
+    static bool isAlphaNumeric(PRUnichar ch);
 };
 
 class txFormattedCounter {
 public:
     virtual ~txFormattedCounter()
     {
     }
     
--- a/content/xslt/src/xslt/txXSLTNumberCounters.cpp
+++ b/content/xslt/src/xslt/txXSLTNumberCounters.cpp
@@ -66,17 +66,17 @@ public:
     virtual void appendNumber(PRInt32 aNumber, nsAString& aDest);
     
 private:
     PRUnichar mOffset;
 };
 
 class txRomanCounter : public txFormattedCounter {
 public:
-    txRomanCounter(MBool aUpper) : mTableOffset(aUpper ? 30 : 0)
+    txRomanCounter(bool aUpper) : mTableOffset(aUpper ? 30 : 0)
     {
     }
 
     void appendNumber(PRInt32 aNumber, nsAString& aDest);
 
 private:
     PRInt32 mTableOffset;
 };
--- a/content/xslt/src/xslt/txXSLTPatterns.cpp
+++ b/content/xslt/src/xslt/txXSLTPatterns.cpp
@@ -58,25 +58,25 @@ double txUnionPattern::getDefaultPriorit
 }
 
 /*
  * Determines whether this Pattern matches the given node within
  * the given context
  * This should be called on the simple patterns for xsl:template,
  * but is fine for xsl:key and xsl:number
  */
-MBool txUnionPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
+bool txUnionPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
 {
     PRUint32 i, len = mLocPathPatterns.Length();
     for (i = 0; i < len; ++i) {
         if (mLocPathPatterns[i]->matches(aNode, aContext)) {
-            return MB_TRUE;
+            return true;
         }
     }
-    return MB_FALSE;
+    return false;
 }
 
 txPattern::Type
 txUnionPattern::getType()
 {
   return UNION_PATTERN;
 }
 
@@ -129,17 +129,17 @@ nsresult txLocPathPattern::addStep(txPat
         return NS_ERROR_OUT_OF_MEMORY;
 
     step->pattern = aPattern;
     step->isChild = isChild;
 
     return NS_OK;
 }
 
-MBool txLocPathPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
+bool txLocPathPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
 {
     NS_ASSERTION(mSteps.Length() > 1, "Internal error");
 
     /*
      * The idea is to split up a path into blocks separated by descendant
      * operators. For example "foo/bar//baz/bop//ying/yang" is split up into
      * three blocks. The "ying/yang" block is handled by the first while-loop
      * and the "foo/bar" and "baz/bop" blocks are handled by the second
@@ -148,38 +148,38 @@ MBool txLocPathPattern::matches(const tx
      * match the block. If there are more than one list of ancestors that
      * match a block we only need to find the one furthermost down in the
      * tree.
      */
 
     PRUint32 pos = mSteps.Length();
     Step* step = &mSteps[--pos];
     if (!step->pattern->matches(aNode, aContext))
-        return MB_FALSE;
+        return false;
 
     txXPathTreeWalker walker(aNode);
     bool hasParent = walker.moveToParent();
 
     while (step->isChild) {
         if (!pos)
-            return MB_TRUE; // all steps matched
+            return true; // all steps matched
         step = &mSteps[--pos];
         if (!hasParent || !step->pattern->matches(walker.getCurrentPosition(), aContext))
-            return MB_FALSE; // no more ancestors or no match
+            return false; // no more ancestors or no match
 
         hasParent = walker.moveToParent();
     }
 
     // We have at least one // path separator
     txXPathTreeWalker blockWalker(walker);
     PRUint32 blockPos = pos;
 
     while (pos) {
         if (!hasParent)
-            return MB_FALSE; // There are more steps in the current block 
+            return false; // There are more steps in the current block 
                              // than ancestors of the tested node
 
         step = &mSteps[--pos];
         if (!step->pattern->matches(walker.getCurrentPosition(), aContext)) {
             // Didn't match. We restart at beginning of block using a new
             // start node
             pos = blockPos;
             hasParent = blockWalker.moveToParent();
@@ -190,17 +190,17 @@ MBool txLocPathPattern::matches(const tx
             if (!step->isChild) {
                 // We've matched an entire block. Set new start pos and start node
                 blockPos = pos;
                 blockWalker.moveTo(walker);
             }
         }
     }
 
-    return MB_TRUE;
+    return true;
 } // txLocPathPattern::matches
 
 double txLocPathPattern::getDefaultPriority()
 {
     NS_ASSERTION(mSteps.Length() > 1, "Internal error");
 
     return 0.5;
 }
@@ -244,17 +244,17 @@ txLocPathPattern::toString(nsAString& aD
 #endif
 
 /*
  * txRootPattern
  *
  * a txPattern matching the document node, or '/'
  */
 
-MBool txRootPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
+bool txRootPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
 {
     return txXPathNodeUtils::isRoot(aNode);
 }
 
 double txRootPattern::getDefaultPriority()
 {
     return 0.5;
 }
@@ -290,17 +290,17 @@ txIdPattern::txIdPattern(const nsSubstri
     nsWhitespaceTokenizer tokenizer(aString);
     while (tokenizer.hasMoreTokens()) {
         // this can fail, XXX move to a Init(aString) method
         nsCOMPtr<nsIAtom> atom = do_GetAtom(tokenizer.nextToken());
         mIds.AppendObject(atom);
     }
 }
 
-MBool txIdPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
+bool txIdPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
 {
     if (!txXPathNodeUtils::isElement(aNode)) {
         return false;
     }
 
     // Get a ID attribute, if there is
     nsIContent* content = txXPathNativeNode::getContent(aNode);
     NS_ASSERTION(content, "a Element without nsIContent");
@@ -346,17 +346,17 @@ txIdPattern::toString(nsAString& aDest)
  * txKeyPattern
  *
  * txKeyPattern matches if the given node is in the evalation of 
  * the key() function
  * This resembles the key() function, but may only have LITERALs as
  * argument.
  */
 
-MBool txKeyPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
+bool txKeyPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
 {
     txExecutionState* es = (txExecutionState*)aContext->getPrivateContext();
     nsAutoPtr<txXPathNode> contextDoc(txXPathNodeUtils::getOwnerDocument(aNode));
     NS_ENSURE_TRUE(contextDoc, false);
 
     nsRefPtr<txNodeSet> nodes;
     nsresult rv = es->getKeyNodes(mName, *contextDoc, mValue, true,
                                   getter_AddRefs(nodes));
@@ -399,108 +399,108 @@ txKeyPattern::toString(nsAString& aDest)
 #endif
 
 /*
  * txStepPattern
  *
  * a txPattern to hold the NodeTest and the Predicates of a StepPattern
  */
 
-MBool txStepPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
+bool txStepPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
 {
     NS_ASSERTION(mNodeTest, "Internal error");
 
     if (!mNodeTest->matches(aNode, aContext))
-        return MB_FALSE;
+        return false;
 
     txXPathTreeWalker walker(aNode);
     if ((!mIsAttr &&
          txXPathNodeUtils::isAttribute(walker.getCurrentPosition())) ||
         !walker.moveToParent()) {
-        return MB_FALSE;
+        return false;
     }
     if (isEmpty()) {
-        return MB_TRUE;
+        return true;
     }
 
     /*
      * Evaluate Predicates
      *
      * Copy all siblings/attributes matching mNodeTest to nodes
      * Up to the last Predicate do
      *  Foreach node in nodes
      *   evaluate Predicate with node as context node
      *   if the result is a number, check the context position,
      *    otherwise convert to bool
      *   if result is true, copy node to newNodes
-     *  if aNode is not member of newNodes, return MB_FALSE
+     *  if aNode is not member of newNodes, return false
      *  nodes = newNodes
      *
      * For the last Predicate, evaluate Predicate with aNode as
      *  context node, if the result is a number, check the position,
      *  otherwise return the result converted to boolean
      */
 
     // Create the context node set for evaluating the predicates
     nsRefPtr<txNodeSet> nodes;
     nsresult rv = aContext->recycler()->getNodeSet(getter_AddRefs(nodes));
-    NS_ENSURE_SUCCESS(rv, MB_FALSE);
+    NS_ENSURE_SUCCESS(rv, false);
 
     bool hasNext = mIsAttr ? walker.moveToFirstAttribute() :
                                walker.moveToFirstChild();
     while (hasNext) {
         if (mNodeTest->matches(walker.getCurrentPosition(), aContext)) {
             nodes->append(walker.getCurrentPosition());
         }
         hasNext = mIsAttr ? walker.moveToNextAttribute() :
                             walker.moveToNextSibling();
     }
 
     Expr* predicate = mPredicates[0];
     nsRefPtr<txNodeSet> newNodes;
     rv = aContext->recycler()->getNodeSet(getter_AddRefs(newNodes));
-    NS_ENSURE_SUCCESS(rv, MB_FALSE);
+    NS_ENSURE_SUCCESS(rv, false);
 
     PRUint32 i, predLen = mPredicates.Length();
     for (i = 1; i < predLen; ++i) {
         newNodes->clear();
-        MBool contextIsInPredicate = MB_FALSE;
+        bool contextIsInPredicate = false;
         txNodeSetContext predContext(nodes, aContext);
         while (predContext.hasNext()) {
             predContext.next();
             nsRefPtr<txAExprResult> exprResult;
             rv = predicate->evaluate(&predContext, getter_AddRefs(exprResult));
             NS_ENSURE_SUCCESS(rv, false);
 
             switch(exprResult->getResultType()) {
                 case txAExprResult::NUMBER:
                     // handle default, [position() == numberValue()]
                     if ((double)predContext.position() ==
                         exprResult->numberValue()) {
                         const txXPathNode& tmp = predContext.getContextNode();
                         if (tmp == aNode)
-                            contextIsInPredicate = MB_TRUE;
+                            contextIsInPredicate = true;
                         newNodes->append(tmp);
                     }
                     break;
                 default:
                     if (exprResult->booleanValue()) {
                         const txXPathNode& tmp = predContext.getContextNode();
                         if (tmp == aNode)
-                            contextIsInPredicate = MB_TRUE;
+                            contextIsInPredicate = true;
                         newNodes->append(tmp);
                     }
                     break;
             }
         }
         // Move new NodeSet to the current one
         nodes->clear();
         nodes->append(*newNodes);
         if (!contextIsInPredicate) {
-            return MB_FALSE;
+            return false;
         }
         predicate = mPredicates[i];
     }
     txForwardContext evalContext(aContext, aNode, nodes);
     nsRefPtr<txAExprResult> exprResult;
     rv = predicate->evaluate(&evalContext, getter_AddRefs(exprResult));
     NS_ENSURE_SUCCESS(rv, false);
 
--- a/content/xslt/src/xslt/txXSLTPatterns.h
+++ b/content/xslt/src/xslt/txXSLTPatterns.h
@@ -54,17 +54,17 @@ public:
     virtual ~txPattern()
     {
         MOZ_COUNT_DTOR(txPattern);
     }
 
     /*
      * Determines whether this Pattern matches the given node.
      */
-    virtual MBool matches(const txXPathNode& aNode,
+    virtual bool matches(const txXPathNode& aNode,
                           txIMatchContext* aContext) = 0;
 
     /*
      * Returns the default priority of this Pattern.
      *
      * Simple Patterns return the values as specified in XPath 5.5.
      * Returns -Inf for union patterns, as it shouldn't be called on them.
      */
@@ -114,17 +114,17 @@ public:
      * other #toString() methods for Patterns.
      * @return the String representation of this Pattern.
      */
     virtual void toString(nsAString& aDest) = 0;
 #endif
 };
 
 #define TX_DECL_PATTERN_BASE \
-    MBool matches(const txXPathNode& aNode, txIMatchContext* aContext); \
+    bool matches(const txXPathNode& aNode, txIMatchContext* aContext); \
     double getDefaultPriority(); \
     virtual Expr* getSubExprAt(PRUint32 aPos); \
     virtual void setSubExprAt(PRUint32 aPos, Expr* aExpr); \
     virtual txPattern* getSubPatternAt(PRUint32 aPos); \
     virtual void setSubPatternAt(PRUint32 aPos, txPattern* aPattern)
 
 #ifndef TX_TO_STRING
 #define TX_DECL_PATTERN TX_DECL_PATTERN_BASE
--- a/content/xslt/src/xslt/txXSLTProcessor.cpp
+++ b/content/xslt/src/xslt/txXSLTProcessor.cpp
@@ -43,29 +43,29 @@
 #include "txStylesheetCompileHandlers.h"
 #include "txStylesheetCompiler.h"
 #include "txExecutionState.h"
 #include "txExprResult.h"
 
 TX_LG_IMPL
 
 /* static */
-MBool
+bool
 txXSLTProcessor::init()
 {
     TX_LG_CREATE;
 
     if (!txHandlerTable::init())
-        return MB_FALSE;
+        return false;
 
     extern bool TX_InitEXSLTFunction();
     if (!TX_InitEXSLTFunction())
-        return MB_FALSE;
+        return false;
 
-    return MB_TRUE;
+    return true;
 }
 
 /* static */
 void
 txXSLTProcessor::shutdown()
 {
     txStylesheetCompilerState::shutdown();
     txHandlerTable::shutdown();
--- a/content/xslt/src/xslt/txXSLTProcessor.h
+++ b/content/xslt/src/xslt/txXSLTProcessor.h
@@ -43,17 +43,17 @@
 
 class txXSLTProcessor
 {
 public:
     /**
      * Initialisation and shutdown routines. Initilizes and cleansup all
      * dependant classes
      */
-    static MBool init();
+    static bool init();
     static void shutdown();
 
 
     static nsresult execute(txExecutionState& aEs);
 
     // once we want to have interuption we should probably have functions for
     // running X number of steps or running until a condition is true.
 };