Bug 1454503: Remove unused nsFrameManager::mIsDestroyingFrames. r?xidorn
MozReview-Commit-ID: 4105FqU8Xxm
--- 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