Bug 1343753 - Add Servo_AnimationValue_Uncompute.

MozReview-Commit-ID: KJnVbXmXlug
This commit is contained in:
Boris Chiou 2017-04-12 15:51:42 +08:00
parent 45f20f0bd6
commit 4a1b812ee4
2 changed files with 14 additions and 0 deletions

View file

@ -1716,6 +1716,11 @@ extern "C" {
RawServoAnimationValueBorrowed)
-> bool;
}
extern "C" {
pub fn Servo_AnimationValue_Uncompute(value:
RawServoAnimationValueBorrowed)
-> RawServoDeclarationBlockStrong;
}
extern "C" {
pub fn Servo_ParseStyleAttribute(data: *const nsACString,
extra_data: *mut RawGeckoURLExtraData)

View file

@ -401,6 +401,15 @@ pub extern "C" fn Servo_AnimationValue_DeepEqual(this: RawServoAnimationValueBor
this_value == other_value
}
#[no_mangle]
pub extern "C" fn Servo_AnimationValue_Uncompute(value: RawServoAnimationValueBorrowed)
-> RawServoDeclarationBlockStrong {
let value = AnimationValue::as_arc(&value);
let global_style_data = &*GLOBAL_STYLE_DATA;
Arc::new(global_style_data.shared_lock.wrap(
PropertyDeclarationBlock::with_one(value.uncompute(), Importance::Normal))).into_strong()
}
#[no_mangle]
pub extern "C" fn Servo_StyleSet_GetBaseComputedValuesForElement(raw_data: RawServoStyleSetBorrowed,
element: RawGeckoElementBorrowed,