Bug 494117: Mechanically change 'ReParent' to 'Reparent' throughout the tree. r=bzbarsky
authorZack Weinberg <zweinberg@mozilla.com>
Thu, 01 Apr 2010 23:07:43 -0700
changeset 40137 399da4539fe07bc3f2146aa42e9f2b468f746b2d
parent 40136 0838e2acf420e7b120d82b48883addd879cf3819
child 40138 fa8b5b82273085ca05fe0d310a42a1ce8988e2fc
push idunknown
push userunknown
push dateunknown
reviewersbzbarsky
bugs494117
milestone1.9.3a4pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 494117: Mechanically change 'ReParent' to 'Reparent' throughout the tree. r=bzbarsky
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsFrameManager.cpp
layout/base/nsFrameManager.h
layout/forms/nsFieldSetFrame.cpp
layout/generic/nsFirstLetterFrame.cpp
layout/generic/nsFrame.cpp
layout/generic/nsInlineFrame.cpp
layout/style/nsTransitionManager.cpp
toolkit/xre/nsNativeAppSupportWin.cpp
tools/trace-malloc/spacecategory.c
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -417,17 +417,17 @@ AnyKidsNeedBlockParent(nsIFrame *aFrameL
 
 // Reparent a frame into a wrapper frame that is a child of its old parent.
 static void
 ReparentFrame(nsFrameManager* aFrameManager,
               nsIFrame* aNewParentFrame,
               nsIFrame* aFrame)
 {
   aFrame->SetParent(aNewParentFrame);
-  aFrameManager->ReParentStyleContext(aFrame);
+  aFrameManager->ReparentStyleContext(aFrame);
   if (aFrame->GetStateBits() &
       (NS_FRAME_HAS_VIEW | NS_FRAME_HAS_CHILD_WITH_VIEW)) {
     // No need to walk up the tree, since the bits are already set
     // right on the parent of aNewParentFrame.
     NS_ASSERTION(aNewParentFrame->GetParent()->GetStateBits() &
                    NS_FRAME_HAS_CHILD_WITH_VIEW,
                  "aNewParentFrame's parent should have this bit set!");
     aNewParentFrame->AddStateBits(NS_FRAME_HAS_CHILD_WITH_VIEW);
--- a/layout/base/nsFrameManager.cpp
+++ b/layout/base/nsFrameManager.cpp
@@ -752,41 +752,41 @@ TryStartingTransition(nsPresContext *aPr
                      (*aNewStyleContext)->GetPseudo(),
                      (*aNewStyleContext)->GetPseudoType(),
                      (*aNewStyleContext)->GetRuleNode(),
                      rules);
   }
 }
 
 nsresult
-nsFrameManager::ReParentStyleContext(nsIFrame* aFrame)
+nsFrameManager::ReparentStyleContext(nsIFrame* aFrame)
 {
   if (nsGkAtoms::placeholderFrame == aFrame->GetType()) {
     // Also reparent the out-of-flow
     nsIFrame* outOfFlow =
       nsPlaceholderFrame::GetRealFrameForPlaceholder(aFrame);
     NS_ASSERTION(outOfFlow, "no out-of-flow frame");
 
-    ReParentStyleContext(outOfFlow);
+    ReparentStyleContext(outOfFlow);
   }
 
   // DO NOT verify the style tree before reparenting.  The frame
   // tree has already been changed, so this check would just fail.
   nsStyleContext* oldContext = aFrame->GetStyleContext();
   // XXXbz can oldContext really ever be null?
   if (oldContext) {
     nsRefPtr<nsStyleContext> newContext;
     nsIFrame* providerFrame = nsnull;
     PRBool providerIsChild = PR_FALSE;
     nsIFrame* providerChild = nsnull;
     aFrame->GetParentStyleContextFrame(GetPresContext(), &providerFrame,
                                        &providerIsChild);
     nsStyleContext* newParentContext = nsnull;
     if (providerIsChild) {
-      ReParentStyleContext(providerFrame);
+      ReparentStyleContext(providerFrame);
       newParentContext = providerFrame->GetStyleContext();
       providerChild = providerFrame;
     } else if (providerFrame) {
       newParentContext = providerFrame->GetStyleContext();
     } else {
       NS_NOTREACHED("Reparenting something that has no usable parent? "
                     "Shouldn't happen!");
     }
@@ -836,17 +836,17 @@ nsFrameManager::ReParentStyleContext(nsI
     } else {
       newContext = mStyleSet->ReparentStyleContext(oldContext,
                                                    newParentContext);
     }
 
     if (newContext) {
       if (newContext != oldContext) {
         // We probably don't want to initiate transitions from
-        // ReParentStyleContext, since we call it during frame
+        // ReparentStyleContext, since we call it during frame
         // construction rather than in response to dynamic changes.
         // Also see the comment at the start of
         // nsTransitionManager::ConsiderStartingTransition.
 #if 0
         if (!copyFromContinuation) {
           TryStartingTransition(GetPresContext(), aFrame->GetContent(),
                                 oldContext, &newContext);
         }
@@ -881,17 +881,17 @@ nsFrameManager::ReParentStyleContext(nsI
                   nsPlaceholderFrame::GetRealFrameForPlaceholder(child);
                 NS_ASSERTION(outOfFlowFrame, "no out-of-flow frame");
 
                 NS_ASSERTION(outOfFlowFrame != providerChild,
                              "Out of flow provider?");
               }
 #endif
 
-              ReParentStyleContext(child);
+              ReparentStyleContext(child);
             }
 
             child = child->GetNextSibling();
           }
 
           childList = aFrame->GetAdditionalChildListName(listIndex++);
         } while (childList);
 
@@ -901,17 +901,17 @@ nsFrameManager::ReParentStyleContext(nsI
         // (split or not) hasn't done so already). It's not a problem to
         // reparent the same frame twice because the "if (newContext !=
         // oldContext)" check will prevent us from redoing work.
         if ((aFrame->GetStateBits() & NS_FRAME_IS_SPECIAL) &&
             !aFrame->GetPrevContinuation()) {
           nsIFrame* sib = static_cast<nsIFrame*>
             (aFrame->Properties().Get(nsIFrame::IBSplitSpecialSibling()));
           if (sib) {
-            ReParentStyleContext(sib);
+            ReparentStyleContext(sib);
           }
         }
 
         // do additional contexts 
         PRInt32 contextIndex = -1;
         while (1) {
           nsStyleContext* oldExtraContext =
             aFrame->GetAdditionalStyleContext(++contextIndex);
--- a/layout/base/nsFrameManager.h
+++ b/layout/base/nsFrameManager.h
@@ -143,17 +143,17 @@ public:
   /*
    * Reparent the style contexts of this frame subtree.  The parent frame of
    * aFrame must be changed to the new parent before this function is called;
    * the new parent style context will be automatically computed based on the
    * new position in the frame tree.
    *
    * @param aFrame the root of the subtree to reparent.  Must not be null.
    */
-  NS_HIDDEN_(nsresult) ReParentStyleContext(nsIFrame* aFrame);
+  NS_HIDDEN_(nsresult) ReparentStyleContext(nsIFrame* aFrame);
 
   /*
    * Re-resolve the style contexts for a frame tree, building
    * aChangeList based on the resulting style changes, plus aMinChange
    * applied to aFrame.
    */
   NS_HIDDEN_(void)
     ComputeStyleChangeFor(nsIFrame* aFrame,
--- a/layout/forms/nsFieldSetFrame.cpp
+++ b/layout/forms/nsFieldSetFrame.cpp
@@ -115,17 +115,17 @@ public:
   NS_IMETHOD GetFrameName(nsAString& aResult) const {
     return MakeFrameName(NS_LITERAL_STRING("FieldSet"), aResult);
   }
 #endif
 
 protected:
 
   virtual PRIntn GetSkipSides() const;
-  void ReParentFrameList(const nsFrameList& aFrameList);
+  void ReparentFrameList(const nsFrameList& aFrameList);
 
   nsIFrame* mLegendFrame;
   nsIFrame* mContentFrame;
   nsRect    mLegendRect;
   nscoord   mLegendSpace;
 };
 
 nsIFrame*
@@ -616,31 +616,31 @@ nsFieldSetFrame::GetSkipSides() const
   return 0;
 }
 
 NS_IMETHODIMP
 nsFieldSetFrame::AppendFrames(nsIAtom*       aListName,
                               nsFrameList&   aFrameList)
 {
   // aFrameList is not allowed to contain "the legend" for this fieldset
-  ReParentFrameList(aFrameList);
+  ReparentFrameList(aFrameList);
   return mContentFrame->AppendFrames(aListName, aFrameList);
 }
 
 NS_IMETHODIMP
 nsFieldSetFrame::InsertFrames(nsIAtom*       aListName,
                               nsIFrame*      aPrevFrame,
                               nsFrameList&   aFrameList)
 {
   NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this ||
                aPrevFrame->GetParent() == mContentFrame,
                "inserting after sibling frame with different parent");
 
   // aFrameList is not allowed to contain "the legend" for this fieldset
-  ReParentFrameList(aFrameList);
+  ReparentFrameList(aFrameList);
   if (NS_UNLIKELY(aPrevFrame == mLegendFrame)) {
     aPrevFrame = nsnull;
   }
   return mContentFrame->InsertFrames(aListName, aPrevFrame, aFrameList);
 }
 
 NS_IMETHODIMP
 nsFieldSetFrame::RemoveFrame(nsIAtom*       aListName,
@@ -660,24 +660,24 @@ NS_IMETHODIMP nsFieldSetFrame::GetAccess
     return accService->CreateHTMLGroupboxAccessible(static_cast<nsIFrame*>(this), aAccessible);
   }
 
   return NS_ERROR_FAILURE;
 }
 #endif
 
 void
-nsFieldSetFrame::ReParentFrameList(const nsFrameList& aFrameList)
+nsFieldSetFrame::ReparentFrameList(const nsFrameList& aFrameList)
 {
   nsFrameManager* frameManager = PresContext()->FrameManager();
   for (nsFrameList::Enumerator e(aFrameList); !e.AtEnd(); e.Next()) {
     NS_ASSERTION(mLegendFrame || e.get()->GetType() != nsGkAtoms::legendFrame,
                  "The fieldset's legend is not allowed in this list");
     e.get()->SetParent(mContentFrame);
-    frameManager->ReParentStyleContext(e.get());
+    frameManager->ReparentStyleContext(e.get());
   }
   mContentFrame->AddStateBits(GetStateBits() & NS_FRAME_HAS_CHILD_WITH_VIEW);
 }
 
 nscoord
 nsFieldSetFrame::GetBaseline() const
 {
   // We know mContentFrame is a block, so calling GetBaseline() on it will do
--- a/layout/generic/nsFirstLetterFrame.cpp
+++ b/layout/generic/nsFirstLetterFrame.cpp
@@ -103,17 +103,17 @@ nsFirstLetterFrame::Init(nsIContent*    
 NS_IMETHODIMP
 nsFirstLetterFrame::SetInitialChildList(nsIAtom*     aListName,
                                         nsFrameList& aChildList)
 {
   nsFrameManager *frameManager = PresContext()->FrameManager();
 
   for (nsFrameList::Enumerator e(aChildList); !e.AtEnd(); e.Next()) {
     NS_ASSERTION(e.get()->GetParent() == this, "Unexpected parent");
-    frameManager->ReParentStyleContext(e.get());
+    frameManager->ReparentStyleContext(e.get());
   }
 
   mFrames.SetFrames(aChildList);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsFirstLetterFrame::GetChildFrameContainingOffset(PRInt32 inContentOffset,
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -5819,17 +5819,17 @@ nsFrame::CorrectStyleParentFrame(nsIFram
     NS_ASSERTION(aChildPseudo != nsCSSAnonBoxes::mozAnonymousBlock &&
                  aChildPseudo != nsCSSAnonBoxes::mozAnonymousPositionedBlock,
                  "Should have dealt with kids that have NS_FRAME_IS_SPECIAL "
                  "elsewhere");
     return aProspectiveParent;
   }
 
   // Otherwise, walk up out of all anon boxes.  For placeholder frames, walk out
-  // of all pseudo-elements as well.  Otherwise ReParentStyleContext could cause
+  // of all pseudo-elements as well.  Otherwise ReparentStyleContext could cause
   // style data to be out of sync with the frame tree.
   nsIFrame* parent = aProspectiveParent;
   do {
     if (parent->GetStateBits() & NS_FRAME_IS_SPECIAL) {
       nsIFrame* sibling = GetIBSpecialSiblingForAnonymousBlock(parent);
 
       if (sibling) {
         // |parent| was a block in an {ib} split; use the inline as
--- a/layout/generic/nsInlineFrame.cpp
+++ b/layout/generic/nsInlineFrame.cpp
@@ -299,25 +299,25 @@ nsInlineFrame::ReparentFloatsForInlineCh
     // because lazy reparenting may be going on. If we find a different
     // parent we need to redo our analysis.
     ReparentFloatsForInlineChild(aOurLineContainer, next, aReparentSiblings);
     return;
   }
 }
 
 static void
-ReParentChildListStyle(nsPresContext* aPresContext,
+ReparentChildListStyle(nsPresContext* aPresContext,
                        const nsFrameList::Slice& aFrames,
                        nsIFrame* aParentFrame)
 {
   nsFrameManager *frameManager = aPresContext->FrameManager();
 
   for (nsFrameList::Enumerator e(aFrames); !e.AtEnd(); e.Next()) {
     NS_ASSERTION(e.get()->GetParent() == aParentFrame, "Bogus parentage");
-    frameManager->ReParentStyleContext(e.get());
+    frameManager->ReparentStyleContext(e.get());
   }
 }
 
 NS_IMETHODIMP
 nsInlineFrame::Reflow(nsPresContext*          aPresContext,
                       nsHTMLReflowMetrics&     aMetrics,
                       const nsHTMLReflowState& aReflowState,
                       nsReflowStatus&          aStatus)
@@ -369,17 +369,17 @@ nsInlineFrame::Reflow(nsPresContext*    
         const nsFrameList::Slice& newFrames =
           mFrames.InsertFrames(this, nsnull, *prevOverflowFrames);
         // If our prev in flow was under the first continuation of a first-line
         // frame then we need to reparent the style contexts to remove the
         // the special first-line styling. In the lazilySetParentPointer case
         // we reparent the style contexts when we set their parents in
         // nsInlineFrame::ReflowFrames and nsInlineFrame::ReflowInlineFrame.
         if (aReflowState.mLineLayout->GetInFirstLine()) {
-          ReParentChildListStyle(aPresContext, newFrames, this);
+          ReparentChildListStyle(aPresContext, newFrames, this);
         }
       }
     }
   }
 
   // It's also possible that we have an overflow list for ourselves
 #ifdef DEBUG
   if (GetStateBits() & NS_FRAME_FIRST_REFLOW) {
@@ -517,17 +517,17 @@ nsInlineFrame::ReflowFrames(nsPresContex
         // easily avoid it because we don't know where 'frame' originally
         // came from. If we really really have to optimize this we could
         // cache whether frame->GetParent() is under its containing blocks
         // overflowList or not.
         ReparentFloatsForInlineChild(irs.mLineContainer, frame, PR_FALSE);
       }
       frame->SetParent(this);
       if (inFirstLine) {
-        frameManager->ReParentStyleContext(frame);
+        frameManager->ReparentStyleContext(frame);
       }
       // We also need to check if frame has a next-in-flow. If it does, then set
       // its parent frame pointer, too. Otherwise, if we reflow frame and it's
       // complete we'll fail when deleting its next-in-flow which is no longer
       // needed. This scenario doesn't happen often, but it can happen
       nsIFrame* nextInFlow = frame->GetNextInFlow();
       for ( ; nextInFlow; nextInFlow = nextInFlow->GetNextInFlow()) {
         // Since we only do lazy setting of parent pointers for the frame's
@@ -535,17 +535,17 @@ nsInlineFrame::ReflowFrames(nsPresContex
         // the continuing child frame must be in our child list as well. If
         // not, then something is wrong
         NS_ASSERTION(mFrames.ContainsFrame(nextInFlow), "unexpected flow");
         if (havePrevBlock) {
           ReparentFloatsForInlineChild(irs.mLineContainer, nextInFlow, PR_FALSE);
         }
         nextInFlow->SetParent(this);
         if (inFirstLine) {
-          frameManager->ReParentStyleContext(nextInFlow);
+          frameManager->ReparentStyleContext(nextInFlow);
         }
       }
 
       // Fix the parent pointer for ::first-letter child frame next-in-flows,
       // so nsFirstLetterFrame::Reflow can destroy them safely (bug 401042).
       nsIFrame* realFrame = nsPlaceholderFrame::GetRealFrameFor(frame);
       if (realFrame->GetType() == nsGkAtoms::letterFrame) {
         nsIFrame* child = realFrame->GetFirstChild(nsnull);
@@ -554,17 +554,17 @@ nsInlineFrame::ReflowFrames(nsPresContex
                        "unexpected frame type");
           nsIFrame* nextInFlow = child->GetNextInFlow();
           for ( ; nextInFlow; nextInFlow = nextInFlow->GetNextInFlow()) {
             NS_ASSERTION(nextInFlow->GetType() == nsGkAtoms::textFrame,
                          "unexpected frame type");
             if (mFrames.ContainsFrame(nextInFlow)) {
               nextInFlow->SetParent(this);
               if (inFirstLine) {
-                frameManager->ReParentStyleContext(nextInFlow);
+                frameManager->ReparentStyleContext(nextInFlow);
               }
             }
             else {
 #ifdef DEBUG              
               // Once we find a next-in-flow that isn't ours none of the
               // remaining next-in-flows should be either.
               for ( ; nextInFlow; nextInFlow = nextInFlow->GetNextInFlow()) {
                 NS_ASSERTION(!mFrames.ContainsFrame(nextInFlow),
@@ -739,17 +739,17 @@ nsInlineFrame::ReflowInlineFrame(nsPresC
         if (irs.mSetParentPointer) {
           if (irs.mLineContainer && irs.mLineContainer->GetPrevContinuation()) {
             ReparentFloatsForInlineChild(irs.mLineContainer, aFrame->GetNextSibling(),
                                          PR_TRUE);
           }
           for (nsIFrame* f = aFrame->GetNextSibling(); f; f = f->GetNextSibling()) {
             f->SetParent(this);
             if (lineLayout->GetInFirstLine()) {
-              aPresContext->FrameManager()->ReParentStyleContext(f);
+              aPresContext->FrameManager()->ReparentStyleContext(f);
             }
           }
         }
       }
     }
     else {
       // Break-after
       if (NS_FRAME_IS_NOT_COMPLETE(aStatus)) {
@@ -1000,17 +1000,17 @@ nsIFrame*
 nsFirstLineFrame::PullOneFrame(nsPresContext* aPresContext, InlineReflowState& irs,
                                PRBool* aIsComplete)
 {
   nsIFrame* frame = nsInlineFrame::PullOneFrame(aPresContext, irs, aIsComplete);
   if (frame && !GetPrevInFlow()) {
     // We are a first-line frame. Fixup the child frames
     // style-context that we just pulled.
     NS_ASSERTION(frame->GetParent() == this, "Incorrect parent?");
-    aPresContext->FrameManager()->ReParentStyleContext(frame);
+    aPresContext->FrameManager()->ReparentStyleContext(frame);
   }
   return frame;
 }
 
 NS_IMETHODIMP
 nsFirstLineFrame::Reflow(nsPresContext* aPresContext,
                          nsHTMLReflowMetrics& aMetrics,
                          const nsHTMLReflowState& aReflowState,
@@ -1030,28 +1030,28 @@ nsFirstLineFrame::Reflow(nsPresContext* 
       // Assign all floats to our block if necessary
       if (lineContainer && lineContainer->GetPrevContinuation()) {
         ReparentFloatsForInlineChild(lineContainer,
                                      prevOverflowFrames->FirstChild(),
                                      PR_TRUE);
       }
       const nsFrameList::Slice& newFrames =
         mFrames.InsertFrames(this, nsnull, *prevOverflowFrames);
-      ReParentChildListStyle(aPresContext, newFrames, this);
+      ReparentChildListStyle(aPresContext, newFrames, this);
     }
   }
 
   // It's also possible that we have an overflow list for ourselves
   nsAutoPtr<nsFrameList> overflowFrames(StealOverflowFrames());
   if (overflowFrames) {
     NS_ASSERTION(mFrames.NotEmpty(), "overflow list w/o frames");
 
     const nsFrameList::Slice& newFrames =
       mFrames.AppendFrames(nsnull, *overflowFrames);
-    ReParentChildListStyle(aPresContext, newFrames, this);
+    ReparentChildListStyle(aPresContext, newFrames, this);
   }
 
   // Set our own reflow state (additional state above and beyond
   // aReflowState)
   InlineReflowState irs;
   irs.mPrevFrame = nsnull;
   irs.mLineContainer = lineContainer;
   irs.mLineLayout = aReflowState.mLineLayout;
@@ -1103,17 +1103,17 @@ nsFirstLineFrame::Reflow(nsPresContext* 
         nsRefPtr<nsStyleContext> newSC;
         newSC = aPresContext->StyleSet()->
           ResolveAnonymousBoxStyle(nsCSSAnonBoxes::mozLineFrame, parentContext);
         if (newSC) {
           // Switch to the new style context.
           SetStyleContext(newSC);
 
           // Re-resolve all children
-          ReParentChildListStyle(aPresContext, mFrames, this);
+          ReparentChildListStyle(aPresContext, mFrames, this);
         }
       }
     }
   }
 
   NS_ASSERTION(!aReflowState.mLineLayout->GetInFirstLine(),
                "Nested first-line frames? BOGUS");
   aReflowState.mLineLayout->SetInFirstLine(PR_TRUE);
@@ -1130,17 +1130,17 @@ nsFirstLineFrame::PullOverflowsFromPrevI
 {
   nsFirstLineFrame* prevInFlow = static_cast<nsFirstLineFrame*>(GetPrevInFlow());
   if (prevInFlow) {
     nsAutoPtr<nsFrameList> prevOverflowFrames(prevInFlow->StealOverflowFrames());
     if (prevOverflowFrames) {
       // Assume that our prev-in-flow has the same line container that we do.
       const nsFrameList::Slice& newFrames =
         mFrames.InsertFrames(this, nsnull, *prevOverflowFrames);
-      ReParentChildListStyle(PresContext(), newFrames, this);
+      ReparentChildListStyle(PresContext(), newFrames, this);
     }
   }
 }
 
 //////////////////////////////////////////////////////////////////////
 
 nsIFrame*
 NS_NewPositionedInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -388,17 +388,17 @@ TransExtractComputedValue(nsCSSProperty 
 already_AddRefed<nsIStyleRule>
 nsTransitionManager::StyleContextChanged(nsIContent *aElement,
                                          nsStyleContext *aOldStyleContext,
                                          nsStyleContext *aNewStyleContext)
 {
   NS_PRECONDITION(aOldStyleContext->GetPseudo() ==
                       aNewStyleContext->GetPseudo(),
                   "pseudo type mismatch");
-  // If we were called from ReParentStyleContext, this assertion would
+  // If we were called from ReparentStyleContext, this assertion would
   // actually fire.  If we need to be called from there, we can probably
   // just remove it; the condition probably isn't critical, although
   // it's worth thinking about some more.
   NS_PRECONDITION(aOldStyleContext->HasPseudoElementData() ==
                       aNewStyleContext->HasPseudoElementData(),
                   "pseudo type mismatch");
 
   // NOTE: Things in this function (and ConsiderStartingTransition)
--- a/toolkit/xre/nsNativeAppSupportWin.cpp
+++ b/toolkit/xre/nsNativeAppSupportWin.cpp
@@ -338,17 +338,16 @@ private:
     static HDDEDATA CreateDDEData( DWORD value );
     static HDDEDATA CreateDDEData( LPBYTE value, DWORD len );
     static PRBool   InitTopicStrings();
     static int      FindTopic( HSZ topic );
 #endif
     static void ActivateLastWindow();
     static nsresult OpenWindow( const char *urlstr, const char *args );
     static nsresult OpenBrowserWindow();
-    static nsresult ReParent( nsISupports *window, HWND newParent );
     static void     SetupSysTrayIcon();
     static void     RemoveSysTrayIcon();
 
     static int   mConversations;
     enum {
         topicOpenURL,
         topicActivate,
         topicCancelProgress,
--- a/tools/trace-malloc/spacecategory.c
+++ b/tools/trace-malloc/spacecategory.c
@@ -117,17 +117,17 @@ AddChild(STCategoryNode * parent, STCate
         }
         parent->children = newnodes;
     }
     parent->children[parent->nchildren++] = child;
     return 0;
 }
 
 int
-ReParent(STCategoryNode * parent, STCategoryNode * child)
+Reparent(STCategoryNode * parent, STCategoryNode * child)
 {
     PRUint32 i;
 
     if (child->parent == parent)
         return 0;
 
     /* Remove child from old parent */
     if (child->parent) {
@@ -307,17 +307,17 @@ ProcessCategoryParentRule(STCategoryRule
             if (!child)
                 return -1;
         }
         else {
             /* Reparent child to node. This is because when we created the node
              ** we would have created it as the child of root. Now we need to
              ** remove it from root's child list and add it into this node
              */
-            ReParent(node, child);
+            Reparent(node, child);
         }
     }
 
     return 0;
 }
 
 /*
 ** initCategories