-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://bugs.webkit.org/show_bug.cgi?id=261348 Reviewed by Carlos Garcia Campos. Event processing in GTK is synchronous, but in WebKit it is asynchronous because we don't want to block the UI process waiting for the web process to decide whether a DOM event has been handled (e.g. by using Event.stopPropagation). Currently we use a complicated scheme to synthesize and reinject new key and wheel events to continue event processing when the event is not handled by the web content, which the GTK developers do not approve of, and which is causing serious problems where Epiphany has to choose between processing events in an infinite loop vs. handling events too soon and blocking the web view from receiving them. Neither option is great. https://gitlab.gnome.org/GNOME/epiphany/-/issues/1915 https://gitlab.gnome.org/GNOME/epiphany/-/issues/2173 The solution is to just never reinject events, and instead always handle them. We do not need event reinjection anymore if we activate application accelerators manually. See the long comment embedded in this commit for full details of why this is necessary. This patch removes the key event reinjection. Wheel event reinjection is not yet removed because this would break when WebKit is used within scrolled windows. * Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::doneWithKeyEvent): * Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp: (shouldForwardKeyEvent): (webkitWebViewBaseProcessAcceleratorsForKeyPressEvent): (webkitWebViewBaseKeyPressed): (handleScroll): (webkitWebViewBasePropagateKeyEvent): * Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Canonical link: https://commits.webkit.org/273922@main
- Loading branch information
1 parent
dceee48
commit fd1f0b7
Showing
3 changed files
with
65 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters