mirror of
https://github.com/servo/servo.git
synced 2025-09-29 16:19:14 +01:00
Bug 1325878: Pass the MediaList down to Servo, making <style media> work. r=xidorn
MozReview-Commit-ID: BUCSQJs2CNI Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
482740bb11
commit
ac7bc414d9
14 changed files with 63 additions and 43 deletions
|
@ -42,13 +42,14 @@ impl<'a> Drop for AutoGCRuleTree<'a> {
|
|||
}
|
||||
|
||||
fn parse_rules(css: &str) -> Vec<(StyleSource, CascadeLevel)> {
|
||||
let lock = SharedRwLock::new();
|
||||
let media = Arc::new(lock.wrap(MediaList::empty()));
|
||||
|
||||
let s = Stylesheet::from_str(css,
|
||||
ServoUrl::parse("http://localhost").unwrap(),
|
||||
Origin::Author,
|
||||
MediaList {
|
||||
media_queries: vec![],
|
||||
},
|
||||
SharedRwLock::new(),
|
||||
media,
|
||||
lock,
|
||||
None,
|
||||
&ErrorringErrorReporter);
|
||||
let guard = s.shared_lock.read();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue