mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
moebius#138: Optimize operations on root of deeply-nested frame tree
https://github.com/MoonchildProductions/moebius/pull/138
This commit is contained in:
parent
02f3024a9c
commit
85692a1198
23 changed files with 651 additions and 40 deletions
|
|
@ -1844,6 +1844,24 @@ Element::UnbindFromTree(bool aDeep, bool aNullParent)
|
|||
SetParentIsContent(false);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
// If we can get access to the PresContext, then we sanity-check that
|
||||
// we're not leaving behind a pointer to ourselves as the PresContext's
|
||||
// cached provider of the viewport's scrollbar styles.
|
||||
if (document) {
|
||||
nsIPresShell* presShell = document->GetShell();
|
||||
if (presShell) {
|
||||
nsPresContext* presContext = presShell->GetPresContext();
|
||||
if (presContext) {
|
||||
MOZ_ASSERT(this !=
|
||||
presContext->GetViewportScrollbarStylesOverrideNode(),
|
||||
"Leaving behind a raw pointer to this node (as having "
|
||||
"propagated scrollbar styles) - that's dangerous...");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Ensure that CSS transitions don't continue on an element at a
|
||||
// different place in the tree (even if reinserted before next
|
||||
// animation refresh).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue