mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
stylo: Add FFI function to make the Stylist realize we have modified style sheets.
This commit is contained in:
parent
11dffa8958
commit
5d75143e8f
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;
|
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]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_StyleSheet_HasRules(raw_sheet: RawServoStyleSheetBorrowed) -> bool {
|
pub extern "C" fn Servo_StyleSheet_HasRules(raw_sheet: RawServoStyleSheetBorrowed) -> bool {
|
||||||
!Stylesheet::as_arc(&raw_sheet).rules.read().0.is_empty()
|
!Stylesheet::as_arc(&raw_sheet).rules.read().0.is_empty()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue