mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
refactor: propagate CanGc arguments through callers (#35591)
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
parent
02199520f2
commit
b0b0289014
74 changed files with 403 additions and 275 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue