Issue #2488 - Part 4: Remove the RestyleManagerHandle smart pointer class

This commit is contained in:
FranklinDM 2024-03-29 16:08:08 +08:00 committed by roytam1
commit 6803c1f710
24 changed files with 55 additions and 414 deletions

View file

@ -40,8 +40,7 @@
#include "nsCSSRules.h"
#include "nsPrintfCString.h"
#include "nsIFrame.h"
#include "mozilla/RestyleManagerHandle.h"
#include "mozilla/RestyleManagerHandleInlines.h"
#include "mozilla/RestyleManager.h"
#include "nsQueryObject.h"
#include <inttypes.h>
@ -1755,7 +1754,7 @@ nsStyleSet::ResolveStyleWithoutAnimation(dom::Element* aTarget,
pseudoType == CSSPseudoElementType::before ||
pseudoType == CSSPseudoElementType::after,
"unexpected type for animations");
RestyleManager* restyleManager = PresContext()->RestyleManager()->AsGecko();
RestyleManager* restyleManager = PresContext()->RestyleManager();
bool oldSkipAnimationRules = restyleManager->SkipAnimationRules();
restyleManager->SetSkipAnimationRules(true);
@ -2235,7 +2234,7 @@ nsStyleSet::ReparentStyleContext(nsStyleContext* aStyleContext,
CSSPseudoElementType pseudoType = aStyleContext->GetPseudoType();
nsRuleNode* ruleNode = aStyleContext->RuleNode();
NS_ASSERTION(!PresContext()->RestyleManager()->AsGecko()->SkipAnimationRules(),
NS_ASSERTION(!PresContext()->RestyleManager()->SkipAnimationRules(),
"we no longer handle SkipAnimationRules()");
nsRuleNode* visitedRuleNode = nullptr;
@ -2515,5 +2514,5 @@ nsStyleSet::ClearSelectors()
if (!mRuleTree) {
return;
}
PresContext()->RestyleManager()->AsGecko()->ClearSelectors();
PresContext()->RestyleManager()->ClearSelectors();
}