Skip to content
Permalink
Browse files
[GTK][Wayland] UI process crash when closing the window
https://bugs.webkit.org/show_bug.cgi?id=185818

Reviewed by Michael Catanzaro.

This happens when a page containing a text field is loaded but the focus remains in the url bar when the window
is closed. This is because we are sending a notify-in to the IM context, but the focus is still in the URL
bar. That confuses the wayland input method manager that tries to free the text of the web view IM context that has
already been deleted.

* UIProcess/gtk/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::setEnabled): Only send notify-in if the view is actually focused.

Canonical link: https://commits.webkit.org/201305@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
carlosgcampos committed May 22, 2018
1 parent 5a6151c commit a2516f325db4b7c3321b3a966ccc8c37157a9871
Showing with 16 additions and 1 deletion.
  1. +15 −0 Source/WebKit/ChangeLog
  2. +1 −1 Source/WebKit/UIProcess/gtk/InputMethodFilter.cpp
@@ -1,3 +1,18 @@
2018-05-21 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK][Wayland] UI process crash when closing the window
https://bugs.webkit.org/show_bug.cgi?id=185818

Reviewed by Michael Catanzaro.

This happens when a page containing a text field is loaded but the focus remains in the url bar when the window
is closed. This is because we are sending a notify-in to the IM context, but the focus is still in the URL
bar. That confuses the wayland input method manager that tries to free the text of the web view IM context that has
already been deleted.

* UIProcess/gtk/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::setEnabled): Only send notify-in if the view is actually focused.

2018-05-21 Ryosuke Niwa <rniwa@webkit.org>

Remove unused and no-op WKContextSetCookieStorageDirectory
@@ -89,7 +89,7 @@ void InputMethodFilter::setEnabled(bool enabled)
if (!enabled)
notifyFocusedOut();
m_enabled = enabled;
if (enabled)
if (enabled && m_page->isViewFocused())
notifyFocusedIn();
}

0 comments on commit a2516f3

Please sign in to comment.