Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2024-04-02 22:57:21 +08:00
commit a944026bae
276 changed files with 1072 additions and 11108 deletions

View file

@ -138,7 +138,7 @@ SVGDocument::EnsureNonSVGUserAgentStyleSheetsLoaded()
}
}
auto cache = nsLayoutStylesheetCache::For(GetStyleBackendType());
auto cache = nsLayoutStylesheetCache::Get();
StyleSheet* sheet = cache->NumberControlSheet();
if (sheet) {

View file

@ -751,7 +751,7 @@ SVGSVGElement::BindToTree(nsIDocument* aDocument,
// Setup the style sheet during binding, not element construction,
// because we could move the root SVG element from the document
// that created it to another document.
auto cache = nsLayoutStylesheetCache::For(doc->GetStyleBackendType());
auto cache = nsLayoutStylesheetCache::Get();
doc->EnsureOnDemandBuiltInUASheet(cache->SVGSheet());
}

View file

@ -54,8 +54,7 @@
#include "nsSMILAnimationController.h"
#include "mozilla/dom/SVGElementBinding.h"
#include "mozilla/Unused.h"
#include "mozilla/RestyleManagerHandle.h"
#include "mozilla/RestyleManagerHandleInlines.h"
#include "mozilla/RestyleManager.h"
using namespace mozilla;
using namespace mozilla::dom;
@ -927,12 +926,9 @@ nsSVGElement::WalkAnimatedContentStyleRules(nsRuleWalker* aRuleWalker)
// whether this is a "no-animation restyle". (This should match the check
// in nsHTMLCSSStyleSheet::RulesMatching(), where we determine whether to
// apply the SMILOverrideStyle.)
RestyleManagerHandle restyleManager =
RestyleManager* restyleManager =
aRuleWalker->PresContext()->RestyleManager();
MOZ_ASSERT(restyleManager->IsGecko(),
"stylo: Servo-backed style system should not be calling "
"WalkAnimatedContentStyleRules");
if (!restyleManager->AsGecko()->SkipAnimationRules()) {
if (!restyleManager->SkipAnimationRules()) {
// update/walk the animated content style rule.
css::StyleRule* animContentStyleRule = GetAnimatedContentStyleRule();
if (!animContentStyleRule) {