You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[GTK][Wayland] Crash when gdk_keymap_get_entries_for_keyval returns TRUE but n_keys=0
https://bugs.webkit.org/show_bug.cgi?id=176154
Reviewed by Carlos Alberto Lopez Perez.
Source/WebKit:
In Wayland gdk_keymap_get_entries_for_keyval() can return TRUE with n_keys=0. We have several places in WebKit
where we just check the return value of gdk_keymap_get_entries_for_keyval() and then use the returned array to
get the first position assuming it has at least one item. This has always worked in X11 because the GDK X11
backend does the right thing, but it's crashing in Wayland now. It should be fixed in GTK+ but in the meantime
it's easy to workaround by also checking n_keys > 0.
* UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
(WebKit::doKeyStrokeEvent):
Tools:
Also check the n_keys > 0 when using gdk_keymap_get_entries_for_keyval().
* TestWebKitAPI/Tests/WebKit/gtk/InputMethodFilter.cpp:
(TestWebKitAPI::TestInputMethodFilter::sendKeyEventToFilter):
* TestWebKitAPI/Tests/WebKitGtk/TestPrinting.cpp: Remove duplicated code and use WebViewTest::keyStroke instead.
* TestWebKitAPI/glib/WebKitGLib/gtk/WebViewTestGtk.cpp:
(WebViewTest::keyStroke):
* TestWebKitAPI/gtk/PlatformWebViewGtk.cpp:
(TestWebKitAPI::doKeyStroke):
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::EventSenderProxy::keyDown):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@221419 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] REGRESSION (r218144) -[WKContentView targetForAction:withSender:] returns the content view for actions implemented only by the WKWebView, causing a crash
0 commit comments