style: Use the same computed time representation between Servo and Gecko

Same as above.

Differential Revision: https://phabricator.services.mozilla.com/D167126
This commit is contained in:
Emilio Cobos Álvarez 2023-01-19 10:06:38 +00:00 committed by Martin Robinson
parent b96f8f748c
commit fe8cdbe328
3 changed files with 14 additions and 13 deletions

View file

@ -858,7 +858,7 @@ impl<'le> GeckoElement<'le> {
fn needs_transitions_update_per_property(
&self,
longhand_id: LonghandId,
combined_duration: f32,
combined_duration_seconds: f32,
before_change_style: &ComputedValues,
after_change_style: &ComputedValues,
existing_transitions: &FxHashMap<LonghandId, Arc<AnimationValue>>,
@ -884,7 +884,7 @@ impl<'le> GeckoElement<'le> {
debug_assert_eq!(to.is_some(), from.is_some());
combined_duration > 0.0f32 &&
combined_duration_seconds > 0.0f32 &&
from != to &&
from.unwrap()
.animate(
@ -1533,7 +1533,7 @@ impl<'le> TElement for GeckoElement<'le> {
transitions_to_keep.insert(physical_longhand);
if self.needs_transitions_update_per_property(
physical_longhand,
after_change_ui_style.transition_combined_duration_at(transition_property.index),
after_change_ui_style.transition_combined_duration_at(transition_property.index).seconds(),
before_change_style,
after_change_style,
&existing_transitions,