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

February 2021: New Features, Testing, Stability Fixes, Code Health and more!



February  2021


Chrome Interactions Highlights

Archives: go/interactions-team-highlights






Chapter I: New Features


Content-visible CSS animations & transitions

kevers@ has been working on this feature and fixed some problems.


Problem 1: Wasteful to run animations on hidden content (content-visibility hidden or auto + offscreen). 

Problem 2: Wasteful to check each frame if the conditions apply.

Solution:

  • Document has some global state for display locks.

  • Added time of last lock update

  • Use time of last lock update to determine if locally cached lock state is stale.

  • Unblocks remaining steps in developing the feature. (Design doc)

Composite background-color animation

xidachen@ landed some CLs to complete the implementation for this feature, and then started a finch experiment.

  • The first finch study had a lot of crashes, xidachen@ landed fix for that.

  • The second finch try crashed a small number of users, xidachen@ landed fix.

  • Currently, there are two known problems, and we are actively working to resolve them.

Animation Validation

xidachen@ worked on validating main-thread animation detection logic, as part of the core web-vitals effort.

  • Here is a doc that describes how to detect different types of main-thread animations from traces. And here is a sample video of output.

Impulse animations

 

flackr@ supported arakeri@microsoft.com to implement this feature, which has a faster initial impulse when scrolling. This is shipped in M90.


Click/Auxclick as pointer event

liviutinta@ made some great progress in this sprint.

  • Bug hunting - no bugs identified.

  • Expanded finch experiment to 10% stable.

  • Landed Accessibility click CL, part of which was relevant to Click as pointer event.



Chapter II: Testing


Deflaking tests

In order to fix some flaky tests, kevers@ made some changes to gesture_utils.js.  Work was already underway to replace use of waitForAnimationEnd with waitForAnimationEndTimeBased. 


The problem with the former method is that the timeout is expressed in animation frames and for our fast tests these trigger every 1ms instead of the usual 16ms.  


The later method is a step in the right direction, but tends to flake when test machines are under load.  The reason for this is that the timing starts when the gesture event is queued and not when scrolling begins. Also, since we snap after the initial scroll completes, we are queued up a second smooth scroll, which can timeout while queued. 


A third approach, waitForScrollEnd, is being introduced to address these problems. This method can also deprecate the waitFor method (same timeout issue as waitForAnimationEnd).  By using scroll events, we avoid flakes due to queuing delays and handle chaining of scroll events better, while at the same time tests complete  faster by avoiding unnecessary waits once the target position has been reached. 


TestDriver Action API

lanwei@ kept improving the TestDriver action API and made more WPT tests automatic.


The following two pictures show the wpt dashboard for the TestDriver action API.


Chapter III: Stability Fixes


Fixed crash in set current time

xidachen@ fixed a crash when the timeline time is Infinity or -Infinity and that timeline is attached to an animation. The solution is to special case when the current time is Infinity or -Infinity.


Fixed crash in null animation timeline

The problem occurs when we set an animation timeline where its previous timeline is null. xidachen@ resolved this by loosing the condition of some DCHECKs to ensure that we can handle the case where the previous timeline is null.



Prevent user from exiting fullscreen

mustaq@ fixed this issue which has complicated initial repro and that misguided our initial investigation. mustaq@ spent hours to narrow down the root cause, and it is due to the print dialog on another tab halts the main thread. Moreover, now we have a minimal repro of 12 lines of HTML + JS.


Fixed crash length interpolation

The crash happens when the “from” and “to” value of the interpolation is interpreted as Infinity. xidachen@ fixed it by only DCHECKing when the interpreted value is finite.


Chapter IV: Code Health

   

Our team holds ground on P1 bugs. In terms of bug tracking, we switched the y axis from “issues” to “bugs”, which more accurately reflects goals to improve product excellence.



Chapter V: Miscellaneous



Tabs

girard@ started this Tabs One-Pager, and a lot of people are contributing to it now.

flackr@ and nsull@ took a first pass at an explainer.

Disable double tap to zoom for mobile viewport

liuviutinta@ has a CL in review, and still working on writing tests for Andriod.

Accessibility click indistinguishable from real click

liviutinta@ landed a CL to fix this bug. The fix included:

  • Added pointer events up/down.

  • Populated mouse events coordinates appropriately.

  • Cleaned up the code by using SimulatedClickCreationScope as argument for Element::AccessKeyAction instead of bool send_mouse_events to clarify where the simulated click originates from

  • Added wpt tests for clicks from accesskey and clicks from enter/space keys to ensure interop

Pointer lock: pointerrawupdate coordinate jumps 

musta@ discovered a regression due to a code “improvement”.

  • In the code shown above, the Create() function does more than what the name applies!

  • Regression has been fixed, a test has been added.







Chrome Interactions Highlights | February 2021


go/interactions-team



Comments