Arc all Vec<CSSRule>s, put in CSSRules type

This commit is contained in:
Manish Goregaokar 2016-11-11 23:56:53 -08:00
parent ef74d8da3b
commit 2220fcdc0b
3 changed files with 18 additions and 10 deletions

View file

@ -81,7 +81,7 @@ impl HTMLMetaElement {
if !content.is_empty() {
if let Some(translated_rule) = ViewportRule::from_meta(&**content) {
*self.stylesheet.borrow_mut() = Some(Arc::new(Stylesheet {
rules: vec![CssRule::Viewport(Arc::new(RwLock::new(translated_rule)))],
rules: vec![CssRule::Viewport(Arc::new(RwLock::new(translated_rule)))].into(),
origin: Origin::Author,
media: Default::default(),
// Viewport constraints are always recomputed on resize; they don't need to