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
progress</td></td>

<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
based.</td></td>

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

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

    <td><td>timeAnimation.startTime =
    CSSNumericValue.parse(‘-30ms’)</td></td>
<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
href="https://docs.google.com/presentation/d/1ahjM6k4TjGw6Pf_DGg1d7b30xROnav-7vV9ec-6CI1U/edit#slide=id.ge570983615_0_2467">High
Achievement award</a> for fixing the <a
href="https://crbug.com/43170">oldest bug</a>.</td></td>

<td><td>We closed <a
href="https://bugs.chromium.org/p/chromium/issues/list?sort=Pri%20-Stars&x=Status&y=Owner&cells=counts&q=label%3Achrome-fixit-2021%20owner%3Aflackr%2Cgirard%2Ckevers%2Cmustaq%2Cskobes%2Cxidachen%20status%3Afixed%2Cverified%2Cwontfix%2Cduplicate&can=1&colspec=ID%2BPri%2BStars%2BType%2BComponent%2BStatus%2BSummary%2BOwner%2BModified%2BOpened">15
bugs</a> in total:</td></td>

    <td><td>Got rid of bugs with <a href="https://crbug.com/716694">52</a>,
    <a href="https://crbug.com/1148143">37</a>, <a
    href="https://crbug.com/43170">27</a> and <a
    href="https://crbug.com/61574">12</a> stars.</td></td>

    <td><td>Landed code to fix <a
    href="https://bugs.chromium.org/p/chromium/issues/list?sort=Pri%20-Stars&colspec=ID%20Pri%20Stars%20Type%20Component%20Status%20Summary%20Owner%20Modified%20Opened&x=Status&y=Owner&cells=counts&q=label%3Achrome-fixit-2021%20owner%3Aflackr%2Cgirard%2Ckevers%2Cmustaq%2Cskobes%2Cxidachen%20status%3Afixed%2Cverified&can=1">7</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
onload</td></td></td>

<td><td><td>Position mismatch: fixed by allowing for fractional
offset.</td></td></td>

<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
href="https://docs.google.com/document/d/18JIiajErikZaBzCtZvl-wwAJShqZsg0jT9wVyPBhSdU/edit">design
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
semantics</td></td></td>
<td><td><td>Single constructor that takes a KeyframeModel::PropertyId
argument</td></td></td>

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

<td><td><td><a
href="https://chromium-review.googlesource.com/c/chromium/src/+/3060658">Negative
line count CL</a>.</td></td></td>
<td><td><td>Detailed design <a
href="https://docs.google.com/document/d/12g1OLIxZk9ayLNbOI87ru_yoUUWdxcKewDLRR4tqzi8/edit#">doc</a>
here.</td></td></td>

<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
href="https://chromium-review.googlesource.com/c/chromium/src/+/3016115">Part1</a>,
<a
href="https://chromium-review.googlesource.com/c/chromium/src/+/3044499">Part2</a>,
<a
href="https://chromium-review.googlesource.com/c/chromium/src/+/3067315">Part3</a>)</td></td></td>
<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
const.</td></td></td>
<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
href="https://docs.google.com/document/d/1TKjjwFlQGh2LLm0_mOW6FJdmmwyOBMj_fdWJyAJ_Q50/edit?usp=sharing">design
doc</a> in early 2020 didn’t get enough traction for the same
reason.</td></td>

<td><td>We added UMA in late 2020 to slice the problem but got <a
href="https://docs.google.com/presentation/d/1xyyeMLNFFPNlMkulSb_nVvmpOZJ6OpYyE1TNsZvFyZQ/edit#slide=id.ga4b082cc16_1_0">confusing
results</a>.</td></td>

<td><td>We committed to look again in Q3 this year, and coincidentally got
an <a href="http://crbug.com/1233544">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
href="https://chromium-review.googlesource.com/c/chromium/src/+/3046841">CL</a>
plumbed prefers-reduced-motion from blink to compositor and wired it up to
input_proxy_client.cc to disable elastic overscroll (on Android
only)</td></td>
\[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