Changeset 287997 in webkit


Ignore:
Timestamp:
Jan 13, 2022 3:44:28 PM (6 months ago)
Author:
timothy_horton@apple.com
Message:

Sometimes cannot scroll after using internal trackpad
https://bugs.webkit.org/show_bug.cgi?id=235206
<rdar://problem/87274541>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp:

(WebKit::MomentumEventDispatcher::didStartMomentumPhase):
(WebKit::MomentumEventDispatcher::setScrollingAccelerationCurve):

  • WebProcess/WebPage/MomentumEventDispatcher.h:

We store std::optional<ScrollingAccelerationCurve> in a map, but then
when looking at whether we have a curve (to decide whether or not to even
use MomentumEventDispatcher), we check if the map has *any* value for the
given page... even an unengaged optional. To fix, check if the optional is engaged.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r287995 r287997  
     12022-01-13  Tim Horton  <timothy_horton@apple.com>
     2
     3        Sometimes cannot scroll after using internal trackpad
     4        https://bugs.webkit.org/show_bug.cgi?id=235206
     5        <rdar://problem/87274541>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * WebProcess/WebPage/MomentumEventDispatcher.cpp:
     10        (WebKit::MomentumEventDispatcher::didStartMomentumPhase):
     11        (WebKit::MomentumEventDispatcher::setScrollingAccelerationCurve):
     12        * WebProcess/WebPage/MomentumEventDispatcher.h:
     13        We store std::optional<ScrollingAccelerationCurve> in a map, but then
     14        when looking at whether we have a curve (to decide whether or not to even
     15        use MomentumEventDispatcher), we check if the map has *any* value for the
     16        given page... even an unengaged optional. To fix, check if the optional is engaged.
     17
    1182022-01-13  Per Arne Vollan  <pvollan@apple.com>
    219
  • trunk/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp

    r287641 r287997  
    6060        return false;
    6161
    62     if (!m_accelerationCurves.contains(pageIdentifier)) {
     62    auto curveIterator = m_accelerationCurves.find(pageIdentifier);
     63    if (curveIterator == m_accelerationCurves.end() || !curveIterator->value) {
    6364        RELEASE_LOG(ScrollAnimations, "MomentumEventDispatcher not using synthetic momentum phase: no acceleration curve");
    6465        return false;
Note: See TracChangeset for help on using the changeset viewer.