mirror of
https://github.com/servo/servo.git
synced 2025-06-13 10:54:29 +00:00
Bug 1331291 part 1 - Set stylesheet url_data correctly for import rule.
This commit is contained in:
parent
1b07730323
commit
cdc537f23e
10 changed files with 18 additions and 16 deletions
|
@ -147,7 +147,7 @@ impl CSSStyleOwner {
|
|||
match *self {
|
||||
CSSStyleOwner::Element(ref el) => window_from_node(&**el).Document().base_url(),
|
||||
CSSStyleOwner::CSSRule(ref rule, _) => {
|
||||
rule.parent_stylesheet().style_stylesheet().url_data.clone()
|
||||
(*rule.parent_stylesheet().style_stylesheet().url_data.read()).clone()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ use dom::node::{Node, UnbindContext, document_from_node, window_from_node};
|
|||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use parking_lot::RwLock;
|
||||
use servo_config::prefs::PREFS;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
|
@ -105,7 +106,7 @@ impl HTMLMetaElement {
|
|||
rules: CssRules::new(vec![rule], shared_lock),
|
||||
origin: Origin::Author,
|
||||
shared_lock: shared_lock.clone(),
|
||||
url_data: window_from_node(self).get_url(),
|
||||
url_data: RwLock::new(window_from_node(self).get_url()),
|
||||
namespaces: Default::default(),
|
||||
media: Arc::new(shared_lock.wrap(MediaList::empty())),
|
||||
// Viewport constraints are always recomputed on resize; they don't need to
|
||||
|
|
|
@ -160,7 +160,7 @@ impl FetchResponseListener for StylesheetContext {
|
|||
&data,
|
||||
protocol_encoding_label,
|
||||
Some(environment_encoding),
|
||||
&final_url,
|
||||
final_url,
|
||||
Some(&loader),
|
||||
win.css_error_reporter());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue