Add Servo_InheritComputedValues.

This commit is contained in:
Cameron McCormack 2016-05-06 16:01:14 +10:00
parent b29ae6383a
commit 01c42693d4
3 changed files with 31 additions and 13 deletions

View file

@ -342,6 +342,16 @@ pub extern "C" fn Servo_GetComputedValuesForPseudoElement(parent_style: *mut Ser
}
}
#[no_mangle]
pub extern "C" fn Servo_InheritComputedValues(parent_style: *mut ServoComputedValues)
-> *mut ServoComputedValues {
type Helpers = ArcHelpers<ServoComputedValues, GeckoComputedValues>;
Helpers::with(parent_style, |parent| {
let style = GeckoComputedValues::inherit_from(parent);
Helpers::from(style)
})
}
#[no_mangle]
pub extern "C" fn Servo_AddRefComputedValues(ptr: *mut ServoComputedValues) -> () {
type Helpers = ArcHelpers<ServoComputedValues, GeckoComputedValues>;