Bug 1454503: Remove unused nsFrameManager::mIsDestroyingFrames. r=xidorn
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 17 Apr 2018 00:29:24 +0200
changeset 467620 617ce8cb79fbf444b207e840a89cd1b67f5baab1
parent 467619 761677ac644f072389c1ea4ada13d1db90dbc9c3
child 467621 e2b49506d98cfc7dba7a15ce28e9c4b35a8328ed
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1454503
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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