Changeset 60489 in webkit


Ignore:
Timestamp:
Jun 1, 2010 11:04:19 AM (14 years ago)
Author:
Martin Robinson
Message:

2010-05-12 Martin Robinson <mrobinson@igalia.com>

Reviewed by Xan Lopez.

[GTK] Get more mouse tests passing
https://bugs.webkit.org/show_bug.cgi?id=39040

Unskip tests that are now passing.

  • platform/gtk/Skipped:

2010-06-01 Martin Robinson <mrobinson@igalia.com>

Reviewed by Xan Lopez.

[GTK] Get more mouse tests passing
https://bugs.webkit.org/show_bug.cgi?id=39040

Reproduce the logic from the Windows EventSender for mapping
button numbers to GDK button numbers. Move this logic to the
prepareMouseButtonEvent helper.

  • DumpRenderTree/gtk/EventSender.cpp: (prepareMouseButtonEvent): Reproduce Windows logic. (contextClickCallback): Move mapping logic to prepareMouseButtonEvent. (mouseDownCallback): Ditto. (mouseUpCallback): Ditto.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r60488 r60489  
     12010-05-12  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] Get more mouse tests passing
     6        https://bugs.webkit.org/show_bug.cgi?id=39040
     7
     8        Unskip tests that are now passing.
     9
     10        * platform/gtk/Skipped:
     11
    1122010-06-01  Alexey Proskuryakov  <ap@apple.com>
    213
  • trunk/LayoutTests/platform/gtk/Skipped

    r60488 r60489  
    12161216fast/events/blur-focus-window-should-blur-focus-element.html
    12171217fast/events/content-changed-during-drop.html
    1218 fast/events/context-onmousedown-event.html
    12191218fast/events/crash-on-mutate-during-drop.html
    12201219fast/events/drag-in-frames.html
    12211220fast/events/frame-tab-focus.html
    12221221fast/events/js-keyboard-event-creation.html
    1223 fast/events/mouse-click-events.html
    12241222fast/events/mouseup-from-button2.html
    12251223fast/events/offsetX-offsetY.html
     
    21432141fast/events/context-no-deselect.html
    21442142fast/events/event-listener-on-link.html
    2145 fast/events/event-sender-mouse-moved.html
    21462143fast/events/focusingUnloadedFrame.html
    21472144fast/events/keydown-1.html
    21482145fast/events/label-focus.html
    2149 fast/events/mouseout-dead-node.html
    21502146fast/events/onload-re-entry.html
    21512147fast/events/onloadFrameCrash.html
  • trunk/WebKitTools/ChangeLog

    r60488 r60489  
     12010-06-01  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] Get more mouse tests passing
     6        https://bugs.webkit.org/show_bug.cgi?id=39040
     7
     8        Reproduce the logic from the Windows EventSender for mapping
     9        button numbers to GDK button numbers. Move this logic to the
     10        prepareMouseButtonEvent helper.
     11
     12        * DumpRenderTree/gtk/EventSender.cpp:
     13        (prepareMouseButtonEvent): Reproduce Windows logic.
     14        (contextClickCallback): Move mapping logic to prepareMouseButtonEvent.
     15        (mouseDownCallback): Ditto.
     16        (mouseUpCallback): Ditto.
     17
    1182010-06-01  Alexey Proskuryakov  <ap@apple.com>
    219
     
    3451        to achieve, it seems unnecessary.
    3552
    36 2010-06-01  Martin Robinson  <mrobinson@igalia.com>
     532010-05-12  Martin Robinson  <mrobinson@igalia.com>
    3754
    3855        Reviewed by Xan Lopez.
  • trunk/WebKitTools/DumpRenderTree/gtk/EventSender.cpp

    r60482 r60489  
    110110}
    111111
    112 bool prepareMouseButtonEvent(GdkEvent* event, int button)
     112bool prepareMouseButtonEvent(GdkEvent* event, int eventSenderButtonNumber)
    113113{
    114114    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
     
    116116        return false;
    117117
     118    // The logic for mapping EventSender button numbers to GDK button
     119    // numbers originates from the Windows EventSender.
     120    int gdkButtonNumber = 3;
     121    if (eventSenderButtonNumber >= 0 && eventSenderButtonNumber <= 2)
     122        gdkButtonNumber = eventSenderButtonNumber + 1;
     123
     124    // fast/events/mouse-click-events expects the 4th button
     125    // to be event.button = 1, so send a middle-button event.
     126    else if (eventSenderButtonNumber == 3)
     127        gdkButtonNumber = 2;
     128
    118129    memset(event, 0, sizeof(event));
    119     event->button.button = button;
     130    event->button.button = gdkButtonNumber;
    120131    event->button.x = lastMousePositionX;
    121132    event->button.y = lastMousePositionY;
     
    145156{
    146157    GdkEvent event;
    147     if (!prepareMouseButtonEvent(&event, 3))
     158    if (!prepareMouseButtonEvent(&event, 2))
    148159        return JSValueMakeUndefined(context);
    149160
     
    184195static JSValueRef mouseDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    185196{
    186     int button = 1;
     197    int button = 0;
    187198    if (argumentCount == 1) {
    188         button = static_cast<int>(JSValueToNumber(context, arguments[0], exception)) + 1;
     199        button = static_cast<int>(JSValueToNumber(context, arguments[0], exception));
    189200        g_return_val_if_fail((!exception || !*exception), JSValueMakeUndefined(context));
    190201    }
     
    229240static JSValueRef mouseUpCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    230241{
    231     int button = 1;
     242    int button = 0;
    232243    if (argumentCount == 1) {
    233         button = static_cast<int>(JSValueToNumber(context, arguments[0], exception)) + 1;
     244        button = static_cast<int>(JSValueToNumber(context, arguments[0], exception));
    234245        g_return_val_if_fail((!exception || !*exception), JSValueMakeUndefined(context));
    235246    }
Note: See TracChangeset for help on using the changeset viewer.