mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +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
|
@ -12,6 +12,7 @@ use crate::dom::bindings::str::DOMString;
|
|||
use crate::dom::cssstylesheet::CSSStyleSheet;
|
||||
use crate::dom::element::Element;
|
||||
use crate::dom::medialist::MediaList;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub(crate) struct StyleSheet {
|
||||
|
@ -55,7 +56,9 @@ impl StyleSheetMethods<crate::DomTypeHolder> for StyleSheet {
|
|||
|
||||
// https://drafts.csswg.org/cssom/#dom-stylesheet-media
|
||||
fn Media(&self) -> DomRoot<MediaList> {
|
||||
self.downcast::<CSSStyleSheet>().unwrap().medialist()
|
||||
self.downcast::<CSSStyleSheet>()
|
||||
.unwrap()
|
||||
.medialist(CanGc::note())
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom/#dom-stylesheet-title
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue