⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 184015 in webkit


Ignore:
Timestamp:
May 8, 2015, 2:21:32 PM (11 years ago)
Author:
Martin Robinson
Message:

[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.

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.
Location:
trunk
Files:
4 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r184013 r184015  
     12015-05-08  Martin Robinson  <mrobinson@igalia.com>
     2
     3        [GTK] Some tests fail because they do not assume the popup menu captures click events
     4        https://bugs.webkit.org/show_bug.cgi?id=40601
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        * platform/gtk/TestExpectations: Unskip tests that are passing now
     9        and classify remaining failures.
     10        * platform/gtk/editing/selection/5354455-2-expected.txt: Rebaselined.
     11        * platform/gtk/editing/selection/doubleclick-crash-expected.png: Rebaseline.
     12        * platform/gtk/editing/selection/doubleclick-crash-expected.txt: Rebaseline.
     13        * platform/gtk/editing/selection/user-select-all-image-with-single-click-expected.txt: Rebaselined.
     14        * platform/gtk/editing/selection/user-select-all-with-single-click-expected.txt: Rebaselined.
     15        * platform/gtk/fast/events/mouseup-from-button2-expected.txt: Rebaseline.
     16        * platform/gtk/fast/events/shadow-event-path-2-expected.txt: Rebaseline.
     17        * platform/gtk/fast/events/shadow-event-path-expected.txt: Rebaseline.
     18        * platform/gtk/fast/events/updateLayoutForHitTest-expected.txt: Rebaselined.
     19
     20
    1212015-05-08  Brent Fulgham  <bfulgham@apple.com>
    222
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r183995 r184015  
    712712webkit.org/b/129050 fast/sub-pixel/compositing-layers-on-subpixel-position.html [ ImageOnlyFailure Crash Pass ]
    713713
     714webkit.org/b/144771 editing/selection/selection-invalid-offset.html [ Crash ]
    714715
    715716#////////////////////////////////////////////////////////////////////////////////////////
     
    12381239
    12391240webkit.org/b/108925 http/tests/media/video-play-stall.html [ Failure Timeout ]
    1240 
    1241 webkit.org/b/114789 fast/events/page-visibility-transition-test.html [ Timeout ]
    12421241
    12431242webkit.org/b/116956 fast/events/event-view-toString.html [ Timeout ]
     
    14421441webkit.org/b/63706 editing/pasteboard/cleanup-on-move.html [ Failure ]
    14431442webkit.org/b/63706 editing/pasteboard/drag-list-item.html [ Failure ]
    1444 
    1445 # WebKit2 needs testRunner.setEditingBehaviour and other issues.
     1443webkit.org/b/63706 fast/events/ondragenter.html [ Failure ]
     1444webkit.org/b/63706 fast/events/drag-and-drop-autoscroll-inner-frame.html [ Timeout ]
     1445webkit.org/b/63706 fast/events/drag-customData.html  [ Timeout ]
     1446
     1447# Need support for internals.settings.setDeviceSupportsMouse
     1448fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html
     1449
     1450# WebKit2 testRunner.setEditingBehaviour appears broken sometimes.
     1451webkit.org/b/144764 editing/selection/move-by-word-visually-mac.html [ Failure ]
    14461452Bug(GTK) editing/selection/extend-after-mouse-selection.html [ Failure ]
    14471453
     
    14641470webkit.org/b/42194 fast/events/5056619.html [ Failure ]
    14651471webkit.org/b/42194 http/tests/security/drag-drop-same-unique-origin.html [ Failure ]
    1466 
    1467 # Context menu problems.
    1468 webkit.org/b/120401 fast/events [ Skip ]
    1469 webkit.org/b/120401 editing/selection [ Skip ]
    14701472
    14711473webkit.org/b/106340 accessibility/img-fallsback-to-title.html [ Failure ]
     
    16861688Bug(GTK) fast/forms/range/slider-zoomed.html [ Failure ]
    16871689
    1688 # Tests failing because the context menu is grabbing mouse events.
    1689 webkit.org/b/40601 fast/events/mouse-click-events.html [ Failure ]
    1690 webkit.org/b/40601 fast/events/mouseup-from-button2.html [ Failure ]
    1691 webkit.org/b/40601 fast/events/right-click-focus.html [ Failure ]
    1692 
    16931690# Tests that fail across all platforms.
    16941691# Even though some platforms don't skip these tests, there are platform-specific
     
    18351832
    18361833webkit.org/b/98950 transitions/blendmode-transitions.html [ Failure ]
    1837 
    1838 webkit.org/b/100424 editing/selection/user-select-all-selection.html [ Failure ]
    1839 webkit.org/b/100424 editing/selection/user-select-all-with-shift.html [ Failure ]
    18401834
    18411835webkit.org/b/100846 inspector-protocol/debugger/pause-dedicated-worker.html [ Skip ]
     
    23292323webkit.org/b/144690 editing/spelling/delete-into-misspelled-word.html [ Timeout Pass ]
    23302324
     2325# Touch events not working
     2326webkit.org/b/144765 fast/events/event-attribute.html  [ Failure ]
     2327webkit.org/b/144765 fast/events/touch/touch-slider.html [ Failure ]
     2328webkit.org/b/144765 fast/events/touch/touch-inside-iframe-scrolled.html [ Failure ]
     2329webkit.org/b/144765 fast/events/touch/touch-slider-no-js-touch-listener.html [ Failure ]
     2330webkit.org/b/144765 fast/events/touch/touch-inside-iframe.html [ Timeout ]
     2331
     2332# Need support for adjusting page visibility in the test harness.
     2333webkit.org/b/114789 fast/events/page-visibility-iframe-delete-test.html [ Timeout ]
     2334webkit.org/b/114789 fast/events/page-visibility-iframe-move-test.html [ Timeout ]
     2335webkit.org/b/114789 fast/events/page-visibility-iframe-propagation-test.html [ Timeout ]
     2336webkit.org/b/114789 fast/events/page-visibility-transition-test.html [ Timeout ]
     2337
     2338webkit.org/b/144763 fast/events/scroll-in-scaled-page-with-overflow-hidden.html
     2339
    23312340#////////////////////////////////////////////////////////////////////////////////////////
    23322341# End of Tests failing
  • trunk/LayoutTests/platform/gtk/editing/selection/5354455-2-expected.txt

    r148801 r184015  
    2121        text run at (0,51) width 59: "removed."
    2222      RenderText {#text} at (0,0) size 0x0
    23 caret: position 118 of child 2 {#text} of body
     23caret: position 0 of child 0 {#text} of child 1 {H1} of body
  • trunk/LayoutTests/platform/gtk/editing/selection/user-select-all-image-with-single-click-expected.txt

    r152215 r184015  
    44| <div>
    55|   class="select-all"
     6|   <#selection-anchor>
    67|   <img>
    78|     src="../resources/abe.png"
     9|   <#selection-focus>
  • trunk/LayoutTests/platform/gtk/editing/selection/user-select-all-with-single-click-expected.txt

    r152215 r184015  
    33| <div>
    44|   class="select-all"
    5 |   "C<#selection-caret>lick here"
     5|   "<#selection-anchor>Click here<#selection-focus>"
  • trunk/LayoutTests/platform/gtk/fast/events/updateLayoutForHitTest-expected.txt

    r152871 r184015  
    1515          text run at (13,5) width 61: " Project"
    1616        RenderText {#text} at (0,0) size 0x0
    17 caret: position 0 of child 0 {#text} of child 1 {SPAN} of child 3 {DIV} of body
     17selection start: position 0 of child 0 {#text} of child 1 {SPAN} of child 3 {DIV} of body
     18selection end:   position 0 of child 1 {#text} of child 3 {DIV} of child 3 {DIV} of body
  • trunk/Tools/ChangeLog

    r184010 r184015  
     12015-05-08  Martin Robinson  <mrobinson@igalia.com>
     2
     3        [GTK] Some tests fail because they do not assume the popup menu captures click events
     4        https://bugs.webkit.org/show_bug.cgi?id=40601
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Popdown all attached menus when moving between tests and between each new
     9        event sent to the WebView. This prevents context and popup menus from eating
     10        events.
     11
     12        * WebKitTestRunner/PlatformWebView.h: Added a helper method to do menu popdown.
     13        * WebKitTestRunner/TestController.cpp: Add a specialization of these methods for GTK+.
     14        * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
     15        (WTR::dispatchEvent): Popdown all menus between dispatching events.
     16        (WTR::EventSenderProxy::replaySavedEvents): Pass the view when dispatching events.
     17        (WTR::EventSenderProxy::sendOrQueueEvent): Pass the view when dispatching events.
     18        * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
     19        (WTR::PlatformWebView::hideAllPopupMenus): Added this helper.
     20        * WebKitTestRunner/gtk/TestControllerGtk.cpp:
     21        (WTR::TestController::platformConfigureViewForTest): Added this stub, which is no
     22        longer in the platform-independent file.
     23        (WTR::TestController::platformResetPreferencesToConsistentValues): Popdown menus.
     24
    125015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
    226
  • trunk/Tools/WebKitTestRunner/EventSenderProxy.h

    r182963 r184015  
    9898#if PLATFORM(GTK)
    9999    void sendOrQueueEvent(GdkEvent*);
     100    void dispatchEvent(GdkEvent*);
    100101    GdkEvent* createMouseButtonEvent(GdkEventType, unsigned button, WKEventModifiers);
    101102    GUniquePtr<GdkEvent> createTouchEvent(GdkEventType, int id);
  • trunk/Tools/WebKitTestRunner/PlatformWebView.h

    r168961 r184015  
    8686    void changeWindowScaleIfNeeded(float newScale);
    8787
     88#if PLATFORM(GTK)
     89    void dismissAllPopupMenus();
     90#endif
     91
    8892private:
    8993    void forceWindowFramesChanged();
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r183675 r184015  
    798798}
    799799
    800 #if !PLATFORM(COCOA)
     800#if !PLATFORM(COCOA) && !PLATFORM(GTK)
    801801void TestController::platformConfigureViewForTest(const TestInvocation&)
    802802{
  • trunk/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp

    r183995 r184015  
    163163}
    164164
    165 static void dispatchEvent(GdkEvent* event)
    166 {
     165void EventSenderProxy::dispatchEvent(GdkEvent* event)
     166{
     167    ASSERT(m_testController->mainWebView());
     168
     169    // If we are sending an escape key to the WebView, this has the side-effect of dismissing
     170    // any current popups anyway. Chances are that the test is doing this to dismiss the popup
     171    // anyway. Not all tests properly dismiss popup menus, so we still need to do it manually
     172    // if this isn't an escape key press.
     173    if (event->type != GDK_KEY_PRESS || event->key.keyval != GDK_KEY_Escape)
     174        m_testController->mainWebView()->dismissAllPopupMenus();
     175
    167176    gtk_main_do_event(event);
    168177    gdk_event_free(event);
  • trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp

    r175775 r184015  
    3232#include <WebKit/WKViewPrivate.h>
    3333#include <gtk/gtk.h>
     34#include <wtf/Assertions.h>
    3435
    3536namespace WTR {
     
    141142}
    142143
     144void PlatformWebView::dismissAllPopupMenus()
     145{
     146    // gtk_menu_popdown doesn't modify the GList of attached menus, so it should
     147    // be safe to walk this list while calling it.
     148    GList* attachedMenusList = gtk_menu_get_for_attach_widget(GTK_WIDGET(m_view));
     149    g_list_foreach(attachedMenusList, [] (void* data, void*) {
     150        ASSERT(data);
     151        gtk_menu_popdown(GTK_MENU(data));
     152    }, nullptr);
     153}
     154
    143155} // namespace WTR
    144156
  • trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp

    r177870 r184015  
    2828#include "TestController.h"
    2929
     30#include "PlatformWebView.h"
    3031#include <gtk/gtk.h>
    3132#include <wtf/Platform.h>
     
    110111}
    111112
     113void TestController::platformConfigureViewForTest(const TestInvocation&)
     114{
     115}
     116
     117void TestController::platformResetPreferencesToConsistentValues()
     118{
     119    if (!m_mainWebView)
     120        return;
     121    m_mainWebView->dismissAllPopupMenus();
     122}
     123
    112124} // namespace WTR
Note: See TracChangeset for help on using the changeset viewer.