Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: eaadc438d48abeeda3418f39954398f48667e076
      
https://github.com/WebKit/WebKit/commit/eaadc438d48abeeda3418f39954398f48667e076
  Author: Abrar Rahman Protyasha <[email protected]>
  Date:   2025-11-10 (Mon, 10 Nov 2025)

  Changed paths:
    M Source/WebCore/platform/PlatformWheelEvent.h
    M Source/WebKit/Shared/WebEvent.serialization.in
    M Source/WebKit/Shared/WebEventConversion.cpp
    M Source/WebKit/Shared/WebWheelEvent.h
    M Source/WebKit/Shared/WebWheelEventCoalescer.cpp
    M Source/WebKit/Shared/ios/WebIOSEventFactory.mm
    M Source/WebKit/Shared/mac/WebEventFactory.mm
    M Source/WebKit/Shared/wpe/WebEventFactoryWPE.cpp
    M Source/WebKit/UIProcess/API/C/playstation/WKPagePrivatePlayStation.cpp
    M Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
    M Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/API/libwpe/TouchGestureController.cpp
    M Source/WebKit/UIProcess/API/wpe/WPEWebViewLegacy.cpp
    M Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp
    M 
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp

  Log Message:
  -----------
  Wheel event phase enum types should be scoped
https://bugs.webkit.org/show_bug.cgi?id=302150
rdar://164242357

Reviewed by Michael Catanzaro.

Namely, WebCore::PlatformWheelEventGranularity and
WebKit::WebWheelEvent::Granularity. When they are unscoped, it is easy
to confuse between the identically named cases.

This is a mostly mechanical patch that s/'enum'/'enum class' on said
types. We also store the event/momentum phases as `Phase` values,
rather than as uint32_t values.

One implication of this patch is that we no longer declare the enum
cases as flags. We were doing this prior to the patch, but the enum was
not being used as an option set anywhere, and hence it was unnecessary
to do so.

No new tests because no change in functionality.

* Source/WebCore/platform/PlatformWheelEvent.h:
* Source/WebKit/Shared/WebEvent.serialization.in:
* Source/WebKit/Shared/WebEventConversion.cpp:
(WebKit::platform):
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
* Source/WebKit/Shared/WebWheelEvent.h:
(WebKit::WebWheelEvent::phase const):
(WebKit::WebWheelEvent::momentumPhase const):
(WebKit::WebWheelEvent::isMomentumEvent const):
* Source/WebKit/Shared/WebWheelEventCoalescer.cpp:
(WebKit::WebWheelEventCoalescer::shouldDispatchEventNow const):
* Source/WebKit/Shared/ios/WebIOSEventFactory.mm:
(WebKit::toWebPhase):
(WebKit::WebIOSEventFactory::createWebWheelEvent):
* Source/WebKit/Shared/mac/WebEventFactory.mm:
(WebKit::phaseForEvent):
(WebKit::momentumPhaseForEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
* Source/WebKit/Shared/wpe/WebEventFactoryWPE.cpp:
(WebKit::WebEventFactory::createWebWheelEvent):
* Source/WebKit/UIProcess/API/C/playstation/WKPagePrivatePlayStation.cpp:
(WKPageHandleWheelEvent):
* Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
* Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseScrollEvent):
(handleScroll):
(toWebKitWheelEventPhase):
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView scrollView:handleScrollUpdate:completion:]):
* Source/WebKit/UIProcess/API/libwpe/TouchGestureController.cpp:
(WebKit::TouchGestureController::handleEvent):
* Source/WebKit/UIProcess/API/wpe/WPEWebViewLegacy.cpp:
(WKWPE::ViewLegacy::ViewLegacy):
* Source/WebKit/UIProcess/API/wpe/WPEWebViewPlatform.cpp:
(WKWPE::ViewPlatform::handleGesture):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.mm:
(WebKit::RemoteLayerTreeEventDispatcher::cacheWheelEventScrollingAccelerationCurve):
(WebKit::RemoteLayerTreeEventDispatcher::handleWheelEvent):
(WebKit::RemoteLayerTreeEventDispatcher::handleSyntheticWheelEvent):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueWheelEventHandling):
(WebKit::WebPageProxy::cacheWheelEventScrollingAccelerationCurve):
(WebKit::WebPageProxy::sendWheelEventScrollingAccelerationCurveIfNecessary):
* Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp:
(WebKit::MomentumEventDispatcher::eventShouldStartSyntheticMomentumPhase const):
(WebKit::MomentumEventDispatcher::handleWheelEvent):
(WebKit::MomentumEventDispatcher::dispatchSyntheticMomentumEvent):
(WebKit::MomentumEventDispatcher::didStartMomentumPhase):
(WebKit::MomentumEventDispatcher::didEndMomentumPhase):
(WebKit::MomentumEventDispatcher::displayDidRefresh):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::dispatchWheelEventWithoutScrolling):

Canonical link: https://commits.webkit.org/302823@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to