Title: [109719] trunk
Revision
109719
Author
[email protected]
Date
2012-03-05 00:28:59 -0800 (Mon, 05 Mar 2012)

Log Message

[GTK] REGRESSION: r108278 broke some tests that expect focus
https://bugs.webkit.org/show_bug.cgi?id=79084

Reviewed by Philippe Normand.

Source/WebKit/gtk:

Grab focus before running the test. This ensures that if the
WebView lost focus, it has it before sending events.

* tests/testcopyandpaste.c:
(test_copy_and_paste): Grab focus.

Tools:

Grab focus when dumping test results and also when sending
events. During the course of testing, the WebView may lose
focus and this seems to snap it back when tests demand it.

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(dump): Grab focus.
* DumpRenderTree/gtk/EventSender.cpp:
(dispatchEvent): Ditto.

LayoutTests:

* platform/gtk/Skipped: Unskip passing tests.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (109718 => 109719)


--- trunk/LayoutTests/ChangeLog	2012-03-05 08:22:33 UTC (rev 109718)
+++ trunk/LayoutTests/ChangeLog	2012-03-05 08:28:59 UTC (rev 109719)
@@ -1,3 +1,12 @@
+2012-03-04  Martin Robinson  <[email protected]>
+
+        [GTK] REGRESSION: r108278 broke some tests that expect focus
+        https://bugs.webkit.org/show_bug.cgi?id=79084
+
+        Reviewed by Philippe Normand.
+
+        * platform/gtk/Skipped: Unskip passing tests.
+
 2012-03-05  Kent Tamura  <[email protected]>
 
         [Chromium] Rebaseline search-field-cancel.html for r109503.

Modified: trunk/LayoutTests/platform/gtk/Skipped (109718 => 109719)


--- trunk/LayoutTests/platform/gtk/Skipped	2012-03-05 08:22:33 UTC (rev 109718)
+++ trunk/LayoutTests/platform/gtk/Skipped	2012-03-05 08:28:59 UTC (rev 109719)
@@ -1581,18 +1581,6 @@
 tables/mozilla/bugs/bug27038-1.html
 tables/mozilla/bugs/bug27038-2.html
 
-# Removing an explicit grab focus on WebCore broke some tests
-# https://bugs.webkit.org/show_bug.cgi?id=79084
-fast/images/imagemap-focus-ring-zoom-style.html
-fast/forms/number/input-number-events.html
-fast/events/tabindex-focus-chain.html
-fast/events/tab-focus-hidden.html
-fast/events/tab-focus-anchor.html
-fast/events/media-element-focus-tab.html
-fast/events/keypress-insert-tab.html
-fast/images/imagemap-focus-ring-zoom-style.html
-editing/pasteboard/copy-element-with-conflicting-background-color-from-rule.html
-
 # https://bugs.webkit.org/show_bug.cgi?id=79203
 fast/dom/MediaStream/argument-types.html
 fast/mediastream/peerconnection-Attributes.html

Modified: trunk/Source/WebKit/gtk/ChangeLog (109718 => 109719)


--- trunk/Source/WebKit/gtk/ChangeLog	2012-03-05 08:22:33 UTC (rev 109718)
+++ trunk/Source/WebKit/gtk/ChangeLog	2012-03-05 08:28:59 UTC (rev 109719)
@@ -1,3 +1,16 @@
+2012-03-04  Martin Robinson  <[email protected]>
+
+        [GTK] REGRESSION: r108278 broke some tests that expect focus
+        https://bugs.webkit.org/show_bug.cgi?id=79084
+
+        Reviewed by Philippe Normand.
+
+        Grab focus before running the test. This ensures that if the
+        WebView lost focus, it has it before sending events.
+
+        * tests/testcopyandpaste.c:
+        (test_copy_and_paste): Grab focus.
+
 2012-02-18  Martin Robinson  <[email protected]>
 
         [GTK] [AC] Generalize WindowContextGL

Modified: trunk/Source/WebKit/gtk/tests/testcopyandpaste.c (109718 => 109719)


--- trunk/Source/WebKit/gtk/tests/testcopyandpaste.c	2012-03-05 08:22:33 UTC (rev 109718)
+++ trunk/Source/WebKit/gtk/tests/testcopyandpaste.c	2012-03-05 08:28:59 UTC (rev 109719)
@@ -126,6 +126,7 @@
     gtk_widget_show(fixture->window);
     gtk_widget_show(GTK_WIDGET(fixture->webView));
     gtk_window_present(GTK_WINDOW(fixture->window));
+    gtk_widget_grab_focus(fixture->webView);
 
     g_signal_connect(fixture->webView, "notify::load-status",
                      G_CALLBACK(load_status_cb), fixture);

Modified: trunk/Tools/ChangeLog (109718 => 109719)


--- trunk/Tools/ChangeLog	2012-03-05 08:22:33 UTC (rev 109718)
+++ trunk/Tools/ChangeLog	2012-03-05 08:28:59 UTC (rev 109719)
@@ -1,3 +1,19 @@
+2012-03-04  Martin Robinson  <[email protected]>
+
+        [GTK] REGRESSION: r108278 broke some tests that expect focus
+        https://bugs.webkit.org/show_bug.cgi?id=79084
+
+        Reviewed by Philippe Normand.
+
+        Grab focus when dumping test results and also when sending
+        events. During the course of testing, the WebView may lose
+        focus and this seems to snap it back when tests demand it.
+
+        * DumpRenderTree/gtk/DumpRenderTree.cpp:
+        (dump): Grab focus.
+        * DumpRenderTree/gtk/EventSender.cpp:
+        (dispatchEvent): Ditto.
+
 2012-03-04  Charles Wei  <[email protected]>
 
         Unreviewed, Add myself to committer list.

Modified: trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp (109718 => 109719)


--- trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp	2012-03-05 08:22:33 UTC (rev 109718)
+++ trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp	2012-03-05 08:28:59 UTC (rev 109719)
@@ -518,6 +518,10 @@
 {
     invalidateAnyPreviousWaitToDumpWatchdog();
 
+    // Grab widget focus before dumping the contents of a widget, in
+    // case it was lost in the course of the test.
+    gtk_widget_grab_focus(GTK_WIDGET(webView));
+
     if (dumpTree) {
         char* result = 0;
         gchar* responseMimeType = webkit_web_frame_get_response_mime_type(mainFrame);

Modified: trunk/Tools/DumpRenderTree/gtk/EventSender.cpp (109718 => 109719)


--- trunk/Tools/DumpRenderTree/gtk/EventSender.cpp	2012-03-05 08:22:33 UTC (rev 109718)
+++ trunk/Tools/DumpRenderTree/gtk/EventSender.cpp	2012-03-05 08:28:59 UTC (rev 109719)
@@ -563,6 +563,9 @@
         return;
     }
 
+    // The widget focus may have been lost in the course of the test,
+    // so force another explicit focus grab here.
+    gtk_widget_grab_focus(GTK_WIDGET(view));
     gtk_main_do_event(event);
 
     if (!currentDragSourceContext) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to