mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add RwLock in more Arc’d things in stylesheets.
This commit is contained in:
parent
9e3cf3189b
commit
742681a623
9 changed files with 250 additions and 334 deletions
|
@ -16,6 +16,7 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::htmlheadelement::HTMLHeadElement;
|
||||
use dom::node::{Node, UnbindContext, document_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use parking_lot::RwLock;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::sync::Arc;
|
||||
use string_cache::Atom;
|
||||
|
@ -80,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(translated_rule))],
|
||||
rules: vec![CSSRule::Viewport(Arc::new(RwLock::new(translated_rule)))],
|
||||
origin: Origin::Author,
|
||||
media: None,
|
||||
// Viewport constraints are always recomputed on resize; they don't need to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue