Changeset 286810 in webkit
- Timestamp:
- Dec 9, 2021, 3:19:32 PM (5 years ago)
- Location:
- branches/safari-612.4.2.1-branch/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
WebProcess/WebPage/MomentumEventDispatcher.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612.4.2.1-branch/Source/WebKit/ChangeLog
r286735 r286810 1 2021-12-09 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r286805. rdar://problem/86291413 4 5 Momentum Generator: Scroll tail hiccup only when scrolling up on 60Hz displays 6 https://bugs.webkit.org/show_bug.cgi?id=234104 7 <rdar://problem/86291413> 8 9 Reviewed by Simon Fraser. 10 11 * WebProcess/WebPage/MomentumEventDispatcher.cpp: 12 (WebKit::MomentumEventDispatcher::equalizeTailGaps): 13 Sort in the correct direction based on the sign of the first delta... 14 15 16 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286805 268f45cc-cd09-0410-ab3c-d52691b4dbfc 17 18 2021-12-09 Tim Horton <timothy_horton@apple.com> 19 20 Momentum Generator: Scroll tail hiccup only when scrolling up on 60Hz displays 21 https://bugs.webkit.org/show_bug.cgi?id=234104 22 <rdar://problem/86291413> 23 24 Reviewed by Simon Fraser. 25 26 * WebProcess/WebPage/MomentumEventDispatcher.cpp: 27 (WebKit::MomentumEventDispatcher::equalizeTailGaps): 28 Sort in the correct direction based on the sign of the first delta... 29 1 30 2021-12-08 Alan Coon <alancoon@apple.com> 2 31 -
branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp
r286734 r286810 415 415 auto& table = m_currentGesture.tailDeltaTable; 416 416 size_t initialTableSize = table.size(); 417 if (!initialTableSize) 418 return; 417 419 418 420 enum Axis { Horizontal, Vertical }; … … 430 432 firstZeroIndex[Vertical] = i; 431 433 } 432 433 if (auto index = firstZeroIndex[Horizontal]) 434 std::sort(deltas[Horizontal].begin(), std::next(deltas[Horizontal].begin(), index)); 435 if (auto index = firstZeroIndex[Vertical]) 436 std::sort(deltas[Vertical].begin(), std::next(deltas[Vertical].begin(), index)); 434 435 auto sortDeltas = [&] (Axis axis) { 436 if (!firstZeroIndex[axis]) 437 return; 438 439 if (deltas[axis][0] > 0) 440 std::sort(deltas[axis].begin(), std::next(deltas[axis].begin(), firstZeroIndex[axis]), std::greater<float>()); 441 else 442 std::sort(deltas[axis].begin(), std::next(deltas[axis].begin(), firstZeroIndex[axis]), std::less<float>()); 443 }; 444 445 sortDeltas(Horizontal); 446 sortDeltas(Vertical); 437 447 438 448 // GapSize is a count of contiguous frames with zero deltas.
Note:
See TracChangeset
for help on using the changeset viewer.