Skip to content

Commit

Permalink
Bug 1335942 - Part 1: Introduce mozilla::AnimationValue. r=manishearth
Browse files Browse the repository at this point in the history
Use AnimationValue to wrap StyleAnimationValue and RawServoAnimationValue.
  • Loading branch information
BorisChiou committed Feb 8, 2017
1 parent e2b494b commit c7dc3e4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
9 changes: 7 additions & 2 deletions components/style/gecko_bindings/structs_debug.rs
Expand Up @@ -5152,10 +5152,15 @@ pub mod root {
pub struct ContainerLayerParameters([u8; 0]);
#[repr(C)]
#[derive(Debug)]
pub struct AnimationValue {
pub mGecko: root::mozilla::StyleAnimationValue,
pub mServo: root::RefPtr<root::RawServoAnimationValue>,
}
#[repr(C)]
#[derive(Debug)]
pub struct PropertyStyleAnimationValuePair {
pub mProperty: root::nsCSSPropertyID,
pub mValue: root::mozilla::StyleAnimationValue,
pub mServoValue: root::RefPtr<root::RawServoAnimationValue>,
pub mValue: root::mozilla::AnimationValue,
}
#[test]
fn bindgen_test_layout_PropertyStyleAnimationValuePair() {
Expand Down
9 changes: 7 additions & 2 deletions components/style/gecko_bindings/structs_release.rs
Expand Up @@ -5068,10 +5068,15 @@ pub mod root {
pub struct ContainerLayerParameters([u8; 0]);
#[repr(C)]
#[derive(Debug)]
pub struct AnimationValue {
pub mGecko: root::mozilla::StyleAnimationValue,
pub mServo: root::RefPtr<root::RawServoAnimationValue>,
}
#[repr(C)]
#[derive(Debug)]
pub struct PropertyStyleAnimationValuePair {
pub mProperty: root::nsCSSPropertyID,
pub mValue: root::mozilla::StyleAnimationValue,
pub mServoValue: root::RefPtr<root::RawServoAnimationValue>,
pub mValue: root::mozilla::AnimationValue,
}
#[test]
fn bindgen_test_layout_PropertyStyleAnimationValuePair() {
Expand Down
2 changes: 1 addition & 1 deletion ports/geckolib/glue.rs
Expand Up @@ -253,7 +253,7 @@ pub extern "C" fn Servo_AnimationValues_Populate(anim: RawGeckoAnimationValueLis
// and thus can't directly use `geckoiter`
let local_geckoiter = &mut geckoiter;
for (gecko, servo) in local_geckoiter.zip(&mut iter) {
gecko.mServoValue.set_arc_leaky(Arc::new(servo));
gecko.mValue.mServo.set_arc_leaky(Arc::new(servo));
}
}

Expand Down

0 comments on commit c7dc3e4

Please sign in to comment.