Bug 215979 - Rewrite main thread scroll latching logic
Summary: Rewrite main thread scroll latching logic
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-08-29 12:46 PDT by Simon Fraser (smfr)
Modified: 2020-08-30 15:55 PDT (History)
14 users (show)

See Also:


Attachments
Patch (84.53 KB, patch)
2020-08-29 13:02 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (84.61 KB, patch)
2020-08-29 14:11 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (83.91 KB, patch)
2020-08-29 17:08 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (83.89 KB, patch)
2020-08-29 17:15 PDT, Simon Fraser (smfr)
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2020-08-29 12:46:14 PDT
The main thread scroll event handling and latching logic has evolved over time and lacks a real design; see issues noted in bug 215741.
Comment 1 Simon Fraser (smfr) 2020-08-29 13:02:52 PDT
Created attachment 407545 [details]
Patch
Comment 2 Simon Fraser (smfr) 2020-08-29 14:11:37 PDT
Created attachment 407551 [details]
Patch
Comment 3 Simon Fraser (smfr) 2020-08-29 17:08:44 PDT
Created attachment 407553 [details]
Patch
Comment 4 Simon Fraser (smfr) 2020-08-29 17:15:05 PDT
Created attachment 407554 [details]
Patch
Comment 5 Tim Horton 2020-08-29 19:06:45 PDT
Comment on attachment 407554 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=407554&action=review

> Source/WebCore/page/scrolling/ScrollLatchingController.cpp:55
> +// FIXME: This logic is different frmo ScrollingTreeLatchingController, which simply lets the latching state elapse after 100ms.

frmo

> Source/WebCore/page/scrolling/ScrollLatchingController.cpp:186
> +    // We always allow the main frame receive wheel events to permit rubber-banding.

Some grammar

> Source/WebCore/page/scrolling/ScrollLatchingController.h:75
> +        Frame* frame { nullptr }; // Icky raw pointer. Use FrameIdentifier?

Did you want to fix this before landing?

> Source/WebCore/page/scrolling/ScrollingTreeLatchingController.cpp:40
>  static const Seconds resetLatchedStateTimeout { 100_ms };

Should we plop this in one place and use it from both?

> Source/WebCore/platform/PlatformWheelEvent.h:155
> +    bool isGestureContinuation() const; // The fingers-down part of the gesture.

But not momentum?

> LayoutTests/ChangeLog:14
> +2020-08-18  Simon Fraser  <simon.fraser@apple.com>

Double changelog
Comment 6 Simon Fraser (smfr) 2020-08-30 10:43:48 PDT
https://trac.webkit.org/r266333
Comment 7 Radar WebKit Bug Importer 2020-08-30 10:44:15 PDT
<rdar://problem/68034254>
Comment 8 Fujii Hironori 2020-08-30 15:01:00 PDT
The mouse wheel doesn't scroll page in trunk@266333 for WinCairo WK1 and WK2.
This change seems the culprit.
Comment 9 Simon Fraser (smfr) 2020-08-30 15:55:02 PDT
Fixed in bug 215990.