[webkit-changes] [WebKit/WebKit] c1df85: Cherry-pick 263030 at main (14aef58eda45). https://bu...

Bastian Krause noreply at github.com
Wed Apr 19 00:46:23 PDT 2023


  Branch: refs/heads/webkitglib/2.40
  Home:   https://github.com/WebKit/WebKit
  Commit: c1df8572234ace34c8012b1703d0aa9c586106e5
      https://github.com/WebKit/WebKit/commit/c1df8572234ace34c8012b1703d0aa9c586106e5
  Author: Bastian Krause <bst at pengutronix.de>
  Date:   2023-04-19 (Wed, 19 Apr 2023)

  Changed paths:
    M Source/WebKit/UIProcess/API/libwpe/TouchGestureController.cpp
    M Source/WebKit/UIProcess/API/libwpe/TouchGestureController.h
    M Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp
    M Source/WebKit/UIProcess/API/wpe/WPEView.cpp

  Log Message:
  -----------
  Cherry-pick 263030 at main (14aef58eda45). https://bugs.webkit.org/show_bug.cgi?id=248076

    [WPE] Do not generate click event for long touch presses
    https://bugs.webkit.org/show_bug.cgi?id=248076

    Reviewed by Michael Catanzaro.

    Similar to the GTK port, a contextmenuevent should be generated for long
    presses instead of a click event. We could generate a sequence of mouse
    motion towards the desired point, mouse down, mouse up
    (wpe_input_pointer_modifier_button2). This would cause the
    contextmenuevent to be emitted, but also mousedown/mouseup events, which
    are not expected. Since there seems to be no other way of doing this (at
    the moment), implement a compromise: implement the detection of long tap
    gestures, but don't generate the context mouse events yet.

    Use a threshold value of 500 ms for detecting long tap gestures similar
    to gtk-long-press-time's default of 500 ms.

    See also: https://bugs.webkit.org/show_bug.cgi?id=251925

    * Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp:
    (WebKit::PageClientImpl::doneWithTouchEvent): Add no-op on
    TouchGestureController::ContextMenuEvent.
    * Source/WebKit/UIProcess/API/libwpe/TouchGestureController.cpp:
    (WebKit::TouchGestureController::handleEvent): Generate ContextMenuEvent
    for long presses.
    * Source/WebKit/UIProcess/API/libwpe/TouchGestureController.h: Add
    ContextMenu to GesturedEvent enum, create ContextMenuEvent and add it to
    EventVariant.
    * Source/WebKit/UIProcess/API/wpe/WPEView.cpp:
    (WKWPE::m_backend): Add no-op for
    TouchGestureController::ContextMenuEvent.

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




More information about the webkit-changes mailing list