--- breadcrumbs: - - /teams - Teams - - /teams/animations - Animations Team - - /teams/animations/highlights-archive - Highlights Archive page_name: april-2021-vol-2---new-features-testing-stability-fixes-interop-fixes-and-more title: 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 |
|

Composite background-color animation xidachen@ resolved a few issues during this sprint. 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. 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 Finalized Q2 action plans with Payments team (thanks to smcgruer@). Secured public approval from Stripe, and thumbs-up from Mozilla. Moved the proposal to WICG/capability-delegation. Updated/deprecated all related public threads/docs: HTML #4369, #4364. Crbugs: 928838, 9253331, 931966. Docs and repos: repository, design doc, follow-up attempt repo Click as PointerEvent liviutinta@ and mustaq@ collaborated on this work. Identified a regression in older Esri software and APIs which is widely used related to fractional coordinates for click. Disabled the Finch experiment. Kept engaged with developers until the problem is fully resolved. Reached the final decision about what to ship: click/auxclick/contextmenu as pointer events but with integer coordinates. Closed a 5-yr old debate in the Pointerevents spec.

Chapter II: Testing

Scroll-snap: Deflake tests kevers@ deflakes a few scroll-snap tests: 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. 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. Mousewheel: Deflake tests kevers@ also deflakes a few mousewheel tests. There are a few problems with the tests: Several mouse wheel tests are flaking. Focused on percentage-mousewheel-scroll which has highest scroll on flake dashboard. Scroll and wheel events getting dropped. Not differentiating between missed wheel event and incorrect result. Missing test cleanup. The solutions to the above problems are: Set mouse position before triggering synthetic wheel event. Ensure that scroll event is received. Ensure wheel event is received.

Chapter III: Stability fixes Fixed UAF due to promise resolution timing 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

Scroll-snap: Resnap to focused element after layout 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 . Here are the problems: Scroll snap called when a scroll animation ends and on a gesture scroll end. Gesture scroll end delayed in anticipation of additional mousewheel ticks. Results in two directional scrolls, skipping over the nearest snap position. 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

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. 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: Couldn't repro locally until realizing bug was OOPIF-correlated (hint: rainbow layer border) 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.

Chrome Interactions Highlights | April 2021 (Vol. 2) | go/interactions-team