mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
Issue #2112 - Part 6: Remove IsStyledByServo function and callers
This commit is contained in:
parent
a93a7bed47
commit
10bf8705d0
13 changed files with 16 additions and 181 deletions
|
|
@ -2531,51 +2531,3 @@ FragmentOrElement::SetIsElementInStyleScopeFlagOnShadowTree(bool aInStyleScope)
|
|||
shadowRoot->SetIsElementInStyleScopeFlagOnSubtree(aInStyleScope);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
static void
|
||||
AssertDirtyDescendantsBitPropagated(nsINode* aNode)
|
||||
{
|
||||
MOZ_ASSERT(aNode->HasDirtyDescendantsForServo());
|
||||
nsINode* parent = aNode->GetFlattenedTreeParentNode();
|
||||
if (!parent->IsContent()) {
|
||||
MOZ_ASSERT(parent == aNode->OwnerDoc());
|
||||
MOZ_ASSERT(parent->HasDirtyDescendantsForServo());
|
||||
} else {
|
||||
AssertDirtyDescendantsBitPropagated(parent);
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void AssertDirtyDescendantsBitPropagated(nsINode* aNode) {}
|
||||
#endif
|
||||
|
||||
void
|
||||
nsIContent::MarkAncestorsAsHavingDirtyDescendantsForServo()
|
||||
{
|
||||
MOZ_ASSERT(IsInComposedDoc());
|
||||
|
||||
// Get the parent in the flattened tree.
|
||||
nsINode* parent = GetFlattenedTreeParentNode();
|
||||
|
||||
// Loop until we hit a base case.
|
||||
while (true) {
|
||||
|
||||
// Base case: the document.
|
||||
if (!parent->IsContent()) {
|
||||
MOZ_ASSERT(parent == OwnerDoc());
|
||||
parent->SetHasDirtyDescendantsForServo();
|
||||
return;
|
||||
}
|
||||
|
||||
// Base case: the parent is already marked, and therefore
|
||||
// so are all its ancestors.
|
||||
if (parent->HasDirtyDescendantsForServo()) {
|
||||
AssertDirtyDescendantsBitPropagated(parent);
|
||||
return;
|
||||
}
|
||||
|
||||
// Mark the parent and iterate.
|
||||
parent->SetHasDirtyDescendantsForServo();
|
||||
parent = parent->GetFlattenedTreeParentNode();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue