servo: Merge #14625 - stylo: Add FFI function to make the Stylist realize we have modified style sheets (from heycam:sheets-changed); r=upsuper

Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1324341 by @upsuper.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8412008525192455e4f3411a482c546a04bf6c72
This commit is contained in:
Cameron McCormack 2016-12-18 21:49:28 -08:00
Родитель c60dd0aef1
Коммит f80e775024
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -318,6 +318,12 @@ pub extern "C" fn Servo_StyleSet_RemoveStyleSheet(raw_data: RawServoStyleSetBorr
data.stylesheets_changed = true;
}
#[no_mangle]
pub extern "C" fn Servo_StyleSet_NoteStyleSheetsChanged(raw_data: RawServoStyleSetBorrowed) {
let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut();
data.stylesheets_changed = true;
}
#[no_mangle]
pub extern "C" fn Servo_StyleSheet_HasRules(raw_sheet: RawServoStyleSheetBorrowed) -> bool {
!Stylesheet::as_arc(&raw_sheet).rules.read().0.is_empty()