mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Bug 1325878: Create less hardcoded nsMediaList instances. r=xidorn
MozReview-Commit-ID: K6T3MM1ZrFb Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
2483541fb9
commit
fbd4049e46
1 changed files with 9 additions and 0 deletions
|
@ -1197,7 +1197,16 @@ pub extern "C" fn Servo_MediaList_Create() -> RawServoMediaListStrong {
|
|||
|
||||
let global_style_data = &*GLOBAL_STYLE_DATA;
|
||||
Arc::new(global_style_data.shared_lock.wrap(MediaList::default())).into_strong()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_MediaList_Matches(list: RawServoMediaListBorrowed,
|
||||
raw_data: RawServoStyleSetBorrowed)
|
||||
-> bool {
|
||||
let per_doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow();
|
||||
read_locked_arc(list, |list: &MediaList| {
|
||||
list.evaluate(&per_doc_data.stylist.device)
|
||||
})
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue