Teams‎ > ‎Animations Team‎ > ‎Highlights Archive‎ > ‎

May 2021 - New features, Testing, Stability fixes, Interop fixes and more!


May  2021


Chrome Interactions Highlights

Archives: go/interactions-team-highlights






Chapter I: New features


Scroll Timeline Documentation

kevers@ started a doc for I2S and devrel. The doc provides skeleton examples that highlights the use cases of scroll timelines and demonstrate the API.

  • Parallax scrolling (from polyfill demo)

  • Animating elements as they transition into or out of the viewport (from CSSWG issue)

  • Auto-resizing header (bram.us)

  • Scrollable picture story, which makes use of paint worklets.


Populating Touch click/contextmenu pointer id and pointer type

liviutinta@: click/contextmenu event from touch is triggered from GestureManager and there was no way to map a GestureEvents sequence to the corresponding PointerEvents sequence in order to obtain the pointerId associated to the PointerEvents sequence. The solution was to populate the unique touch event id of the first gesture in the GestureEvents sequence as the primary unique touch event id for all the GestureEvents in the sequence. This primary unique touch event id is then mapped to the unique touch event id of the pointerdown pointer event. When handling pointerdown, PointerEventManager would notify GestureManager about pointerdown’s unique touch event id and its pointer id, and in turn GestureManager would keep track of the association until the corresponding GestureEvent (for click or contextmenu) would be handled in order to populate the pointerId of the triggered click/contextmenu event.


Chapter II: Testing


Scroll-snap: Deflake tests

kevers@ deflakes a set of scroll-snap tests:

  • touch-scrolling-on-root-scrollbar-thumb: The problem is scroll gesture before ready and assert right after gesture. The solution is to use waitForCompositorCommit and scroll promise.

  • scrollend-event-fired-to-*: The problems with these tests are scroll gesture before ready, no cleanup and logic errors in listeners. The fix is to use waitForCompositorCommit, add cleanup and use scroll promise.

  • fractional-scroll-height-chaining: The problem here is scroll gesture before ready, non-deterministic mouse position and rAF based wait. The solution is to use waitForCompositorCommit, mouseClickOn and waitForScrollEnd.

  • mousewheel-scroll: The problem is non-deterministic mouse position and rAF based wait. The solution is to use mouseMove and waitForScrollEnd.


Fix scroll-unification tests

kevers@ also fixes some tests with scroll-unification enabled.

  • scrollbar-drag-thumb-with-large-content: the problem is scroll gesture before ready, and the solution is to use waitForCompositorCommit.

  • scrollbar-added-during-drag: The problem is scroll gesture before ready and single rAF before asserts. The solution is to use waitForCompositorCommit and scroll promise.


Fix single-thread mode with scroll-unification

skobes@ fixed scheduling in single-thread mode, which is the default mode for web tests.

  • SetNeedsAnimationInput wasn't actually scheduling the animation, which caused tests with scroll gestures and scroll animations to hang


Chapter III: Stability fixes


Fix numeric overflow in CompositorKeyframeModel

kevers@ fixes a numeric overflow problem. The root cause is that AnimationTimeDelta is backed by a double whereas TimeDelta backed by 64-bit signed int. Using unsafe conversion from AnimationTimeDelta to TimeDelta, which can result in a numeric overflow.

The solution is to Update CheckCanStartAnimationOnCompositor to reject compositing an animation if currentTime is too large.  Advancing current time by a few hundred years is just fine though.

SVG smil animation in throughput metrics

Before

After

xidachen@ fixed an issue where SVG smil animation is not counted as main thread animation in the throughput metrics.


The above demo shows that before the fix, there is no sample detected in Graphics.Smoothness.PercentDroppedFrames.MainThreadAnimations, while it is detected after the fix.



Chapter IV: Interop fixes


flackr@ fixed the metrics for counting overscroll-behavior potential breakage.

  • Before: we will hit a UMA recording whenever the overscroll-behavior property is different comparing the html and body element.

  • After: we’d hit a UMA recording only if the body is the viewport defining element, and that the overscroll-behavior property is different comparing the html and body element.


Chapter V: Bug Updates


 

Our team closed fewer bugs this sprint, but we did get a chance to have a bunch of great conversations at Blinkon... The rate of incoming bugs was relatively consistent.







Chrome Interactions Highlights | May 2021


go/interactions-team



Comments