summaryrefslogtreecommitdiffstats
path: root/layout/base/RestyleManagerBase.h
diff options
context:
space:
mode:
authorwin7-7 <win7-7@users.noreply.github.com>2019-06-26 01:51:45 +0300
committerwin7-7 <win7-7@users.noreply.github.com>2019-06-26 01:51:45 +0300
commit00812e30dfa70f9b1a752cf0d09de00f6d401c85 (patch)
treee7eec9b55dd4e5825d3196f196c7f981be56e17a /layout/base/RestyleManagerBase.h
parentd7359c38b197c221c43def1e24cb48d4aee51bba (diff)
downloadUXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar
UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar.gz
UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar.lz
UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.tar.xz
UXP-00812e30dfa70f9b1a752cf0d09de00f6d401c85.zip
Attach FrameProperties to each frame instead of using a shared hashtable
Dispense the shared hashtable and instead attach the frame property list directly to nsIFrame.
Diffstat (limited to 'layout/base/RestyleManagerBase.h')
-rw-r--r--layout/base/RestyleManagerBase.h13
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