mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Move Arc<RwLock<_>> out from CssRules tuple
This commit is contained in:
parent
40917e7991
commit
599eb1c9f0
9 changed files with 58 additions and 62 deletions
|
@ -24,7 +24,7 @@ use std::sync::Arc;
|
|||
use std::sync::atomic::AtomicBool;
|
||||
use style::attr::AttrValue;
|
||||
use style::str::HTML_SPACE_CHARACTERS;
|
||||
use style::stylesheets::{Stylesheet, CssRule, Origin};
|
||||
use style::stylesheets::{Stylesheet, CssRule, CssRules, Origin};
|
||||
use style::viewport::ViewportRule;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -98,7 +98,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)))].into(),
|
||||
rules: CssRules::new(vec![CssRule::Viewport(Arc::new(RwLock::new(translated_rule)))]),
|
||||
origin: Origin::Author,
|
||||
base_url: window_from_node(self).get_url(),
|
||||
namespaces: Default::default(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue