WebKit Bugzilla
Attachment 347069 Details for
Bug 188546
: [GTK] MiniBrowser: web view doesn't get the focus when new window is created
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
mb-view-focus.diff (text/plain), 5.03 KB, created by
Carlos Garcia Campos
on 2018-08-14 06:12:13 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Carlos Garcia Campos
Created:
2018-08-14 06:12:13 PDT
Size:
5.03 KB
patch
obsolete
>diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index bbd7e6e82dc..77f33083a1f 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,22 @@ >+2018-08-14 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] MiniBrowser: web view doesn't get the focus when new window is created >+ https://bugs.webkit.org/show_bug.cgi?id=188546 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When a new window is created, the first widget of the windo is getting the focus, the toolbar in this case. We >+ always want the WebView to grab the focus. In case of new empty tab, we want to the URL bar to be focused >+ instead. This was causing failures in WebDriver tests that create a popup window with an input element that is >+ filled with send keys command. The input element is marked as focused in the DOM, but the actual focused widget >+ is the toolbar, so key events are sent to the toolbar instead of the web view. >+ >+ * MiniBrowser/gtk/BrowserWindow.c: >+ (webViewCreate): >+ (newTabCallback): >+ (openPrivateWindow): >+ (browser_window_get_or_create_web_view_for_automation): >+ > 2018-08-14 Carlos Garcia Campos <cgarcia@igalia.com> > > Unreviewed. Fix WebDriver tests after r234839. >diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.c b/Tools/MiniBrowser/gtk/BrowserWindow.c >index 36b30657c9a..d5598351de2 100644 >--- a/Tools/MiniBrowser/gtk/BrowserWindow.c >+++ b/Tools/MiniBrowser/gtk/BrowserWindow.c >@@ -338,6 +338,7 @@ static GtkWidget *webViewCreate(WebKitWebView *webView, WebKitNavigationAction * > > GtkWidget *newWindow = browser_window_new(GTK_WINDOW(window), window->webContext); > browser_window_append_view(BROWSER_WINDOW(newWindow), newWebView); >+ gtk_widget_grab_focus(GTK_WIDGET(newWebView)); > g_signal_connect(newWebView, "ready-to-show", G_CALLBACK(webViewReadyToShow), newWindow); > g_signal_connect(newWebView, "run-as-modal", G_CALLBACK(webViewRunAsModal), newWindow); > g_signal_connect(newWebView, "close", G_CALLBACK(webViewClose), newWindow); >@@ -528,6 +529,7 @@ static void newTabCallback(BrowserWindow *window) > "user-content-manager", webkit_web_view_get_user_content_manager(webView), > "is-controlled-by-automation", webkit_web_view_is_controlled_by_automation(webView), > NULL))); >+ gtk_widget_grab_focus(window->uriEntry); > gtk_notebook_set_current_page(GTK_NOTEBOOK(window->notebook), -1); > } > >@@ -548,6 +550,7 @@ static void openPrivateWindow(BrowserWindow *window) > NULL)); > GtkWidget *newWindow = browser_window_new(GTK_WINDOW(window), window->webContext); > browser_window_append_view(BROWSER_WINDOW(newWindow), newWebView); >+ gtk_widget_grab_focus(GTK_WIDGET(newWebView)); > gtk_widget_show(GTK_WIDGET(newWindow)); > } > >@@ -1233,5 +1236,6 @@ WebKitWebView *browser_window_get_or_create_web_view_for_automation(void) > "is-controlled-by-automation", TRUE, > NULL)); > browser_window_append_view(window, newWebView); >+ gtk_widget_grab_focus(GTK_WIDGET(newWebView)); > return newWebView; > } >diff --git a/WebDriverTests/ChangeLog b/WebDriverTests/ChangeLog >index 0b468d8fadb..7fa22c83fe3 100644 >--- a/WebDriverTests/ChangeLog >+++ b/WebDriverTests/ChangeLog >@@ -1,3 +1,14 @@ >+2018-08-14 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] MiniBrowser: web view doesn't get the focus when new window is created >+ https://bugs.webkit.org/show_bug.cgi?id=188546 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove expectations of the tests that pass now. >+ >+ * TestExpectations.json: >+ > 2018-08-14 Carlos Garcia Campos <cgarcia@igalia.com> > > Unreviewed gardening. Update several test expectations after r234839. >diff --git a/WebDriverTests/TestExpectations.json b/WebDriverTests/TestExpectations.json >index 14cd22a57f8..b33a22a8742 100644 >--- a/WebDriverTests/TestExpectations.json >+++ b/WebDriverTests/TestExpectations.json >@@ -478,20 +478,10 @@ > } > } > }, >- "imported/w3c/webdriver/tests/back/back.py": { >- "subtests": { >- "test_dismissed_beforeunload": { >- "expected": {"all": {"status": ["TIMEOUT"], "bug": "webkit.org/b/188546"}} >- } >- } >- }, > "imported/w3c/webdriver/tests/close_window/close.py": { > "subtests": { > "test_close_last_browsing_context": { > "expected": {"gtk": {"status": ["FAIL", "PASS"], "bug": "webkit.org/b/188118"}} >- }, >- "test_close_browsing_context_with_dismissed_beforeunload_prompt": { >- "expected": {"all": {"status": ["TIMEOUT"], "bug": "webkit.org/b/188546"}} > } > } > }, >@@ -607,13 +597,6 @@ > } > } > }, >- "imported/w3c/webdriver/tests/forward/forward.py": { >- "subtests": { >- "test_dismissed_beforeunload": { >- "expected": {"all": {"status": ["TIMEOUT"], "bug": "webkit.org/b/188546"}} >- } >- } >- }, > "imported/w3c/webdriver/tests/element_send_keys/events.py": { > "subtests": { > "test_file_upload": {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mcatanzaro
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188546
: 347069