the Chromium logo

The Chromium Projects

August 2021 - New features, Fixit, Testing, Code health and more!

August 2021 Chrome Interactions Highlights Archives: go/interactions-team-highlights
Chapter I: New features
<td><td>Scroll-timelines are now progress based and not time based. Two
cases where we need to preserve the “progress”:</td></td>

    <td><td>Switching to a scroll timeline while paused</td></td>

    <td><td>Switching from a scroll timeline.</td></td>
<td><td>Augment procedure to include calculation of previous

<td><td>Preserve position.</td></td>
<td><td>The problem with current & start times remaining as doubles is that
it requires inferring a different unit depending on the timeline. Animations
associated with a scroll timeline are progress based and not time

<td><td>This would allow:</td></td>

    <td><td>scrollAnimation.currentTime = CSS.percent(30);</td></td>

    <td><td>timeAnimation.startTime =
<td><td>The above table shows the summary of the result with all platforms
combined, canary + dev channels.</td></td>

<td><td>Note that the blue ones show significant difference, the black ones
are “not significant”.</td></td>
Scroll timeline spec image kevers@ changed the spec for the “setting the timeline of an animation” part. Problem Solution kevers@ is also changing the CSSNumberish current and start times. CSSNumberish is a double or CSSNumericValue, where CSSNumericValue has a value and a unit. Composite BG-color animation image xidachen@ launched the finch study for composite bgcolor animation. The preliminary result looks very positive. Given the positive finch result, we will ship this in M94.
Chapter II: Fixit
<td><td>FixIt organizers are awarding skobes@ with a <a
Achievement award</a> for fixing the <a
href="">oldest bug</a>.</td></td>

<td><td>We closed <a
bugs</a> in total:</td></td>

    <td><td>Got rid of bugs with <a href="">52</a>,
    <a href="">37</a>, <a
    href="">27</a> and <a
    href="">12</a> stars.</td></td>

    <td><td>Landed code to fix <a
    of bugs.</td></td>
Chapter III: Testing
<td><td><td>Timeout: fixed by deferring start until ready</td></td></td>

<td><td><td>Position mismatch: fixed by waiting for scroll event before
checking position</td></td></td>
<td><td><td>Timeout: fixed by deferring start until after

<td><td><td>Position mismatch: fixed by allowing for fractional

<td><td><td>Note this was the top Blink&gt;Scroll flake!</td></td></td>
<td><td><td>Position mismatch: fixed by using established way of determining
scroll thumb position and waiting on scroll event.</td></td></td>
Deflake scrolling tests kevers@ fixed quite a few flaky scrolling tests. mouse-autoscrolling-on-deleted-scrollbar: wheel-scroll-latching-on-scrollbar mouse-scrolling-over-standard-scrollbar Deflake an animation layout test image xidachen@ fixed a top Blink>Animation flake. The root cause is that we do “A==B” when we compare two AnimationTimeDelta, and that the precision issue caused flakiness. The fix is shown above, which is by introducing an epsilon when comparing two AnimationTimeDelta.
Chapter IV: Code Health
<td><td><td>Here is the <a
doc</a> for WTF::HashMap&lt;&gt;::at() refactor.</td></td></td>
<td><td><td>3 public and 1 private constructor. All public versions end up
calling the private constructor</td></td></td>

<td><td><td>Unnecessary if-else construct</td></td></td>

<td><td><td>Opportunity to improve efficiency with move-value
<td><td><td>Single constructor that takes a KeyframeModel::PropertyId

<td><td><td>Add move constructor and move assignment operator to

line count CL</a>.</td></td></td>
<td><td><td>Detailed design <a

<td><td><td>The refactor reduced a middle layer, and made the entire
workflow simpler.</td></td></td>

<td><td><td>Landed 3 CLs. (<a
<td><td><td>Foo::Foo(Foo&& other): other is a temporary object that may have
its contents reset as a result of the move. Note the r-value ref cannot be
<td><td><td>Foo::operator=(Foo&& other): same thing. Other is temporary and
may be reset.</td></td></td>
Remove use of DeprecatedAtOrEmptyValue in animations image kevers@ removed the usage of DeprecatedAtOrEmptyValue in the animations code base. Cleanup of CompositorKeyframeModel constructors kevers@ cleaned up the CompositorKeyframeModel constructors. The issues are: Resolution: Refactor Native PaintWorklet xidachen@ refactor the native paintworklet code. Magic behind move-value kevers@ learned something about std::move. Move constructor Move assignment: Foo foo = CreateExpensiveObject(...) In this case, no std::move is required since RHS is already an r-value. Foo expensive_foo_instance = TakeOwnership(std::move(expensive_foo_instance)); std::move is required to take advantage of move-value semantics since expensive_foo_instance is an l-value. Adding std::move converts to an R-value reference. Useful instead of const & when not able to share an instance but can pass ownership. Further reading. See also pkastings C++ 201 talks.
Chapter V: Stability/security fixes
<td><td>The problem was known 3+ years ago, and we got the security bug 2+
years ago.</td></td>

<td><td>We posted solution ideas but compat risks held us back. Our <a
doc</a> in early 2020 didn’t get enough traction for the same

<td><td>We added UMA in late 2020 to slice the problem but got <a

<td><td>We committed to look again in Q3 this year, and coincidentally got
an <a href="">escalation</a> from fbeaufort@ and the
Media team just in time!</td></td>

<td><td>Brainstorming in early Q3 by mustaq@, flackr@ and rdcronin@ led us
to a solid plan, finally!</td></td>
Fake user activation from Extension Messaging Interactions team and Extension team together made a concrete plan about an old P1 security issue with fake user activation (Issue 957553). Here is a brief history to see why this is important:
Chapter VI: à la carte
<td><td>This <a
plumbed prefers-reduced-motion from blink to compositor and wired it up to to disable elastic overscroll (on Android
\[Scroll Unification\] Scheduling investigation skobes@ investigated on the scheduling improvements for scroll unification. image image Less motion, plz! Remove animations option in settings disables a lot of system animations including stretch overscroll. In Chrome, remove animations sets prefers-reduce-motion:
Chapter VII: Bug Updates image image Our team lost a bit of ground in P2s && P3s, but kept the P1s in check.
Chrome Interactions Highlights | August 2021 go/interactions-team