the Chromium logo

The Chromium Projects

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
<td><td>Document has some global state for display locks.</td></td>

<td><td>Added time of last lock update</td></td>

<td><td>Use time of last lock update to determine if locally cached lock
state is stale.</td></td>

<td><td>Unblocks remaining steps in developing the feature. (<a
href="https://docs.google.com/document/d/1Enj8nD-y2vgCp2A6-M2QFoUKf1-nxMX023ervOoXi50/edit?usp=sharing">Design
doc</a>)</td></td>
<td><td>The first finch study had a lot of crashes, xidachen@ <a
href="https://chromium-review.googlesource.com/c/chromium/src/+/2675160">landed</a>
fix for that.</td></td>

<td><td>The second finch try crashed a small number of users, xidachen@ <a
href="https://chromium-review.googlesource.com/c/chromium/src/+/2692609">landed</a>
fix.</td></td>

<td><td>Currently, there are two known problems, and we are actively working
to resolve them.</td></td>
<td><td>Here is a <a
href="https://docs.google.com/document/d/1iz0YdNKHpcObTe3UrM7uY6fsGv8xOlwY35m5dZzIoR8/edit">doc</a>
that describes how to detect different types of main-thread animations from
traces. And here is a sample <a
href="https://drive.google.com/file/d/1IdObZMCYRMraUIYcM5RSQo2L9u2Uhqw9/view?usp=sharing&resourcekey=0-rTeQ2zu0ajWxMtGGhFAKng">video</a>
of output.</td></td>
<td><td>Bug hunting - no bugs identified.</td></td>

<td><td>Expanded finch experiment to 10% stable.</td></td>

<td><td>Landed Accessibility click <a
href="https://chromium-review.googlesource.com/c/chromium/src/+/2679278">CL</a>,
part of which was relevant to Click as pointer event.</td></td>
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: Composite background-color animation image xidachen@ landed some CLs to complete the implementation for this feature, and then started a finch experiment.
Animation Validation xidachen@ worked on validating main-thread animation detection logic, as part of the core web-vitals effort. Impulse animations image image 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.
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. image image
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 image image 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
<td><td>Added pointer events up/down.</td></td>

<td><td>Populated mouse events coordinates appropriately.</td></td>

<td><td>Cleaned up the code by using SimulatedClickCreationScope as argument
for <a
href="https://source.chromium.org/chromium/chromium/src/+/HEAD:third_party/blink/renderer/core/dom/element.h;drc=763c071aa91f87c5e404edff98bc5bac8075d4a1;l=600">Element::AccessKeyAction</a>
instead of bool send_mouse_events to clarify where the simulated click
originates from</td></td>

<td><td>Added wpt tests for clicks from accesskey and clicks from
enter/space keys to ensure interop</td></td>
<td><td>In the code shown above, the Create() function does more than what
the name applies!</td></td>

<td><td>Regression has been fixed, a test has been added.</td></td>
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: Pointer lock: pointerrawupdate coordinate jumps image musta@ discovered a regression due to a code “improvement”.
Chrome Interactions Highlights | February 2021 go/interactions-team