mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
refactor: add CanGc as argument to methods in CSSKeyframeRule, CSSMediaRule, CSSRule (#35796)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
parent
78f7d525cc
commit
16aeeaec85
7 changed files with 30 additions and 17 deletions
|
@ -52,13 +52,13 @@ impl CSSMediaRule {
|
|||
)
|
||||
}
|
||||
|
||||
fn medialist(&self) -> DomRoot<MediaList> {
|
||||
fn medialist(&self, can_gc: CanGc) -> DomRoot<MediaList> {
|
||||
self.medialist.or_init(|| {
|
||||
MediaList::new(
|
||||
self.global().as_window(),
|
||||
self.cssconditionrule.parent_stylesheet(),
|
||||
self.mediarule.media_queries.clone(),
|
||||
CanGc::note(),
|
||||
can_gc,
|
||||
)
|
||||
})
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ impl SpecificCSSRule for CSSMediaRule {
|
|||
|
||||
impl CSSMediaRuleMethods<crate::DomTypeHolder> for CSSMediaRule {
|
||||
// https://drafts.csswg.org/cssom/#dom-cssgroupingrule-media
|
||||
fn Media(&self) -> DomRoot<MediaList> {
|
||||
self.medialist()
|
||||
fn Media(&self, can_gc: CanGc) -> DomRoot<MediaList> {
|
||||
self.medialist(can_gc)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue