the Chromium logo

The Chromium Projects

April 2021 (Vol. 2) - New features, Testing, Stability fixes, Interop fixes and more!

April 2021 (Vol. 2) Chrome Interactions Highlights Archives: go/interactions-team-highlights
Chapter I: New features
<td><td>Finalized <a
href="https://docs.google.com/document/d/1VQiJBo_hBfgKfHN3lZnhHbs9ws74TCu5i-__y8_mdBU/edit?usp=sharing">Q2
action plans</a> with Payments team (thanks to smcgruer@).</td></td>

<td><td>Secured public approval from <a
href="https://discourse.wicg.io/t/capability-delegation/4821/3">Stripe</a>,
and thumbs-up from <a
href="https://github.com/w3c/mediacapture-screen-share/issues/167#issuecomment-821290060">Mozilla</a>.</td></td>

<td><td>Moved the proposal to <a
href="https://github.com/WICG/capability-delegation">WICG/capability-delegation</a>.</td></td>

<td><td>Updated/deprecated all related public threads/docs: HTML <a
href="https://github.com/whatwg/html/pull/4369">#4369</a>, <a
href="https://github.com/whatwg/html/issues/4364">#4364</a>. Crbugs: <a
href="https://crbug.com/928838">928838</a>, <a
href="https://crbug.com/925331">9253331</a>, <a
href="https://crbug.com/931966">931966</a>. Docs and repos: <a
href="https://github.com/mustaqahmed/user-activation-delegation">repository</a>,
<a
href="https://docs.google.com/document/d/1NKLJ2MBa9lA_FKRgD2ZIO7vIftOJ_YiXXMYfRMdlV-s/edit?usp=sharing">design
doc</a>, <a
href="https://github.com/mustaqahmed/autoplay-delegation/">follow-up attempt
repo</a></td></td>
<td><td>Identified a regression in older <a
href="https://bugs.chromium.org/p/chromium/issues/detail?id=1192449#c31">Esri
software and APIs</a> which is widely used related to fractional coordinates
for click.</td></td>

<td><td>Disabled the <a
href="https://critique-ng.corp.google.com/cl/369699904">Finch
experiment</a>. Kept <a href="https://crbug.com/1192449">engaged</a> with
developers until the problem is fully resolved.</td></td>

<td><td>Reached the <a
href="https://groups.google.com/a/chromium.org/g/blink-dev/c/bta50W_Hg24/m/YAYeAzCZAAAJ">final
decision</a> about what to ship: click/auxclick/contextmenu as pointer
events but with integer coordinates.</td></td>

<td><td>Closed a 5-yr old debate in the <a
href="https://github.com/w3c/pointerevents/issues/100">Pointerevents
spec</a>.</td></td>
Composite background-color animation xidachen@ resolved a few issues during this sprint. image The first one is completely decouple paint and compositing, which is shown in the above diagram. Specifically, we were passing a boolean from paint to the compositing stage and that could introduce technical debt in the future. Now we no longer require that boolean. The second issue is to handle non-visible animations, which can happen in many cases such as an animation on a zero-sized element. There are a lot of discussions here, and we eventually decided that it is OK to composite these no-op background-color animations. The problem is fixed by this CL. Fixing this issue also helped resolving an existing CSS paint worklet bug which no-op animation. image The third issue is handling non-replace keyframes. As shown in the above code snippets, we should not look at the composite mode of the animation, but rather look at the composite mode of each keyframe. This is resolved by this CL. Capability Delegation moved to WICG mustaq@ made awesome progress during this sprint, which includes Click as PointerEvent liviutinta@ and mustaq@ collaborated on this work.
Chapter II: Testing
<td><td>The first set is snaps-after-scrollbar-scrolling-\*. The problem is
rare TIMEOUTs. The solution is to accelerate animation timing. Fixes main
thread testings only.</td></td>

<td><td>The second is scrollend-event-fired-after-snap. The test fails due
to incorrect event ordering. The solution is to reset to prevent scroll end
during test reset from being triggered as an end before scroll is
finished.</td></td>
<td><td>Several mouse wheel tests are flaking.</td></td>

<td><td>Focused on <a
href="https://source.chromium.org/chromium/chromium/src/+/HEAD:third_party/blink/web_tests/fast/scrolling/percentage-mousewheel-scroll.html;l=1;drc=e51dd5c377fd47393a171f6bdcd7c1a6a9a609c5?q=percentage-mousewheel-scroll&sq=&ss=chromium%2Fchromium%2Fsrc">percentage-mousewheel-scroll</a>
which has highest scroll on flake dashboard.</td></td>

<td><td>Scroll and wheel events getting dropped.</td></td>

<td><td>Not differentiating between missed wheel event and incorrect
result.</td></td>

<td><td>Missing test cleanup.</td></td>
<td><td>Set mouse position before triggering synthetic wheel
event.</td></td>

<td><td>Ensure that scroll event is received.</td></td>

<td><td>Ensure wheel event is received.</td></td>
Scroll-snap: Deflake tests kevers@ deflakes a few scroll-snap tests: Mousewheel: Deflake tests kevers@ also deflakes a few mousewheel tests. There are a few problems with the tests: The solutions to the above problems are:
Chapter III: Stability fixes Fixed UAF due to promise resolution timing image flackr@ fixed a UAF problem. Specifically, we were synchronously resolving ready promise during RunPaintLifecyclePhase. Since promise resolution already handles forbidden script context by posting a task so the solution was to wrap UpdateAnimations call in ScriptForbiddenScope. We move ScriptForbiddenScope to entire lifecycle with explicit exceptions for locations where we expect/handle script execution.
Chapter IV: Interop fixes
<td><td>Scroll snap called when a scroll animation ends and on a gesture
scroll end.</td></td>

<td><td>Gesture scroll end delayed in anticipation of additional mousewheel
ticks.</td></td>

<td><td>Results in two directional scrolls, skipping over the nearest snap
position.</td></td>
Scroll-snap: Resnap to focused element after layout image The problem is that when snapping, multiple candidates can be equal distance from the origin of the snapport. If one of these candidates is focused, it should be snapped after a relayout. The solution is to make whether the element is focused a tiebreaker when selecting a snap target. Scroll-snap: mousewheel scrolls skipped snap positions image. Here are the problems: The solution is to snap only on animation end. The next steps are initiate snap at gesture scroll begin for mousewheel scrolls.
Chapter V: Bug Updates
<td><td>Couldn't repro locally until realizing bug was OOPIF-correlated
(hint: rainbow layer border)</td></td>

<td><td>Slow-scrollers can contain or be inside non-scrolling layer-promoted
elements. Therefore, we need to check slow-scroll region on EVERY layer that
is hit, not just the one in front.</td></td>
image image Our team had a sizable influx at the start of this sprint. Great efforts were made to stabilize the amount of bugs and even keep P1 bug number drop. image image skobes@ fixed a scroll unification bug (crbug.com/1155655). Symptom: can't scroll sub-scroller in iframe. Root cause: compositor thread hit testing had an early exit if it saw no scrolling layers, which did not check for slow-scroll regions. Extra challenges:
Chrome Interactions Highlights | April 2021 (Vol. 2) go/interactions-team