mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
Issue #2488 - Part 4: Remove the RestyleManagerHandle smart pointer class
This commit is contained in:
parent
4bf43b8fb4
commit
6803c1f710
24 changed files with 55 additions and 414 deletions
|
|
@ -5,8 +5,7 @@
|
|||
|
||||
#include "mozilla/AnimationCollection.h"
|
||||
|
||||
#include "mozilla/RestyleManagerHandle.h"
|
||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
||||
#include "mozilla/RestyleManager.h"
|
||||
#include "nsAnimationManager.h" // For dom::CSSAnimation
|
||||
#include "nsPresContext.h"
|
||||
#include "nsTransitionManager.h" // For dom::CSSTransition
|
||||
|
|
@ -138,7 +137,7 @@ AnimationCollection<AnimationType>::UpdateCheckGeneration(
|
|||
nsPresContext* aPresContext)
|
||||
{
|
||||
mCheckGeneration =
|
||||
aPresContext->RestyleManager()->AsGecko()->GetAnimationGeneration();
|
||||
aPresContext->RestyleManager()->GetAnimationGeneration();
|
||||
}
|
||||
|
||||
template<class AnimationType>
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@
|
|||
#include "nsAttrValue.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
#include "nsCSSPseudoElements.h"
|
||||
#include "mozilla/RestyleManagerHandle.h"
|
||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
||||
#include "mozilla/RestyleManager.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
|
@ -73,7 +72,7 @@ nsHTMLCSSStyleSheet::ElementRulesMatching(nsPresContext* aPresContext,
|
|||
|
||||
declaration = aElement->GetSMILOverrideStyleDeclaration();
|
||||
if (declaration) {
|
||||
RestyleManager* restyleManager = aPresContext->RestyleManager()->AsGecko();
|
||||
RestyleManager* restyleManager = aPresContext->RestyleManager();
|
||||
if (!restyleManager->SkipAnimationRules()) {
|
||||
// Animation restyle (or non-restyle traversal of rules)
|
||||
// Now we can walk SMIL overrride style, without triggering transitions.
|
||||
|
|
|
|||
|
|
@ -34,8 +34,7 @@
|
|||
#include "mozilla/dom/Element.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "mozilla/OperatorNewExtensions.h"
|
||||
#include "mozilla/RestyleManagerHandle.h"
|
||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
||||
#include "mozilla/RestyleManager.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@
|
|||
#include "nsDisplayList.h"
|
||||
#include "nsStyleChangeList.h"
|
||||
#include "nsStyleSet.h"
|
||||
#include "mozilla/RestyleManagerHandle.h"
|
||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
||||
#include "mozilla/RestyleManager.h"
|
||||
#include "nsDOMMutationObserver.h"
|
||||
|
||||
using mozilla::TimeStamp;
|
||||
|
|
@ -503,7 +502,7 @@ nsTransitionManager::StyleContextChanged(dom::Element *aElement,
|
|||
|
||||
if (collection &&
|
||||
collection->mCheckGeneration ==
|
||||
mPresContext->RestyleManager()->AsGecko()->GetAnimationGeneration()) {
|
||||
mPresContext->RestyleManager()->GetAnimationGeneration()) {
|
||||
// When we start a new transition, we immediately post a restyle.
|
||||
// If the animation generation on the collection is current, that
|
||||
// means *this* is that restyle, since we bump the animation
|
||||
|
|
@ -914,7 +913,7 @@ nsTransitionManager::ConsiderInitiatingTransition(
|
|||
OwningElementRef(*aElement, aNewStyleContext->GetPseudoType()));
|
||||
animation->SetTimelineNoUpdate(timeline);
|
||||
animation->SetCreationSequence(
|
||||
mPresContext->RestyleManager()->AsGecko()->GetAnimationGeneration());
|
||||
mPresContext->RestyleManager()->GetAnimationGeneration());
|
||||
animation->SetEffectFromStyle(pt);
|
||||
animation->PlayFromStyle();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue