mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Rename add_computed_property_value to append_computed_property_value.
We don't need to pass index to the function any more.
This commit is contained in:
parent
b155b1b83a
commit
d10f3a8ae8
1 changed files with 14 additions and 15 deletions
|
@ -2188,13 +2188,13 @@ pub extern "C" fn Servo_AssertTreeIsClean(root: RawGeckoElementBorrowed) {
|
||||||
assert_subtree_is_clean(root);
|
assert_subtree_is_clean(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn add_computed_property_value(keyframe: *mut structs::Keyframe,
|
fn append_computed_property_value(keyframe: *mut structs::Keyframe,
|
||||||
index: usize,
|
|
||||||
style: &ComputedValues,
|
style: &ComputedValues,
|
||||||
property: &TransitionProperty,
|
property: &TransitionProperty,
|
||||||
shared_lock: &SharedRwLock) {
|
shared_lock: &SharedRwLock) {
|
||||||
let block = style.to_declaration_block(property.clone().into());
|
let block = style.to_declaration_block(property.clone().into());
|
||||||
unsafe {
|
unsafe {
|
||||||
|
let index = (*keyframe).mPropertyValues.len();
|
||||||
(*keyframe).mPropertyValues.set_len((index + 1) as u32);
|
(*keyframe).mPropertyValues.set_len((index + 1) as u32);
|
||||||
(*keyframe).mPropertyValues[index].mProperty = property.into();
|
(*keyframe).mPropertyValues[index].mProperty = property.into();
|
||||||
// FIXME. Bug 1360398: Do not set computed values once we handles
|
// FIXME. Bug 1360398: Do not set computed values once we handles
|
||||||
|
@ -2234,15 +2234,12 @@ fn fill_in_missing_keyframe_values(all_properties: &[TransitionProperty],
|
||||||
};
|
};
|
||||||
|
|
||||||
// Append properties that have not been set at this offset.
|
// Append properties that have not been set at this offset.
|
||||||
let mut index = unsafe { (*keyframe).mPropertyValues.len() };
|
|
||||||
for ref property in all_properties.iter() {
|
for ref property in all_properties.iter() {
|
||||||
if !properties_set_at_offset.has_transition_property_bit(property) {
|
if !properties_set_at_offset.has_transition_property_bit(property) {
|
||||||
add_computed_property_value(keyframe,
|
append_computed_property_value(keyframe,
|
||||||
index,
|
|
||||||
style,
|
style,
|
||||||
property,
|
property,
|
||||||
shared_lock);
|
shared_lock);
|
||||||
index += 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2306,9 +2303,11 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName(raw_data: RawServoStyleSetB
|
||||||
// to represent that all properties animated by the keyframes
|
// to represent that all properties animated by the keyframes
|
||||||
// animation should be set to the underlying computed value for
|
// animation should be set to the underlying computed value for
|
||||||
// that keyframe.
|
// that keyframe.
|
||||||
for (index, property) in animation.properties_changed.iter().enumerate() {
|
for property in animation.properties_changed.iter() {
|
||||||
add_computed_property_value(
|
append_computed_property_value(keyframe,
|
||||||
keyframe, index, style, property, &global_style_data.shared_lock);
|
style,
|
||||||
|
property,
|
||||||
|
&global_style_data.shared_lock);
|
||||||
}
|
}
|
||||||
if current_offset == 0.0 {
|
if current_offset == 0.0 {
|
||||||
has_complete_initial_keyframe = true;
|
has_complete_initial_keyframe = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue