mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Bug 1298588 part 4, servo piece. Recreate the default computed values for a document as needed. r=bholley
This commit is contained in:
parent
34bb2f1e6c
commit
a5ac55c8ff
2 changed files with 14 additions and 0 deletions
|
@ -1160,6 +1160,12 @@ extern "C" {
|
|||
pub fn Servo_StyleSet_Init(pres_context: RawGeckoPresContextBorrowed)
|
||||
-> RawServoStyleSetOwned;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_StyleSet_RecomputeDefaultStyles(set:
|
||||
RawServoStyleSetBorrowed,
|
||||
pres_context:
|
||||
RawGeckoPresContextBorrowed);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_StyleSet_AppendStyleSheet(set: RawServoStyleSetBorrowed,
|
||||
sheet: RawServoStyleSheetBorrowed,
|
||||
|
|
|
@ -608,6 +608,14 @@ pub extern "C" fn Servo_StyleSet_Init(pres_context: RawGeckoPresContextBorrowed)
|
|||
data.into_ffi()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_StyleSet_RecomputeDefaultStyles(
|
||||
raw_data: RawServoStyleSetBorrowed,
|
||||
pres_context: RawGeckoPresContextBorrowed) {
|
||||
let mut data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut();
|
||||
data.default_computed_values = ComputedValues::default_values(pres_context);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_StyleSet_Drop(data: RawServoStyleSetOwned) -> () {
|
||||
let _ = data.into_box::<PerDocumentStyleData>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue