Bug 465928 followup: correct typo in enum name - s/PERSERVE/PRESERVE/. No functional changes. r=roc
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 13 Jan 2009 12:32:46 -0800
changeset 22812 703fdc2d941ed9d2c271c1770a43dd0e7151f2a9
parent 22811 a05e3e37e03008fca67aaf3427259df792e0c071
child 22814 d2165c8133c3333c4149884e95e6ae0a685599c8
push id427
push userdholbert@mozilla.com
push dateTue, 13 Jan 2009 20:33:02 +0000
reviewersroc
bugs465928
milestone1.9.1b3pre
Bug 465928 followup: correct typo in enum name - s/PERSERVE/PRESERVE/. No functional changes. r=roc
layout/generic/nsBlockFrame.cpp
layout/generic/nsBlockFrame.h
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -4251,17 +4251,17 @@ nsBlockFrame::HandleOverflowPlaceholders
   }
 
   nsBlockFrame* parent = static_cast<nsBlockFrame*>(frame->GetParent());
   // Remove aFrame and all its next in flows from their parents, but
   // don't destroy the frames.
 #ifdef DEBUG
   nsresult rv =
 #endif
-    parent->DoRemoveFrame(frame, PERSERVE_REMOVED_FRAMES);
+    parent->DoRemoveFrame(frame, PRESERVE_REMOVED_FRAMES);
   NS_ASSERTION(NS_SUCCEEDED(rv), "frame should be in parent's lists");
   
   nsIFrame* lastOverflowPlace = aState.mOverflowPlaceholders.LastChild();
   while (frame) {
     NS_ASSERTION(IsContinuationPlaceholder(frame),
                  "Should only be dealing with continuation placeholders here");
 
     parent = static_cast<nsBlockFrame*>(frame->GetParent());
@@ -5287,17 +5287,17 @@ static nsresult RemoveBlockChild(nsIFram
 {
   if (!aFrame)
     return NS_OK;
 
   nsBlockFrame* nextBlock = nsLayoutUtils::GetAsBlock(aFrame->GetParent());
   NS_ASSERTION(nextBlock,
                "Our child's continuation's parent is not a block?");
   return nextBlock->DoRemoveFrame(aFrame,
-      (aDestroyFrames ? 0 : nsBlockFrame::PERSERVE_REMOVED_FRAMES) |
+      (aDestroyFrames ? 0 : nsBlockFrame::PRESERVE_REMOVED_FRAMES) |
       (aRemoveOnlyFluidContinuations ? 0 : nsBlockFrame::REMOVE_FIXED_CONTINUATIONS));
 }
 
 // This function removes aDeletedFrame and all its continuations.  It
 // is optimized for deleting a whole series of frames. The easy
 // implementation would invoke itself recursively on
 // aDeletedFrame->GetNextContinuation, then locate the line containing
 // aDeletedFrame and remove aDeletedFrame from that line. But here we
@@ -5306,17 +5306,17 @@ static nsresult RemoveBlockChild(nsIFram
 nsresult
 nsBlockFrame::DoRemoveFrame(nsIFrame* aDeletedFrame, PRUint32 aFlags)
 {
   // Clear our line cursor, since our lines may change.
   ClearLineCursor();
 
   nsPresContext* presContext = PresContext();
   if (NS_FRAME_IS_OVERFLOW_CONTAINER & aDeletedFrame->GetStateBits()) {
-    if (!(aFlags & PERSERVE_REMOVED_FRAMES)) {
+    if (!(aFlags & PRESERVE_REMOVED_FRAMES)) {
       nsIFrame* nif = aDeletedFrame->GetNextInFlow();
       if (nif)
         static_cast<nsContainerFrame*>(nif->GetParent())
           ->nsContainerFrame::DeleteNextInFlowChild(presContext, nif,
               (aFlags & FRAMES_ARE_EMPTY) != 0);
       nsresult rv = nsContainerFrame::StealFrame(presContext, aDeletedFrame);
       NS_ENSURE_SUCCESS(rv, rv);
       aDeletedFrame->Destroy();
@@ -5328,35 +5328,35 @@ nsBlockFrame::DoRemoveFrame(nsIFrame* aD
       // continuations; see nsBlockFrame::HandleOverflowPlaceholdersForPulledFrame.
       // If we get rid of placeholder continuations, we can simplify this
       // function by getting rid of that option.
     }
     return NS_OK;
   }
 
   if (aDeletedFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW) {
-    NS_ASSERTION(!(aFlags & PERSERVE_REMOVED_FRAMES),
+    NS_ASSERTION(!(aFlags & PRESERVE_REMOVED_FRAMES),
                  "We can't not destroy out of flows");
     DoRemoveOutOfFlowFrame(aDeletedFrame);
     return NS_OK;
   }
   
   nsIPresShell* presShell = presContext->PresShell();
 
   PRBool isPlaceholder = nsGkAtoms::placeholderFrame == aDeletedFrame->GetType();
   if (isPlaceholder) {
     nsFrameList* overflowPlaceholders = GetOverflowPlaceholders();
     if (overflowPlaceholders && overflowPlaceholders->RemoveFrame(aDeletedFrame)) {
       nsIFrame* nif = aDeletedFrame->GetNextInFlow();
-      if (!(aFlags & PERSERVE_REMOVED_FRAMES)) {
+      if (!(aFlags & PRESERVE_REMOVED_FRAMES)) {
         aDeletedFrame->Destroy();
       } else {
         aDeletedFrame->SetNextSibling(nsnull);
       }
-      return RemoveBlockChild(nif, !(aFlags & PERSERVE_REMOVED_FRAMES),
+      return RemoveBlockChild(nif, !(aFlags & PRESERVE_REMOVED_FRAMES),
                               !(aFlags & REMOVE_FIXED_CONTINUATIONS));
     }
   }
   
   // Find the line and the previous sibling that contains
   // deletedFrame; we also find the pointer to the line.
   nsLineList::iterator line_start = mLines.begin(),
                        line_end = mLines.end();
@@ -5451,17 +5451,17 @@ found_frame:;
         aDeletedFrame->GetNextContinuation() : aDeletedFrame->GetNextInFlow();
 #ifdef NOISY_REMOVE_FRAME
     printf("DoRemoveFrame: %s line=%p frame=",
            searchingOverflowList?"overflow":"normal", line.get());
     nsFrame::ListTag(stdout, aDeletedFrame);
     printf(" prevSibling=%p deletedNextContinuation=%p\n", prevSibling, deletedNextContinuation);
 #endif
 
-    if (aFlags & PERSERVE_REMOVED_FRAMES) {
+    if (aFlags & PRESERVE_REMOVED_FRAMES) {
       aDeletedFrame->SetNextSibling(nsnull);
     } else {
       aDeletedFrame->Destroy();
     }
     aDeletedFrame = deletedNextContinuation;
 
     PRBool haveAdvancedToNextLine = PR_FALSE;
     // If line is empty, remove it now.
@@ -5512,17 +5512,17 @@ found_frame:;
       }
     }
 
     if (deletedNextContinuation) {
       // Continuations for placeholder frames don't always appear in
       // consecutive lines. So for placeholders, just continue the slow easy way.
       if (isPlaceholder) {
         return RemoveBlockChild(deletedNextContinuation,
-                                !(aFlags & PERSERVE_REMOVED_FRAMES),
+                                !(aFlags & PRESERVE_REMOVED_FRAMES),
                                 !(aFlags & REMOVE_FIXED_CONTINUATIONS));
       }
 
       // See if we should keep looking in the current flow's line list.
       if (deletedNextContinuation->GetParent() != this) {
         // The deceased frames continuation is not a child of the
         // current block. So break out of the loop so that we advance
         // to the next parent.
@@ -5562,17 +5562,17 @@ found_frame:;
     line.next()->SetInvalidateTextRuns(PR_TRUE);
   }
 
 #ifdef DEBUG
   VerifyLines(PR_TRUE);
 #endif
 
   // Advance to next flow block if the frame has more continuations
-  return RemoveBlockChild(aDeletedFrame, !(aFlags & PERSERVE_REMOVED_FRAMES),
+  return RemoveBlockChild(aDeletedFrame, !(aFlags & PRESERVE_REMOVED_FRAMES),
                           !(aFlags & REMOVE_FIXED_CONTINUATIONS));
 }
 
 nsresult
 nsBlockFrame::StealFrame(nsPresContext* aPresContext,
                          nsIFrame*      aChild,
                          PRBool         aForceNormal)
 {
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -423,17 +423,17 @@ public:
    * case textruns do not need to be dirtied)
    * -- destroys all removed frames (unless PRESERVE_REMOVED_FRAMES is
    * given)
    * 
    * PRESERVE_REMOVED_FRAMES does NOT work on out of flow frames so
    * don't use it for out of flows.
    */
   enum {
-    PERSERVE_REMOVED_FRAMES    = 0x01,
+    PRESERVE_REMOVED_FRAMES    = 0x01,
     REMOVE_FIXED_CONTINUATIONS = 0x02,
     FRAMES_ARE_EMPTY           = 0x04
   };
   nsresult DoRemoveFrame(nsIFrame* aDeletedFrame, PRUint32 aFlags);
 
   void ReparentFloats(nsIFrame* aFirstFrame,
                       nsBlockFrame* aOldParent, PRBool aFromOverflow,
                       PRBool aReparentSiblings);