Add base_url and namespaces to style::Stylesheet

This commit is contained in:
Simon Sapin 2016-11-28 16:16:59 +01:00
parent eb7032f6dd
commit 0714e2291c
3 changed files with 35 additions and 23 deletions

View file

@ -100,6 +100,8 @@ impl HTMLMetaElement {
*self.stylesheet.borrow_mut() = Some(Arc::new(Stylesheet {
rules: vec![CssRule::Viewport(Arc::new(RwLock::new(translated_rule)))].into(),
origin: Origin::Author,
base_url: window_from_node(self).get_url(),
namespaces: Default::default(),
media: Default::default(),
// Viewport constraints are always recomputed on resize; they don't need to
// force all styles to be recomputed.