style: Animate logical properties.

The setup is that AnimationValue only contains physical properties, and
we physicalize when building keyframes and transitions.

Bug: 1309752
Reviewed-by: birtles
MozReview-Commit-ID: 9dI20N0LFrk
This commit is contained in:
Emilio Cobos Álvarez 2018-07-06 05:19:10 +02:00
parent be9acba801
commit 5504cbdfd7
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 121 additions and 59 deletions

View file

@ -882,6 +882,7 @@ impl<'le> GeckoElement<'le> {
.expect("AnimationValue not found in ElementTransitions");
let property = end_value.id();
debug_assert!(!property.is_logical());
map.insert(property, end_value.clone_arc());
}
map
@ -896,6 +897,7 @@ impl<'le> GeckoElement<'le> {
existing_transitions: &FnvHashMap<LonghandId, Arc<AnimationValue>>,
) -> bool {
use values::animated::{Animate, Procedure};
debug_assert!(!longhand_id.is_logical());
// If there is an existing transition, update only if the end value
// differs.
@ -1657,6 +1659,8 @@ impl<'le> TElement for GeckoElement<'le> {
let transition_property: TransitionProperty = property.into();
let mut property_check_helper = |property: LonghandId| -> bool {
let property =
property.to_physical(after_change_style.writing_mode);
transitions_to_keep.insert(property);
self.needs_transitions_update_per_property(
property,