[Webkit-unassigned] [Bug 232376] [GLIB] twitch.tv forces synchronous scrolling

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 10 09:59:35 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=232376

--- Comment #6 from Chris Lord <clord at igalia.com> ---
The only code I can find about it that has a side-effect appears to be here:

https://github.com/WebKit/WebKit/blob/main/Source/WebCore/page/mac/EventHandlerMac.mm#L156

> bool EventHandler::wheelEvent(NSEvent *event)
> {
>     Page* page = m_frame.page();
>     if (!page)
>         return false;
> 
>     CurrentEventScope scope(event, nil);
>     auto wheelEvent = PlatformEventFactory::createPlatformWheelEvent(event, page->chrome().platformPageClient());
>     OptionSet<WheelEventProcessingSteps> processingSteps = { WheelEventProcessingSteps::MainThreadForScrolling, WheelEventProcessingSteps::MainThreadForBlockingDOMEventDispatch };
> 
>     if (wheelEvent.phase() == PlatformWheelEventPhase::Changed || wheelEvent.momentumPhase() == PlatformWheelEventPhase::Changed) {
>         if (m_frame.settings().wheelEventGesturesBecomeNonBlocking() && m_wheelScrollGestureState.value_or(WheelScrollGestureState::Blocking) == WheelScrollGestureState::NonBlocking)
>             processingSteps = { WheelEventProcessingSteps::MainThreadForScrolling, WheelEventProcessingSteps::MainThreadForNonBlockingDOMEventDispatch };
>     }
>     return handleWheelEvent(wheelEvent, processingSteps);
> }

Am I missing something there? It sets processingSteps to { WheelEventProcessingSteps::MainThreadForScrolling, WheelEventProcessingSteps::MainThreadForBlockingDOMEventDispatch }, then if the wheel event phase is changed and settings().wheelEventGesturesBecomeNonBlocking() is true and m_wheelScrollGestureState is WheelScrollGestureState::NonBlocking, sets is to { WheelEventProcessingSteps::MainThreadForScrolling, WheelEventProcessingSteps::MainThreadForBlockingDOMEventDispatch } - which is the exact same value? Does OptionSet have some kind of assignment overload that turns assignments into toggles?

Also this code needs to be replicated in a non-Mac specific place, but I'd like to understand it first...

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211110/d64e6976/attachment-0001.htm>


More information about the webkit-unassigned mailing list