style: Unify how servo and Gecko handle UA sheets.

This commit is contained in:
Emilio Cobos Álvarez 2017-09-14 13:10:29 +02:00
parent 2cbd27c83a
commit 0a9309aa96
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
11 changed files with 122 additions and 161 deletions

View file

@ -945,8 +945,9 @@ pub extern "C" fn Servo_StyleSet_MediumFeaturesChanged(
*viewport_units_used = data.stylist.device().used_viewport_size();
}
data.stylist.device_mut().reset_computed_values();
let guards = StylesheetGuards::same(&guard);
let origins_in_which_rules_changed =
data.stylist.media_features_change_changed_style(&guard);
data.stylist.media_features_change_changed_style(&guards);
// We'd like to return `OriginFlags` here, but bindgen bitfield enums don't
// work as return values with the Linux 32-bit ABI at the moment because
@ -964,8 +965,9 @@ pub extern "C" fn Servo_StyleSet_SetDevice(
let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut();
let device = Device::new(pres_context);
let guards = StylesheetGuards::same(&guard);
let origins_in_which_rules_changed =
data.stylist.set_device(device, &guard);
data.stylist.set_device(device, &guards);
// We'd like to return `OriginFlags` here, but bindgen bitfield enums don't
// work as return values with the Linux 32-bit ABI at the moment because