mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Allow empty media query list
And make empty list the default value of MediaList. This commit also removes Option wrapper of Stylesheet.media because a stylesheet should always have an associated media query list.
This commit is contained in:
parent
a91f48ee05
commit
5dfcb07f6a
7 changed files with 23 additions and 23 deletions
|
@ -83,7 +83,7 @@ impl HTMLMetaElement {
|
|||
*self.stylesheet.borrow_mut() = Some(Arc::new(Stylesheet {
|
||||
rules: vec![CSSRule::Viewport(Arc::new(RwLock::new(translated_rule)))],
|
||||
origin: Origin::Author,
|
||||
media: None,
|
||||
media: Default::default(),
|
||||
// Viewport constraints are always recomputed on resize; they don't need to
|
||||
// force all styles to be recomputed.
|
||||
dirty_on_viewport_size_change: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue