Bug 1329200: Remove unused FrameManager global generation counter. r?xidorn
MozReview-Commit-ID: AXkaZYxpK2y
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -8751,17 +8751,16 @@ nsCSSFrameConstructor::BeginUpdate() {
"Someone forgot a script blocker");
nsRootPresContext* rootPresContext =
mPresShell->GetPresContext()->GetRootPresContext();
if (rootPresContext) {
rootPresContext->IncrementDOMGeneration();
}
- ++sGlobalGenerationNumber;
#ifdef DEBUG
++mUpdateCount;
#endif
}
void
nsCSSFrameConstructor::EndUpdate()
{
--- a/layout/base/nsFrameManager.cpp
+++ b/layout/base/nsFrameManager.cpp
@@ -830,10 +830,8 @@ RemoveUndisplayedEntry(PLHashEntry* he,
}
void
nsFrameManagerBase::UndisplayedMap::Clear(void)
{
mLastLookup = nullptr;
PL_HashTableEnumerateEntries(mTable, RemoveUndisplayedEntry, 0);
}
-
-uint32_t nsFrameManagerBase::sGlobalGenerationNumber;
--- a/layout/base/nsFrameManagerBase.h
+++ b/layout/base/nsFrameManagerBase.h
@@ -40,33 +40,21 @@ public:
*/
nsIFrame* GetRootFrame() const { return mRootFrame; }
void SetRootFrame(nsIFrame* aRootFrame)
{
NS_ASSERTION(!mRootFrame, "already have a root frame");
mRootFrame = aRootFrame;
}
- static uint32_t GetGlobalGenerationNumber() { return sGlobalGenerationNumber; }
-
protected:
class UndisplayedMap;
// weak link, because the pres shell owns us
nsIPresShell* MOZ_NON_OWNING_REF mPresShell;
nsIFrame* mRootFrame;
PLDHashTable mPlaceholderMap;
UndisplayedMap* mUndisplayedMap;
UndisplayedMap* mDisplayContentsMap;
bool mIsDestroyingFrames; // The frame manager is destroying some frame(s).
-
- // The frame tree generation number
- // We use this to avoid unnecessary screenshotting
- // on Android. Unfortunately, this is static to match
- // the single consumer which is also static. Keeping
- // this the same greatly simplifies lifetime issues and
- // makes sure we always using the correct number.
- // A per PresContext generation number is available
- // via nsPresContext::GetDOMGeneration
- static uint32_t sGlobalGenerationNumber;
};
#endif
--- a/layout/base/nsPresContext.h
+++ b/layout/base/nsPresContext.h
@@ -1536,19 +1536,16 @@ public:
* Increment DOM-modification generation counter to indicate that
* the DOM has changed in a way that might lead to style changes/
* reflows/frame creation and destruction.
*/
void IncrementDOMGeneration() { mDOMGeneration++; }
/**
* Get the current DOM generation counter.
- *
- * See nsFrameManagerBase::GetGlobalGenerationNumber() for a
- * global generation number.
*/
uint32_t GetDOMGeneration() { return mDOMGeneration; }
/**
* Add a runnable that will get called before the next paint. They will get
* run eventually even if painting doesn't happen. They might run well before
* painting happens.
*/