Bug 1454503: Remove unused nsFrameManager::mIsDestroyingFrames. r?xidorn draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 17 Apr 2018 00:29:24 +0200
changeset 783315 ad083983cdf7602242f36dbf34d03cbacf6b4586
parent 783314 1e1ac88aa7be01128b53a723513450542d43b31f
push id106661
push userbmo:emilio@crisal.io
push dateMon, 16 Apr 2018 22:36:55 +0000
reviewersxidorn
bugs1454503
milestone61.0a1
Bug 1454503: Remove unused nsFrameManager::mIsDestroyingFrames. r?xidorn MozReview-Commit-ID: 4105FqU8Xxm
layout/base/nsFrameManager.cpp
layout/base/nsFrameManager.h
--- a/layout/base/nsFrameManager.cpp
+++ b/layout/base/nsFrameManager.cpp
@@ -97,19 +97,16 @@ nsFrameManager::InsertFrames(nsContainer
     aParentFrame->InsertFrames(aListID, aPrevFrame, aFrameList);
   }
 }
 
 void
 nsFrameManager::RemoveFrame(ChildListID     aListID,
                             nsIFrame*       aOldFrame)
 {
-  bool wasDestroyingFrames = mIsDestroyingFrames;
-  mIsDestroyingFrames = true;
-
   // In case the reflow doesn't invalidate anything since it just leaves
   // a gap where the old frame was, we invalidate it here.  (This is
   // reasonably likely to happen when removing a last child in a way
   // that doesn't change the size of the parent.)
   // This has to sure to invalidate the entire overflow rect; this
   // is important in the presence of absolute positioning
   aOldFrame->InvalidateFrameForRemoval();
 
@@ -123,18 +120,16 @@ nsFrameManager::RemoveFrame(ChildListID 
   nsContainerFrame* parentFrame = aOldFrame->GetParent();
   if (parentFrame->IsAbsoluteContainer() &&
       aListID == parentFrame->GetAbsoluteListID()) {
     parentFrame->GetAbsoluteContainingBlock()->
       RemoveFrame(parentFrame, aListID, aOldFrame);
   } else {
     parentFrame->RemoveFrame(aListID, aOldFrame);
   }
-
-  mIsDestroyingFrames = wasDestroyingFrames;
 }
 
 //----------------------------------------------------------------------
 
 // Capture state for a given frame.
 // Accept a content id here, in some cases we may not have content (scroll position)
 void
 nsFrameManager::CaptureFrameStateFor(nsIFrame* aFrame,
--- a/layout/base/nsFrameManager.h
+++ b/layout/base/nsFrameManager.h
@@ -32,24 +32,21 @@ class nsWindowSizes;
 class nsFrameManager
 {
   typedef mozilla::layout::FrameChildListID ChildListID;
 
 public:
   explicit nsFrameManager(nsIPresShell* aPresShell)
     : mPresShell(aPresShell)
     , mRootFrame(nullptr)
-    , mIsDestroyingFrames(false)
   {
     MOZ_ASSERT(mPresShell, "need a pres shell");
   }
   ~nsFrameManager();
 
-  bool IsDestroyingFrames() const { return mIsDestroyingFrames; }
-
   /*
    * Gets and sets the root frame (typically the viewport). The lifetime of the
    * root frame is controlled by the frame manager. When the frame manager is
    * destroyed, it destroys the entire frame hierarchy.
    */
   nsIFrame* GetRootFrame() const { return mRootFrame; }
   void SetRootFrame(nsIFrame* aRootFrame)
   {
@@ -99,12 +96,11 @@ public:
   void DestroyAnonymousContent(already_AddRefed<nsIContent> aContent);
 
   void AddSizeOfIncludingThis(nsWindowSizes& aSizes) const;
 
 protected:
   // weak link, because the pres shell owns us
   nsIPresShell* MOZ_NON_OWNING_REF mPresShell;
   nsIFrame* mRootFrame;
-  bool mIsDestroyingFrames;  // The frame manager is destroying some frame(s).
 };
 
 #endif