mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Further changes required by Servo
This commit is contained in:
parent
1ddd3b09c2
commit
4df282dab7
2 changed files with 13 additions and 23 deletions
|
@ -21,7 +21,6 @@ use crate::dom::node::{
|
|||
use crate::dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use parking_lot::RwLock;
|
||||
use servo_arc::Arc;
|
||||
use servo_config::pref;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
|
@ -112,15 +111,12 @@ impl HTMLMetaElement {
|
|||
let shared_lock = document.style_shared_lock();
|
||||
let rule = CssRule::Viewport(Arc::new(shared_lock.wrap(translated_rule)));
|
||||
let sheet = Arc::new(Stylesheet {
|
||||
contents: StylesheetContents {
|
||||
rules: CssRules::new(vec![rule], shared_lock),
|
||||
origin: Origin::Author,
|
||||
namespaces: Default::default(),
|
||||
quirks_mode: document.quirks_mode(),
|
||||
url_data: RwLock::new(window_from_node(self).get_url()),
|
||||
source_map_url: RwLock::new(None),
|
||||
source_url: RwLock::new(None),
|
||||
},
|
||||
contents: StylesheetContents::from_shared_data(
|
||||
CssRules::new(vec![rule], shared_lock),
|
||||
Origin::Author,
|
||||
window_from_node(self).get_url(),
|
||||
document.quirks_mode(),
|
||||
),
|
||||
media: Arc::new(shared_lock.wrap(MediaList::empty())),
|
||||
shared_lock: shared_lock.clone(),
|
||||
disabled: AtomicBool::new(false),
|
||||
|
|
|
@ -29,7 +29,6 @@ use net_traits::{
|
|||
FetchMetadata, FetchResponseListener, FilteredMetadata, Metadata, NetworkError, ReferrerPolicy,
|
||||
};
|
||||
use net_traits::{ResourceFetchTiming, ResourceTimingType};
|
||||
use parking_lot::RwLock;
|
||||
use servo_arc::Arc;
|
||||
use servo_url::ImmutableOrigin;
|
||||
use servo_url::ServoUrl;
|
||||
|
@ -41,9 +40,7 @@ use style::parser::ParserContext;
|
|||
use style::shared_lock::{Locked, SharedRwLock};
|
||||
use style::stylesheets::import_rule::ImportSheet;
|
||||
use style::stylesheets::StylesheetLoader as StyleStylesheetLoader;
|
||||
use style::stylesheets::{
|
||||
CssRules, ImportRule, Namespaces, Origin, Stylesheet, StylesheetContents,
|
||||
};
|
||||
use style::stylesheets::{CssRules, ImportRule, Origin, Stylesheet, StylesheetContents};
|
||||
use style::values::CssUrl;
|
||||
|
||||
pub trait StylesheetOwner {
|
||||
|
@ -363,15 +360,12 @@ impl<'a> StyleStylesheetLoader for StylesheetLoader<'a> {
|
|||
media: Arc<Locked<MediaList>>,
|
||||
) -> Arc<Locked<ImportRule>> {
|
||||
let sheet = Arc::new(Stylesheet {
|
||||
contents: StylesheetContents {
|
||||
rules: CssRules::new(Vec::new(), lock),
|
||||
origin: context.stylesheet_origin,
|
||||
url_data: RwLock::new(context.url_data.clone()),
|
||||
quirks_mode: context.quirks_mode,
|
||||
namespaces: RwLock::new(Namespaces::default()),
|
||||
source_map_url: RwLock::new(None),
|
||||
source_url: RwLock::new(None),
|
||||
},
|
||||
contents: StylesheetContents::from_shared_data(
|
||||
CssRules::new(Vec::new(), lock),
|
||||
context.stylesheet_origin,
|
||||
context.url_data.clone(),
|
||||
context.quirks_mode,
|
||||
),
|
||||
media: media,
|
||||
shared_lock: lock.clone(),
|
||||
disabled: AtomicBool::new(false),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue