diff options
author | Moonchild <moonchild@palemoon.org> | 2019-07-03 15:17:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-03 15:17:08 +0000 |
commit | 0e54a032624b4ce23a959454047bfd504a734cc0 (patch) | |
tree | 6e19e55c35095548177db6fb9e5fbabe2aff2310 /layout/base/RestyleManagerBase.h | |
parent | 8ea1f38f9c55a076dade47eaf0daaea27590d179 (diff) | |
parent | 3051056bbb0b41b8258d91e44a4ff8ec33a98d8f (diff) | |
download | UXP-0e54a032624b4ce23a959454047bfd504a734cc0.tar UXP-0e54a032624b4ce23a959454047bfd504a734cc0.tar.gz UXP-0e54a032624b4ce23a959454047bfd504a734cc0.tar.lz UXP-0e54a032624b4ce23a959454047bfd504a734cc0.tar.xz UXP-0e54a032624b4ce23a959454047bfd504a734cc0.zip |
Merge pull request #1151 from win7-7/FrameProperties
Attach FrameProperties to each frame instead of using a shared hashtable
Diffstat (limited to 'layout/base/RestyleManagerBase.h')
-rw-r--r-- | layout/base/RestyleManagerBase.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/layout/base/RestyleManagerBase.h b/layout/base/RestyleManagerBase.h index f81f5e73f..d92c3d1f7 100644 --- a/layout/base/RestyleManagerBase.h +++ b/layout/base/RestyleManagerBase.h @@ -72,6 +72,11 @@ public: // WillDestroyFrameTree hasn't been called yet. void NotifyDestroyingFrame(nsIFrame* aFrame) { mOverflowChangedTracker.RemoveFrame(aFrame); + // If ProcessRestyledFrames is tracking frames which have been + // destroyed (to avoid re-visiting them), add this one to its set. + if (mDestroyedFrames) { + mDestroyedFrames->PutEntry(aFrame); + } } // Note: It's the caller's responsibility to make sure to wrap a @@ -127,6 +132,12 @@ private: nsPresContext* mPresContext; // weak, can be null after Disconnect(). uint32_t mRestyleGeneration; uint32_t mHoverGeneration; + + // Used to keep track of frames that have been destroyed during + // ProcessRestyledFrames, so we don't try to touch them again even if + // they're referenced again later in the changelist. + mozilla::UniquePtr<nsTHashtable<nsPtrHashKey<const nsIFrame>>> mDestroyedFrames; + // True if we're already waiting for a refresh notification. bool mObservingRefreshDriver; @@ -146,7 +157,7 @@ protected: GetNearestAncestorFrame(nsIContent* aContent); static nsIFrame* - GetNextBlockInInlineSibling(FramePropertyTable* aPropTable, nsIFrame* aFrame); + GetNextBlockInInlineSibling(nsIFrame* aFrame); /** * Get the next continuation or similar ib-split sibling (assuming |