Auto merge of #14625 - heycam:sheets-changed, r=upsuper

stylo: Add FFI function to make the Stylist realize we have modified style sheets.

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14625)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-12-18 21:49:28 -08:00 committed by GitHub
commit 8412008525

View file

@ -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()