refactor: propagate CanGc arguments through callers (#35591)

Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
Auguste Baum 2025-02-23 01:34:51 +01:00 committed by GitHub
parent 02199520f2
commit b0b0289014
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
74 changed files with 403 additions and 275 deletions

View file

@ -104,6 +104,7 @@ impl CSSRuleList {
idx: u32,
containing_rule_types: CssRuleTypes,
parse_relative_rule_type: Option<CssRuleType>,
can_gc: CanGc,
) -> Fallible<u32> {
let css_rules = if let RulesSource::Rules(ref rules) = self.rules {
rules
@ -135,7 +136,7 @@ impl CSSRuleList {
)?;
let parent_stylesheet = &*self.parent_stylesheet;
let dom_rule = CSSRule::new_specific(window, parent_stylesheet, new_rule);
let dom_rule = CSSRule::new_specific(window, parent_stylesheet, new_rule, can_gc);
self.dom_rules
.borrow_mut()
.insert(index, MutNullableDom::new(Some(&*dom_rule)));
@ -189,6 +190,7 @@ impl CSSRuleList {
self.global().as_window(),
parent_stylesheet,
rules.read_with(&guard).0[idx as usize].clone(),
CanGc::note(),
),
RulesSource::Keyframes(ref rules) => DomRoot::upcast(CSSKeyframeRule::new(
self.global().as_window(),