Changeset 286805 in webkit
- Timestamp:
- Dec 9, 2021, 3:01:05 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
WebProcess/WebPage/MomentumEventDispatcher.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r286800 r286805 1 2021-12-09 Tim Horton <timothy_horton@apple.com> 2 3 Momentum Generator: Scroll tail hiccup only when scrolling up on 60Hz displays 4 https://bugs.webkit.org/show_bug.cgi?id=234104 5 <rdar://problem/86291413> 6 7 Reviewed by Simon Fraser. 8 9 * WebProcess/WebPage/MomentumEventDispatcher.cpp: 10 (WebKit::MomentumEventDispatcher::equalizeTailGaps): 11 Sort in the correct direction based on the sign of the first delta... 12 1 13 2021-12-09 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp
r286671 r286805 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.