mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Implements StyleSheet.media
This commit is contained in:
parent
2af9648235
commit
66223f7596
18 changed files with 16 additions and 980 deletions
|
@ -10,6 +10,7 @@ use crate::dom::bindings::root::{DomRoot, MutNullableDom};
|
|||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::cssrulelist::{CSSRuleList, RulesSource};
|
||||
use crate::dom::element::Element;
|
||||
use crate::dom::medialist::MediaList;
|
||||
use crate::dom::node::{stylesheets_owner_from_node, Node};
|
||||
use crate::dom::stylesheet::StyleSheet;
|
||||
use crate::dom::window::Window;
|
||||
|
@ -100,6 +101,14 @@ impl CSSStyleSheet {
|
|||
pub fn set_origin_clean(&self, origin_clean: bool) {
|
||||
self.origin_clean.set(origin_clean);
|
||||
}
|
||||
|
||||
pub fn medialist(&self) -> DomRoot<MediaList> {
|
||||
MediaList::new(
|
||||
self.global().as_window(),
|
||||
self,
|
||||
self.style_stylesheet().media.clone(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl CSSStyleSheetMethods for CSSStyleSheet {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue