mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
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:
commit
8412008525
1 changed files with 6 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue