⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 286732 in webkit


Ignore:
Timestamp:
Dec 8, 2021, 1:26:26 PM (5 years ago)
Author:
Alan Coon
Message:

Cherry-pick r286566. rdar://problem/85928816

Momentum Event Dispatcher: Momentum phase runs backwards with natural scrolling disabled
https://bugs.webkit.org/show_bug.cgi?id=233894
<rdar://problem/86111948>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime): Only flip the deltas if the trackpad is configured to use "natural" scrolling (in which "directionInvertedFromDevice" is true).

(WebKit::MomentumEventDispatcher::computeNextDelta):
Fix initial queue state logging to log both axes before setting the "did log" bit.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286566 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-612.4.2.1-branch/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-612.4.2.1-branch/Source/WebKit/ChangeLog

    r286731 r286732  
     12021-12-06  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r286566. rdar://problem/85928816
     4
     5    Momentum Event Dispatcher: Momentum phase runs backwards with natural scrolling disabled
     6    https://bugs.webkit.org/show_bug.cgi?id=233894
     7    <rdar://problem/86111948>
     8   
     9    Reviewed by Simon Fraser.
     10   
     11    * WebProcess/WebPage/MomentumEventDispatcher.cpp:
     12    (WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime):
     13    Only flip the deltas if the trackpad is configured to use "natural"
     14    scrolling (in which "directionInvertedFromDevice" is true).
     15   
     16    (WebKit::MomentumEventDispatcher::computeNextDelta):
     17    Fix initial queue state logging to log both axes before setting the "did log" bit.
     18   
     19   
     20    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     21
     22    2021-12-06  Tim Horton  <timothy_horton@apple.com>
     23
     24            Momentum Event Dispatcher: Momentum phase runs backwards with natural scrolling disabled
     25            https://bugs.webkit.org/show_bug.cgi?id=233894
     26            <rdar://problem/86111948>
     27
     28            Reviewed by Simon Fraser.
     29
     30            * WebProcess/WebPage/MomentumEventDispatcher.cpp:
     31            (WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime):
     32            Only flip the deltas if the trackpad is configured to use "natural"
     33            scrolling (in which "directionInvertedFromDevice" is true).
     34
     35            (WebKit::MomentumEventDispatcher::computeNextDelta):
     36            Fix initial queue state logging to log both axes before setting the "did log" bit.
     37
    1382021-12-06  Alan Coon  <alancoon@apple.com>
    239
  • branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp

    r286731 r286732  
    307307    m_currentGesture.currentOffset += delta;
    308308
    309     return -delta;
     309    if (m_currentGesture.initiatingEvent->directionInvertedFromDevice())
     310        delta.scale(-1);
     311
     312    return delta;
    310313}
    311314
     
    479482
    480483#if ENABLE(MOMENTUM_EVENT_DISPATCHER_TEMPORARY_LOGGING)
    481         if (!m_currentGesture.didLogInitialQueueState) {
     484        if (!m_currentGesture.didLogInitialQueueState)
    482485            RELEASE_LOG(ScrollAnimations, "MomentumEventDispatcher initial historical deltas: average delta %f, average time %fms, event count %d", averageDelta, averageFrameIntervalMS, count);
    483             m_currentGesture.didLogInitialQueueState = true;
    484         }
    485486#endif
    486487
     
    503504    );
    504505
     506#if ENABLE(MOMENTUM_EVENT_DISPATCHER_TEMPORARY_LOGGING)
     507    m_currentGesture.didLogInitialQueueState = true;
     508#endif
     509
    505510    return { unacceleratedDelta, acceleratedDelta };
    506511}
Note: See TracChangeset for help on using the changeset viewer.