[GTK] Some tests fail because they do not assume the popup menu captures click events
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 21:21:32 +0000 (21:21 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 21:21:32 +0000 (21:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=40601

Reviewed by Carlos Garcia Campos.

Tools:

Popdown all attached menus when moving between tests and between each new
event sent to the WebView. This prevents context and popup menus from eating
events.

* WebKitTestRunner/PlatformWebView.h: Added a helper method to do menu popdown.
* WebKitTestRunner/TestController.cpp: Add a specialization of these methods for GTK+.
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::dispatchEvent): Popdown all menus between dispatching events.
(WTR::EventSenderProxy::replaySavedEvents): Pass the view when dispatching events.
(WTR::EventSenderProxy::sendOrQueueEvent): Pass the view when dispatching events.
* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::hideAllPopupMenus): Added this helper.
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::platformConfigureViewForTest): Added this stub, which is no
longer in the platform-independent file.
(WTR::TestController::platformResetPreferencesToConsistentValues): Popdown menus.

LayoutTests:

* platform/gtk/TestExpectations: Unskip tests that are passing now
and classify remaining failures.
* platform/gtk/editing/selection/5354455-2-expected.txt: Rebaselined.
* platform/gtk/editing/selection/doubleclick-crash-expected.png: Rebaseline.
* platform/gtk/editing/selection/doubleclick-crash-expected.txt: Rebaseline.
* platform/gtk/editing/selection/user-select-all-image-with-single-click-expected.txt: Rebaselined.
* platform/gtk/editing/selection/user-select-all-with-single-click-expected.txt: Rebaselined.
* platform/gtk/fast/events/mouseup-from-button2-expected.txt: Rebaseline.
* platform/gtk/fast/events/shadow-event-path-2-expected.txt: Rebaseline.
* platform/gtk/fast/events/shadow-event-path-expected.txt: Rebaseline.
* platform/gtk/fast/events/updateLayoutForHitTest-expected.txt: Rebaselined.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184015 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/gtk/editing/selection/5354455-2-expected.txt
LayoutTests/platform/gtk/editing/selection/doubleclick-crash-expected.png
LayoutTests/platform/gtk/editing/selection/doubleclick-crash-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/editing/selection/user-select-all-image-with-single-click-expected.txt
LayoutTests/platform/gtk/editing/selection/user-select-all-with-single-click-expected.txt
LayoutTests/platform/gtk/fast/events/mouseup-from-button2-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/fast/events/shadow-event-path-2-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/fast/events/shadow-event-path-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/fast/events/updateLayoutForHitTest-expected.txt
Tools/ChangeLog
Tools/WebKitTestRunner/EventSenderProxy.h
Tools/WebKitTestRunner/PlatformWebView.h
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp
Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp
Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp

index 8ea8547c8aa8763ac88b24dab79c9581c7159c06..3c0e6d66ae196d7162386c3d7971525b6ed9e7b9 100644 (file)
@@ -1,3 +1,23 @@
+2015-05-08  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] Some tests fail because they do not assume the popup menu captures click events
+        https://bugs.webkit.org/show_bug.cgi?id=40601
+
+        Reviewed by Carlos Garcia Campos.
+
+        * platform/gtk/TestExpectations: Unskip tests that are passing now
+        and classify remaining failures.
+        * platform/gtk/editing/selection/5354455-2-expected.txt: Rebaselined.
+        * platform/gtk/editing/selection/doubleclick-crash-expected.png: Rebaseline.
+        * platform/gtk/editing/selection/doubleclick-crash-expected.txt: Rebaseline.
+        * platform/gtk/editing/selection/user-select-all-image-with-single-click-expected.txt: Rebaselined.
+        * platform/gtk/editing/selection/user-select-all-with-single-click-expected.txt: Rebaselined.
+        * platform/gtk/fast/events/mouseup-from-button2-expected.txt: Rebaseline.
+        * platform/gtk/fast/events/shadow-event-path-2-expected.txt: Rebaseline.
+        * platform/gtk/fast/events/shadow-event-path-expected.txt: Rebaseline.
+        * platform/gtk/fast/events/updateLayoutForHitTest-expected.txt: Rebaselined.
+
+
 2015-05-08  Brent Fulgham  <bfulgham@apple.com>
 
         [WK2] Scroll-snap tests timeout intermittently for overflow scroll cases
index c9e0b8f3d6ecf0bea1dedda70b2d22d2f22b29ed..66f97ed363eb963c48dd994b0d971109ccb06567 100644 (file)
@@ -711,6 +711,7 @@ webkit.org/b/135051 fast/regions/repaint/region-painting-invalidation.html [ Cra
 
 webkit.org/b/129050 fast/sub-pixel/compositing-layers-on-subpixel-position.html [ ImageOnlyFailure Crash Pass ]
 
+webkit.org/b/144771 editing/selection/selection-invalid-offset.html [ Crash ]
 
 #////////////////////////////////////////////////////////////////////////////////////////
 # End of Crashing tests
@@ -1238,8 +1239,6 @@ webkit.org/b/61826 fast/events/drag-image-filename.html [ Timeout ]
 
 webkit.org/b/108925 http/tests/media/video-play-stall.html [ Failure Timeout ]
 
-webkit.org/b/114789 fast/events/page-visibility-transition-test.html [ Timeout ]
-
 webkit.org/b/116956 fast/events/event-view-toString.html [ Timeout ]
 
 webkit.org/b/116957 media/track/track-automatic-subtitles.html [ Timeout ]
@@ -1441,8 +1440,15 @@ webkit.org/b/63706 plugins/mouse-events-fixedpos.html [ Failure ]
 webkit.org/b/63706 plugins/mouse-events.html [ Failure ]
 webkit.org/b/63706 editing/pasteboard/cleanup-on-move.html [ Failure ]
 webkit.org/b/63706 editing/pasteboard/drag-list-item.html [ Failure ]
+webkit.org/b/63706 fast/events/ondragenter.html [ Failure ]
+webkit.org/b/63706 fast/events/drag-and-drop-autoscroll-inner-frame.html [ Timeout ]
+webkit.org/b/63706 fast/events/drag-customData.html  [ Timeout ]
+
+# Need support for internals.settings.setDeviceSupportsMouse
+fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html
 
-# WebKit2 needs testRunner.setEditingBehaviour and other issues.
+# WebKit2 testRunner.setEditingBehaviour appears broken sometimes.
+webkit.org/b/144764 editing/selection/move-by-word-visually-mac.html [ Failure ]
 Bug(GTK) editing/selection/extend-after-mouse-selection.html [ Failure ]
 
 # WebKit2 needs textInputController.selectedRange
@@ -1464,10 +1470,6 @@ webkit.org/b/93980 http/tests/appcache/load-from-appcache-defer-resume-crash.htm
 webkit.org/b/42194 fast/events/5056619.html [ Failure ]
 webkit.org/b/42194 http/tests/security/drag-drop-same-unique-origin.html [ Failure ]
 
-# Context menu problems.
-webkit.org/b/120401 fast/events [ Skip ]
-webkit.org/b/120401 editing/selection [ Skip ]
-
 webkit.org/b/106340 accessibility/img-fallsback-to-title.html [ Failure ]
 
 # svg/ failures
@@ -1685,11 +1687,6 @@ Bug(GTK) fast/overflow/scrollbar-restored-and-then-locked.html [ Failure ]
 Bug(GTK) fast/forms/range/slider-mouse-events.html [ Failure ]
 Bug(GTK) fast/forms/range/slider-zoomed.html [ Failure ]
 
-# Tests failing because the context menu is grabbing mouse events.
-webkit.org/b/40601 fast/events/mouse-click-events.html [ Failure ]
-webkit.org/b/40601 fast/events/mouseup-from-button2.html [ Failure ]
-webkit.org/b/40601 fast/events/right-click-focus.html [ Failure ]
-
 # Tests that fail across all platforms.
 # Even though some platforms don't skip these tests, there are platform-specific
 # results generated that make these tests 'pass'.
@@ -1835,9 +1832,6 @@ webkit.org/b/98613 css3/masking/clip-path-reference.html [ ImageOnlyFailure ]
 
 webkit.org/b/98950 transitions/blendmode-transitions.html [ Failure ]
 
-webkit.org/b/100424 editing/selection/user-select-all-selection.html [ Failure ]
-webkit.org/b/100424 editing/selection/user-select-all-with-shift.html [ Failure ]
-
 webkit.org/b/100846 inspector-protocol/debugger/pause-dedicated-worker.html [ Skip ]
 webkit.org/b/100846 inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html [ Skip ]
 
@@ -2328,6 +2322,21 @@ webkit.org/b/144690 editing/spelling/context-menu-suggestions.html [ Failure ]
 webkit.org/b/144690 editing/spelling/spelling-double-clicked-word.html [ Failure ]
 webkit.org/b/144690 editing/spelling/delete-into-misspelled-word.html [ Timeout Pass ]
 
+# Touch events not working
+webkit.org/b/144765 fast/events/event-attribute.html  [ Failure ]
+webkit.org/b/144765 fast/events/touch/touch-slider.html [ Failure ]
+webkit.org/b/144765 fast/events/touch/touch-inside-iframe-scrolled.html [ Failure ]
+webkit.org/b/144765 fast/events/touch/touch-slider-no-js-touch-listener.html [ Failure ]
+webkit.org/b/144765 fast/events/touch/touch-inside-iframe.html [ Timeout ]
+
+# Need support for adjusting page visibility in the test harness.
+webkit.org/b/114789 fast/events/page-visibility-iframe-delete-test.html [ Timeout ]
+webkit.org/b/114789 fast/events/page-visibility-iframe-move-test.html [ Timeout ]
+webkit.org/b/114789 fast/events/page-visibility-iframe-propagation-test.html [ Timeout ]
+webkit.org/b/114789 fast/events/page-visibility-transition-test.html [ Timeout ]
+
+webkit.org/b/144763 fast/events/scroll-in-scaled-page-with-overflow-hidden.html
+
 #////////////////////////////////////////////////////////////////////////////////////////
 # End of Tests failing
 #////////////////////////////////////////////////////////////////////////////////////////
index ff763c71d80cdadfeabb30f6cf9463fd36c938ad..3c7d23b6acecbef74db4165f3299acd7cc82affa 100644 (file)
@@ -20,4 +20,4 @@ layer at (8,8) size 612x137
         text run at (0,34) width 577: "click on the empty space outside and to the right of the black border, the selection should be"
         text run at (0,51) width 59: "removed."
       RenderText {#text} at (0,0) size 0x0
-caret: position 118 of child 2 {#text} of body
+caret: position 0 of child 0 {#text} of child 1 {H1} of body
index 5dbc6aca351614294c79cee5be6e008a6c4fcfd3..d3669ae4e28f9c3313b6c6c2ea8d405e5a3e29fd 100644 (file)
Binary files a/LayoutTests/platform/gtk/editing/selection/doubleclick-crash-expected.png and b/LayoutTests/platform/gtk/editing/selection/doubleclick-crash-expected.png differ
diff --git a/LayoutTests/platform/gtk/editing/selection/doubleclick-crash-expected.txt b/LayoutTests/platform/gtk/editing/selection/doubleclick-crash-expected.txt
new file mode 100644 (file)
index 0000000..0c8597f
--- /dev/null
@@ -0,0 +1,21 @@
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 5 of #text > PRE > BODY > HTML > #document to 5 of #text > PRE > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > PRE > BODY > HTML > #document to 5 of #text > PRE > BODY > HTML > #document toDOMRange:range from 5 of #text > PRE > BODY > HTML > #document to 6 of #text > PRE > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x587
+      RenderBlock {PRE} at (0,0) size 800x75
+        RenderText {#text} at (0,0) size 40x60
+          text run at (0,0) width 40: "Test."
+          text run at (40,0) width 0: " "
+          text run at (0,15) width 40: "Test."
+          text run at (40,15) width 0: " "
+          text run at (0,30) width 0: " "
+          text run at (0,45) width 0: " "
+        RenderText {#text} at (0,60) size 0x15
+          text run at (0,60) width 0: " "
+selection start: position 5 of child 0 {#text} of child 1 {PRE} of body
+selection end:   position 6 of child 0 {#text} of child 1 {PRE} of body
index 9ea330c174b112b8d49ca9a1ed32ce15f20f348c..d7c8c64a3ce47384c0c27ef2963241eefbe95219 100644 (file)
@@ -3,5 +3,7 @@ Firefox doesn't do this but I'm not sure it makes sense for us to be inconsisten
 To manually test, single click on the image below. WebKit should select the entire bordered region.
 | <div>
 |   class="select-all"
+|   <#selection-anchor>
 |   <img>
 |     src="../resources/abe.png"
+|   <#selection-focus>
index d2496d42a7678572ad74034ef1a56f282ec44053..7041a39ec6ca53ae57b1c56e1fa69da7c7c1ec0d 100644 (file)
@@ -2,4 +2,4 @@ This tests single-clicking on text inside user-select: all. WebKit should select
 To manually test, single click on "click here" below. WebKit should select the entire bordered region.
 | <div>
 |   class="select-all"
-|   "C<#selection-caret>lick here"
+|   "<#selection-anchor>Click here<#selection-focus>"
diff --git a/LayoutTests/platform/gtk/fast/events/mouseup-from-button2-expected.txt b/LayoutTests/platform/gtk/fast/events/mouseup-from-button2-expected.txt
new file mode 100644 (file)
index 0000000..2149129
--- /dev/null
@@ -0,0 +1,18 @@
+This test verifies that a right mousebutton click generates a mousedown, context and mouseup event.
+
+If the test passes, you'll see a PASS message below.
+
+To run this test in Safari:
+
+Right mouse down inside the box.
+Right mouse up.
+box
+
+type: mousedown, button: 0, 
+type: mouseup, button: 0, 
+type: click, button: 0, 
+type: mousedown, button: 2, 
+type: contextmenu, button: 2, 
+type: mouseup, button: 2, 
+type: mousedown, button: 2, 
+type: contextmenu, button: 2, 
diff --git a/LayoutTests/platform/gtk/fast/events/shadow-event-path-2-expected.txt b/LayoutTests/platform/gtk/fast/events/shadow-event-path-2-expected.txt
new file mode 100644 (file)
index 0000000..58fb534
--- /dev/null
@@ -0,0 +1,1274 @@
+This test records target and relatedTarget at each element while dispatching a mouse click event at an input element.
+
+
+Content:<div id="detailsContainer"><input id="target" type="file"></div>
+
+mouseover@html
+    target:html
+    relatedTarget:null
+
+mouseover@document
+    target:html
+    relatedTarget:null
+
+mouseover@window
+    target:html
+    relatedTarget:null
+
+mouseenter@html
+    target:html
+    relatedTarget:null
+
+mousemove@html
+    target:html
+    relatedTarget:null
+
+mousemove@document
+    target:html
+    relatedTarget:null
+
+mousemove@window
+    target:html
+    relatedTarget:null
+
+mouseout@html
+    target:html
+    relatedTarget:input#target
+
+mouseout@document
+    target:html
+    relatedTarget:input#target
+
+mouseout@window
+    target:html
+    relatedTarget:input#target
+
+mouseover@input#target
+    target:input#target
+    relatedTarget:html
+
+mouseover@div#detailsContainer
+    target:input#target
+    relatedTarget:html
+
+mouseover@body
+    target:input#target
+    relatedTarget:html
+
+mouseover@html
+    target:input#target
+    relatedTarget:html
+
+mouseover@document
+    target:input#target
+    relatedTarget:html
+
+mouseover@window
+    target:input#target
+    relatedTarget:html
+
+mouseenter@input#target
+    target:input#target
+    relatedTarget:html
+
+mouseenter@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:html
+
+mouseenter@body
+    target:body
+    relatedTarget:html
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mouseout@input#target
+    target:input#target
+    relatedTarget:div#detailsContainer
+
+mouseout@div#detailsContainer
+    target:input#target
+    relatedTarget:div#detailsContainer
+
+mouseout@body
+    target:input#target
+    relatedTarget:div#detailsContainer
+
+mouseout@html
+    target:input#target
+    relatedTarget:div#detailsContainer
+
+mouseout@document
+    target:input#target
+    relatedTarget:div#detailsContainer
+
+mouseout@window
+    target:input#target
+    relatedTarget:div#detailsContainer
+
+mouseleave@input#target
+    target:input#target
+    relatedTarget:div#detailsContainer
+
+mouseover@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:input#target
+
+mouseover@body
+    target:div#detailsContainer
+    relatedTarget:input#target
+
+mouseover@html
+    target:div#detailsContainer
+    relatedTarget:input#target
+
+mouseover@document
+    target:div#detailsContainer
+    relatedTarget:input#target
+
+mouseover@window
+    target:div#detailsContainer
+    relatedTarget:input#target
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@body
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@html
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@document
+    target:div#detailsContainer
+    relatedTarget:null
+
+mousemove@window
+    target:div#detailsContainer
+    relatedTarget:null
+
+
diff --git a/LayoutTests/platform/gtk/fast/events/shadow-event-path-expected.txt b/LayoutTests/platform/gtk/fast/events/shadow-event-path-expected.txt
new file mode 100644 (file)
index 0000000..33d6513
--- /dev/null
@@ -0,0 +1,306 @@
+This test records target and relatedTarget at each element while dispatching a mouse click event at an input element.
+
+
+Content:<div id="detailsContainer"><details><summary><div id="divInsideSummary"><input id="target" type="text" size="10"></div></summary></details></div>
+
+mouseover@input#target
+    target:input#target
+    relatedTarget:null
+
+mouseover@div#divInsideSummary
+    target:input#target
+    relatedTarget:null
+
+mouseover@summary
+    target:input#target
+    relatedTarget:null
+
+mouseover@details
+    target:input#target
+    relatedTarget:null
+
+mouseover@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mouseover@body
+    target:input#target
+    relatedTarget:null
+
+mouseover@html
+    target:input#target
+    relatedTarget:null
+
+mouseover@document
+    target:input#target
+    relatedTarget:null
+
+mouseover@window
+    target:input#target
+    relatedTarget:null
+
+mouseenter@input#target
+    target:input#target
+    relatedTarget:null
+
+mouseenter@div#divInsideSummary
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mouseenter@summary
+    target:summary
+    relatedTarget:null
+
+mouseenter@details
+    target:details
+    relatedTarget:null
+
+mouseenter@div#detailsContainer
+    target:div#detailsContainer
+    relatedTarget:null
+
+mouseenter@body
+    target:body
+    relatedTarget:null
+
+mouseenter@html
+    target:html
+    relatedTarget:null
+
+mousemove@input#target
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#divInsideSummary
+    target:input#target
+    relatedTarget:null
+
+mousemove@summary
+    target:input#target
+    relatedTarget:null
+
+mousemove@details
+    target:input#target
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:input#target
+    relatedTarget:null
+
+mousemove@body
+    target:input#target
+    relatedTarget:null
+
+mousemove@html
+    target:input#target
+    relatedTarget:null
+
+mousemove@document
+    target:input#target
+    relatedTarget:null
+
+mousemove@window
+    target:input#target
+    relatedTarget:null
+
+mouseout@input#target
+    target:input#target
+    relatedTarget:div#divInsideSummary
+
+mouseout@div#divInsideSummary
+    target:input#target
+    relatedTarget:div#divInsideSummary
+
+mouseout@summary
+    target:input#target
+    relatedTarget:div#divInsideSummary
+
+mouseout@details
+    target:input#target
+    relatedTarget:div#divInsideSummary
+
+mouseout@div#detailsContainer
+    target:input#target
+    relatedTarget:div#divInsideSummary
+
+mouseout@body
+    target:input#target
+    relatedTarget:div#divInsideSummary
+
+mouseout@html
+    target:input#target
+    relatedTarget:div#divInsideSummary
+
+mouseout@document
+    target:input#target
+    relatedTarget:div#divInsideSummary
+
+mouseout@window
+    target:input#target
+    relatedTarget:div#divInsideSummary
+
+mouseleave@input#target
+    target:input#target
+    relatedTarget:div#divInsideSummary
+
+mouseover@div#divInsideSummary
+    target:div#divInsideSummary
+    relatedTarget:input#target
+
+mouseover@summary
+    target:div#divInsideSummary
+    relatedTarget:input#target
+
+mouseover@details
+    target:div#divInsideSummary
+    relatedTarget:input#target
+
+mouseover@div#detailsContainer
+    target:div#divInsideSummary
+    relatedTarget:input#target
+
+mouseover@body
+    target:div#divInsideSummary
+    relatedTarget:input#target
+
+mouseover@html
+    target:div#divInsideSummary
+    relatedTarget:input#target
+
+mouseover@document
+    target:div#divInsideSummary
+    relatedTarget:input#target
+
+mouseover@window
+    target:div#divInsideSummary
+    relatedTarget:input#target
+
+mousemove@div#divInsideSummary
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousemove@summary
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousemove@details
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousemove@div#detailsContainer
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousemove@body
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousemove@html
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousemove@document
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousemove@window
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousedown@div#divInsideSummary
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousedown@summary
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousedown@details
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousedown@div#detailsContainer
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousedown@body
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousedown@html
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousedown@document
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mousedown@window
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mouseup@div#divInsideSummary
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mouseup@summary
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mouseup@details
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mouseup@div#detailsContainer
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mouseup@body
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mouseup@html
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mouseup@document
+    target:div#divInsideSummary
+    relatedTarget:null
+
+mouseup@window
+    target:div#divInsideSummary
+    relatedTarget:null
+
+click@div#divInsideSummary
+    target:div#divInsideSummary
+    relatedTarget:null
+
+click@summary
+    target:div#divInsideSummary
+    relatedTarget:null
+
+click@details
+    target:div#divInsideSummary
+    relatedTarget:null
+
+click@div#detailsContainer
+    target:div#divInsideSummary
+    relatedTarget:null
+
+click@body
+    target:div#divInsideSummary
+    relatedTarget:null
+
+click@html
+    target:div#divInsideSummary
+    relatedTarget:null
+
+click@document
+    target:div#divInsideSummary
+    relatedTarget:null
+
+click@window
+    target:div#divInsideSummary
+    relatedTarget:null
+
+
index 782dd9991be96e3a00c06835930be505348a6f8f..9f5dba8f5fd6cdce20933198940a137936006162 100644 (file)
@@ -14,4 +14,5 @@ layer at (0,0) size 800x600
         RenderText {#text} at (13,5) size 61x17
           text run at (13,5) width 61: " Project"
         RenderText {#text} at (0,0) size 0x0
-caret: position 0 of child 0 {#text} of child 1 {SPAN} of child 3 {DIV} of body
+selection start: position 0 of child 0 {#text} of child 1 {SPAN} of child 3 {DIV} of body
+selection end:   position 0 of child 1 {#text} of child 3 {DIV} of child 3 {DIV} of body
index 3460481f967b68f2b5ce791c62deb3df9669fae3..13d33afd044e30f61559e3d4b990b60359a2c7d6 100644 (file)
@@ -1,3 +1,27 @@
+2015-05-08  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] Some tests fail because they do not assume the popup menu captures click events
+        https://bugs.webkit.org/show_bug.cgi?id=40601
+
+        Reviewed by Carlos Garcia Campos.
+
+        Popdown all attached menus when moving between tests and between each new
+        event sent to the WebView. This prevents context and popup menus from eating
+        events.
+
+        * WebKitTestRunner/PlatformWebView.h: Added a helper method to do menu popdown.
+        * WebKitTestRunner/TestController.cpp: Add a specialization of these methods for GTK+.
+        * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
+        (WTR::dispatchEvent): Popdown all menus between dispatching events.
+        (WTR::EventSenderProxy::replaySavedEvents): Pass the view when dispatching events.
+        (WTR::EventSenderProxy::sendOrQueueEvent): Pass the view when dispatching events.
+        * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
+        (WTR::PlatformWebView::hideAllPopupMenus): Added this helper.
+        * WebKitTestRunner/gtk/TestControllerGtk.cpp:
+        (WTR::TestController::platformConfigureViewForTest): Added this stub, which is no
+        longer in the platform-independent file.
+        (WTR::TestController::platformResetPreferencesToConsistentValues): Popdown menus.
+
 015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
 
         [GTK] Checks for DEVELOPMENT_BUILD are all wrong
index 0e7c89e29ead6b71bfd80fc015136d904ac378db..23110abb252c659871eeb5d8d27f7f849bdc0d9e 100644 (file)
@@ -97,6 +97,7 @@ private:
 
 #if PLATFORM(GTK)
     void sendOrQueueEvent(GdkEvent*);
+    void dispatchEvent(GdkEvent*);
     GdkEvent* createMouseButtonEvent(GdkEventType, unsigned button, WKEventModifiers);
     GUniquePtr<GdkEvent> createTouchEvent(GdkEventType, int id);
     void sendUpdatedTouchEvents();
index 42c9ef6d4fc82a38273d9978f08632ac76a7162d..f2f08112e87f8a999d6ce02890a66d192b0271c1 100644 (file)
@@ -85,6 +85,10 @@ public:
 
     void changeWindowScaleIfNeeded(float newScale);
 
+#if PLATFORM(GTK)
+    void dismissAllPopupMenus();
+#endif
+
 private:
     void forceWindowFramesChanged();
 
index 06e67d631d08ae45b642985b832a6650fd855ec4..3f0358b0f0f0a2143777157c8d56630296810c8d 100644 (file)
@@ -797,7 +797,7 @@ void TestController::updateLayoutTypeForTest(const TestInvocation& test)
     ensureViewSupportsOptions(viewOptions.get());
 }
 
-#if !PLATFORM(COCOA)
+#if !PLATFORM(COCOA) && !PLATFORM(GTK)
 void TestController::platformConfigureViewForTest(const TestInvocation&)
 {
 }
index d39bbd0b663409fef8d8536c310126af93d17729..e0a7d8d5f86597994917fa5b426219d4c20122fe 100644 (file)
@@ -162,8 +162,17 @@ void EventSenderProxy::updateClickCountForButton(int button)
     m_clickButton = button;
 }
 
-static void dispatchEvent(GdkEvent* event)
+void EventSenderProxy::dispatchEvent(GdkEvent* event)
 {
+    ASSERT(m_testController->mainWebView());
+
+    // If we are sending an escape key to the WebView, this has the side-effect of dismissing
+    // any current popups anyway. Chances are that the test is doing this to dismiss the popup
+    // anyway. Not all tests properly dismiss popup menus, so we still need to do it manually
+    // if this isn't an escape key press.
+    if (event->type != GDK_KEY_PRESS || event->key.keyval != GDK_KEY_Escape)
+        m_testController->mainWebView()->dismissAllPopupMenus();
+
     gtk_main_do_event(event);
     gdk_event_free(event);
 }
index 0023a41ed6a1df38a757b6c48cdf7fd690c673cc..d5a80dd462675d0f5866dd5a4fe163464c9b6a4c 100644 (file)
@@ -31,6 +31,7 @@
 #include <WebKit/WKImageCairo.h>
 #include <WebKit/WKViewPrivate.h>
 #include <gtk/gtk.h>
+#include <wtf/Assertions.h>
 
 namespace WTR {
 
@@ -140,5 +141,16 @@ void PlatformWebView::didInitializeClients()
 {
 }
 
+void PlatformWebView::dismissAllPopupMenus()
+{
+    // gtk_menu_popdown doesn't modify the GList of attached menus, so it should
+    // be safe to walk this list while calling it.
+    GList* attachedMenusList = gtk_menu_get_for_attach_widget(GTK_WIDGET(m_view));
+    g_list_foreach(attachedMenusList, [] (void* data, void*) {
+        ASSERT(data);
+        gtk_menu_popdown(GTK_MENU(data));
+    }, nullptr);
+}
+
 } // namespace WTR
 
index 21fce929eec466e25b8aa84fd4a4ed3ecf18035a..f242e962441c07e3edddf6abec67b83493a37962 100644 (file)
@@ -27,6 +27,7 @@
 #include "config.h"
 #include "TestController.h"
 
+#include "PlatformWebView.h"
 #include <gtk/gtk.h>
 #include <wtf/Platform.h>
 #include <wtf/gobject/GMainLoopSource.h>
@@ -109,4 +110,15 @@ const char* TestController::platformLibraryPathForTesting()
     return 0;
 }
 
+void TestController::platformConfigureViewForTest(const TestInvocation&)
+{
+}
+
+void TestController::platformResetPreferencesToConsistentValues()
+{
+    if (!m_mainWebView)
+        return;
+    m_mainWebView->dismissAllPopupMenus();
+}
+
 } // namespace WTR