Result of animating css-logical properties is not deterministic |
|||
Issue description
StyleResolver::ApplyAnimatedStandardProperties applies active interpolations by iterating the contents of a HashMap. This means that the application order of interpolations isn't defined, and will vary according to the return value of PropertyHandle::GetHash.
This is a problem for tests like wpt/css/css-logical/animation-001.html, which expects animations like the following to have a stable result:
element.animate({
marginLeft: '200px',
marginInline: '100px'
},
{ duration: 1000, easing: 'step-start' });
Currently in Blink, the computed value for 'margin-left' will either be "100px", or "200px", depending on how entries appear in the HashMap.
I'm not sure if this is a spec issue for css-logical, or if we should change the application of animated values to be deterministic (or both).
,
Dec 10
The test claims that "Physical longhands win over logical shorthands" but is this true? css-logical has a passage that the overriding behavior is not determined based on whether the propery is physical or logical which seems to contradict the test [1] In either case, I don't think the indeterministic behavior is correct. I am marking this Hotlist-polish since it seems like a bug in Blink regardless of whether the test is correct or not. [1] See https://drafts.csswg.org/css-logical/#box "A computed value that has flow-relative and physical properties as input is determined by applying the CSS cascade to declarations of both. Overriding is not determined by whether a declaration is flow-relative or physical, but only by the rules of the CSS cascade"
,
Dec 10
Hey, test reviewer here :) That test is based on: https://drafts.csswg.org/web-animations/#calculating-computed-keyframes In particular: > If conflicts arise when expanding shorthand properties or replacing logical properties with physical propertiess, apply the following rules in order until the conflict is resolved: > > [...] > > Physical properties override logical properties.
,
Dec 11
Thanks majidvp, emilio. Then this definitely looks like a bug in Blink ...
,
Dec 15
Yes, logical properties are not interpolated properly in CSS Animations nor Web Animations. I already filed issue 873101, but I only fixed the CSS Transitions case, the other ones are trickier. |
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Dec 10