Title: [286863] branches/safari-613.1.11-branch/Source/WebKit
- Revision
- 286863
- Author
- alanc...@apple.com
- Date
- 2021-12-10 11:26:14 -0800 (Fri, 10 Dec 2021)
Log Message
Cherry-pick r286805. rdar://problem/86331680
Momentum Generator: Scroll tail hiccup only when scrolling up on 60Hz displays
https://bugs.webkit.org/show_bug.cgi?id=234104
<rdar://problem/86291413>
Reviewed by Simon Fraser.
* WebProcess/WebPage/MomentumEventDispatcher.cpp:
(WebKit::MomentumEventDispatcher::equalizeTailGaps):
Sort in the correct direction based on the sign of the first delta...
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613.1.11-branch/Source/WebKit/ChangeLog (286862 => 286863)
--- branches/safari-613.1.11-branch/Source/WebKit/ChangeLog 2021-12-10 19:21:12 UTC (rev 286862)
+++ branches/safari-613.1.11-branch/Source/WebKit/ChangeLog 2021-12-10 19:26:14 UTC (rev 286863)
@@ -1,3 +1,32 @@
+2021-12-10 Russell Epstein <repst...@apple.com>
+
+ Cherry-pick r286805. rdar://problem/86331680
+
+ Momentum Generator: Scroll tail hiccup only when scrolling up on 60Hz displays
+ https://bugs.webkit.org/show_bug.cgi?id=234104
+ <rdar://problem/86291413>
+
+ Reviewed by Simon Fraser.
+
+ * WebProcess/WebPage/MomentumEventDispatcher.cpp:
+ (WebKit::MomentumEventDispatcher::equalizeTailGaps):
+ Sort in the correct direction based on the sign of the first delta...
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-12-09 Tim Horton <timothy_hor...@apple.com>
+
+ Momentum Generator: Scroll tail hiccup only when scrolling up on 60Hz displays
+ https://bugs.webkit.org/show_bug.cgi?id=234104
+ <rdar://problem/86291413>
+
+ Reviewed by Simon Fraser.
+
+ * WebProcess/WebPage/MomentumEventDispatcher.cpp:
+ (WebKit::MomentumEventDispatcher::equalizeTailGaps):
+ Sort in the correct direction based on the sign of the first delta...
+
2021-12-08 Russell Epstein <repst...@apple.com>
Cherry-pick r286671. rdar://problem/86226565
Modified: branches/safari-613.1.11-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp (286862 => 286863)
--- branches/safari-613.1.11-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp 2021-12-10 19:21:12 UTC (rev 286862)
+++ branches/safari-613.1.11-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp 2021-12-10 19:26:14 UTC (rev 286863)
@@ -408,6 +408,8 @@
auto& table = m_currentGesture.tailDeltaTable;
size_t initialTableSize = table.size();
+ if (!initialTableSize)
+ return;
enum Axis { Horizontal, Vertical };
Vector<float> deltas[2];
@@ -423,12 +425,20 @@
if (!firstZeroIndex[Vertical] && !table[i].height())
firstZeroIndex[Vertical] = i;
}
-
- if (auto index = firstZeroIndex[Horizontal])
- std::sort(deltas[Horizontal].begin(), std::next(deltas[Horizontal].begin(), index));
- if (auto index = firstZeroIndex[Vertical])
- std::sort(deltas[Vertical].begin(), std::next(deltas[Vertical].begin(), index));
+ auto sortDeltas = [&] (Axis axis) {
+ if (!firstZeroIndex[axis])
+ return;
+
+ if (deltas[axis][0] > 0)
+ std::sort(deltas[axis].begin(), std::next(deltas[axis].begin(), firstZeroIndex[axis]), std::greater<float>());
+ else
+ std::sort(deltas[axis].begin(), std::next(deltas[axis].begin(), firstZeroIndex[axis]), std::less<float>());
+ };
+
+ sortDeltas(Horizontal);
+ sortDeltas(Vertical);
+
// GapSize is a count of contiguous frames with zero deltas.
typedef unsigned GapSize[2];
GapSize minimumGap = { 0, 0 };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes