the Chromium logo

The Chromium Projects

March 2021 - Fixit week, New features, Testing, Interop, Metrics and more!

March 2021 Chrome Interactions Highlights Archives: go/interactions-team-highlights
Chapter I: Updates
<td><td>Una’s Chrome blog post: “<a
href="https://developer.chrome.com/blog/hardware-accelerated-animations/">Updates
in hardware-accelerated animation capabilities</a>”</td></td>

<td><td><a
href="https://twitter.com/ChromiumDev/status/1366422289441566736">Tweet</a>
on Scroll-To...</td></td>
News and headlines imageimage The above pictures show: Bug status update imageimage Our team did an awesome work on bug fixing this sprint...and during perf too! This is likely due to our fixit week effort which is proudly introduced in the next chapter...
Chapter II: Fixit Week!
<td><td>P1s fixed: 4</td></td>

<td><td>P2s fixed: 11</td></td>

<td><td>P3s fixed: 7</td></td>

<td><td>Others (WAIs, dups): 18</td></td>
<td><td>Fixed: 2</td></td>

<td><td>Closed: 6</td></td>

<td><td>Assigned to another team: 1</td></td>
Overall stats Our team had a fixit week during Mar 1~5, and the team made tremendous progress! Bugs we closed: 40 including: Bugs re-triaged: 19 including:
<td><td>Files containing too many subtests triggering timeouts. We cannot
always accelerate the scroll timing. The tests have a 6s budget and can take
3x longer than expected when machines are under load.</td></td>

<td><td>Incorrectly detecting the end of an animation. Waits on a gesture or
key event resolve when queued and not when handled. This can result on the
scroll end being detected before it has even started! To address, we now
wait for scroll events.</td></td>
<td><td>Landed 7 CLs</td></td>

<td><td>Removed 14 lines from test expectations.</td></td>

<td><td>Fixed 10 test files</td></td>

<td><td>Closed 8 bugs</td></td>
<td><td>Using sendkeys instead of keyDown, keyUp</td></td>

    <td><td>Landed 1 <a
    href="https://chromium-review.googlesource.com/c/chromium/src/+/2737916">CL</a>
    that fixed 4 tests.</td></td>

<td><td>Marked in TestExpectations:</td></td>

    <td><td>For <a href="http://crbug.com/893480">crbug.com/893480</a> the
    remaining 8 tests in Test Expectations need implementation keyUp/keyDown
    as it allows for multiple keys pressed at once</td></td>

    <td><td>For <a href="http://crbug.com/1140611">crbug.com/1140611</a>
    there’s “Element click intercepted error” thrown from test driver (2
    tests)</td></td>

<td><td>Few web tests flaky because pointermove coalescing was not taken
into account (1 WIP <a
href="https://chromium-review.googlesource.com/c/chromium/src/+/2745276">CL</a>,
2 tests, 5 related issues)</td></td>
<td><td>They usually have a minimal test case, easy to diagnose</td></td>

<td><td>These are crashes can happen in the real world</td></td>

<td><td>Often times it is due to our coding missing edge cases</td></td>
De-flake scroll snap tests kevers@ focused on deflaking scroll snap tests during fix it week. Here are some common causes of flakes: Outcome: Fix pointer events flaky tests liviutinta@’s focused on pointer events tests marked in TestExpectations file:
Fixing clusterfuzz crashes xidachen@ worked on fixing clusterfuzz crashes: Outcome: Landed 2 CLs and fixed 2 bugs. In additional to that, xidachen@ also closed a few touch-action related bugs.
Chapter III: New features
<td><td><a href="https://github.com/flackr/scroll-to-extension">Source</a>
code is available</td></td>

<td><td>Scrolls to selected element</td></td>

<td><td>Rejects <a
href="https://github.com/WICG/scroll-to-text-fragment/blob/main/EXTENSIONS.md#css-selector-restrictions">restricted
CSS selectors</a></td></td>
<td><td><a
href="https://chromium-review.googlesource.com/c/chromium/src/+/2716656">Calculate
minimum tick interval</a></td></td>

<td><td><a
href="https://chromium-review.googlesource.com/c/chromium/src/+/2730045">Used
in tick rate heuristic</a></td></td>
<td><td>&lt;meta name=”viewport” content=”device-width”&gt;</td></td>

<td><td>&lt;meta name=”viewport” content=”initial-scale=1”&gt; , for any
initial-scale &gt;=1 we’ll disable DTZ</td></td>

<td><td>&lt;meta name=”viewport” content=”minimum-scale=1”&gt;,
minimum-scale &gt;=1 implies initial-scale &gt;= 1</td></td>

<td><td>Combinations of the above</td></td>
Animations in display locked subtrees image kevers@ is working on this performance optimization, which effectively “pause” CSS animations/transitions that are not rendered due to content-visibility, while direct queries must still produce correct results. The above demo shows that animation events stop firing while content is hidden, which is a direct consequence of not updating hidden animations due to the normal passage of time. Calculations requiring a fresh style update are correctly resolved on demand. Composite background-color animation xidachen@ fixed a crash which is due to missing repaint. He is also working on two known problems in order to restart finch experiment. Scroll to element image flackr@ developed a scroll-to extension
Google Meet FPS optimization image zmo@ plumbed minimum tick interval of animations, which requires After the above change, flackr@ found that meet still wasn’t showing 60fps. More investigation shows that meet had incorrect animation. Specifically 0.6s 3 keyframe animation with steps(18) should be 30fps, but 18 animation-timing-function steps is applied between each pair of keyframes. flackr@ is currently working with meet team to further optimize this. Penetrating context menu image selection image The feature is implemented by benwgold@ where flackr@ is an active reviewer. Specifically, this feature allows right click / long press to find images below targeted element. In this demo, an image label element completely covers the image. Without penetrating image selection, one could not save the image without inspecting the page. Disable double tap to zoom liviutinta@ landed CLs disabling DTZ for meta viewport tags such as: The I2S API owners approved, and we have started finch experiment for 50% canary.
Chapter IV: Testing
Move virtual scroll-snap tests The problem with virtual/threaded is that it doesn’t guarantee that scroll snap tests run on the compositor. Thus kevers@ moved the tests to threaded-prefer-compositing, which ensures that the composited path is being used. This change exposed that we had limited testing of scroll snap with composited scrolling and temporarily introduced 7 new entries in the TestExpectations file. These failures have now been addressed. Automate WPT test using testdriver action API image lanwei@ kept working on automate WPT test and making good progress.
Chapter V: Stability fixes kevers@ fixed a problem when running user code (Javascript) that can result in the destruction of an execution context. The solution is to double check if the context is used downstream of script execution.
Chapter VI: Interop fixes
<td><td>The left one is the wrong behavior where the bottom constraint is
ignored.</td></td>

<td><td>The right one shows the correct behavior. Both bottom and top
constraints are used creating reveal and collapse effect.</td></td>
<td><td>Found ~15 google internal sites that might break by the incoming
fix</td></td>

<td><td>Started this <a
href="https://docs.google.com/document/d/1PGBW3PDWTenS8i6-k6Xsv1_MuKxqEfX8o1jVGmxxnFk/edit#">doc</a>,
which provided guidance on how to change their sites to avoid
breakage.</td></td>

<td><td>All google internal sites listed in the doc have made
changes.</td></td>

<td><td>Unfortunately the percentage of sites that might break is not going
down (<a
href="https://uma.googleplex.com/p/chrome/timeline_v2/?sid=29901cc34c7b4b624f5a759bda0b5a34">Beta</a>:
~2.2%, <a
href="https://uma.googleplex.com/p/chrome/timeline_v2/?sid=706cc2310b84fa2bdb3e87b52b1c052b">Stable</a>:
~0.5% of page loads)</td></td>
Sticky interop investigation image flackr@ created meta tracking bug for this. During this sprint, 3 issues were closed. Moreover, a WPT test has been landed to track new spec scrollIntoView behavior. Fixed falsely overconstrained stick positioning imageimage flackr@ fixed a stick position bug. In the above demo:
Overscroll-behavior propagation xidachen@ made some progress towards fixing this bug, which includes Scroll snap behavior with scrollbar arrow keys Resolved the scroll snap behavior for interactions with the scrollbar arrow keys during the last sprint cycle for main thread scrolling. Fixed for composited scrolling this sprint. image
Chapter VII: Metrics
Finch study: Composite relative keyframes kevers@ launched this finch study and collected some meaningful results. image image Finch study: Scroll prediction flackr@ is launching this finch study on behave of a Microsoft engineer. VisualJitter image AverageLagPresentation image Legend (f=# frames): -5ms 0.375f 0.5f 0.625f 1.217ms 3.3ms 5.383ms The data of “VisualJitter” suggests that more prediction means more jitter. The data of “AverageLagPresentation” suggests more prediction increases lag.
Smoothness Metric image lanwei@ explored in the smoothness metric field and did some data analysis.
Chapter VIII: à la carte
<td><td><a
href="https://github.com/w3c/pointerevents/pull/349">Reword/expand
touch-action definition</a></td></td>

    <td><td>Added direct suggestions to clarify that “touch-action:
    manipulation” excludes double-tap zoom.</td></td>

<td><td><a href="https://github.com/w3c/pointerevents/pull/350">Major
refactoring: refer to “direct manipulation” rather than
“touch”</a></td></td>

    <td><td>A long and tricky edit to officially include (some) pen pointers
    in touch-action.</td></td>
PointerEvent spec reviews mustaq@ has almost done reviewing two significant changes from the external spec editor:
Chrome Interactions Highlights | March 2021 go/interactions-team