Changeset 82625 in webkit


Ignore:
Timestamp:
Mar 31, 2011 3:09:32 PM (13 years ago)
Author:
Darin Adler
Message:

2011-03-31 Darin Adler <Darin Adler>

Reviewed by Sam Weinig.

Implement mouseDown, mouseUp, and mouseMoveTo in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=57573

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSimulateMouseDown): Added. (WKBundlePageSimulateMouseUp): Added. (WKBundlePageSimulateMouseMotion): Added.
  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Added above functions.
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::simulateMouseDown): Added. (WebKit::WebPage::simulateMouseUp): Added. (WebKit::WebPage::simulateMouseMotion): Added.
  • WebProcess/WebPage/WebPage.h: Added above functions.

2011-03-31 Darin Adler <Darin Adler>

Reviewed by Sam Weinig.

Implement mouseDown, mouseUp, and mouseMoveTo in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=57573

  • platform/mac-wk2/Skipped: Removed now-passing tests. Resorted the section under eventSender, and expanded directories to list the individual tests in that section.

2011-03-31 Darin Adler <Darin Adler>

Reviewed by Sam Weinig.

Implement mouseDown, mouseUp, and mouseMoveTo in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=57573

  • WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: Added real definitions for mouseDown, mouseUp, mouseMoveTo and leapForward. Removed fake definitions of keyDown and contextClick.
  • WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::operator==): Added. So we can compare two WKPoint structs. (WTR::parseModifier): Added. (WTR::parseModifierArray): Added. (WTR::EventSendingController::EventSendingController): Initialize the new data members. (WTR::EventSendingController::mouseDown): Added. Calls WKBundlePageSimulateMouseDown. (WTR::EventSendingController::mouseUp): Added. Calls WKBundlePageSimulateMouseUp. (WTR::EventSendingController::mouseMoveTo): Added. Calls WKBundlePageSimulateMouseMotion. (WTR::EventSendingController::leapForward): Added. (WTR::EventSendingController::updateClickCount): Added. Used by the mouseDown/Up functions to create a click count.
  • WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated for the changes above.
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r82623 r82625  
     12011-03-31  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Implement mouseDown, mouseUp, and mouseMoveTo in WebKitTestRunner
     6        https://bugs.webkit.org/show_bug.cgi?id=57573
     7
     8        * platform/mac-wk2/Skipped: Removed now-passing tests. Resorted
     9        the section under eventSender, and expanded directories to list
     10        the individual tests in that section.
     11
    1122011-03-31  Adam Barth  <abarth@webkit.org>
    213
  • trunk/LayoutTests/platform/mac-wk2/Skipped

    r82547 r82625  
    5353# WebKitTestRunner needs an implementation of eventSender
    5454# <https://bugs.webkit.org/show_bug.cgi?id=42194>
     55editing/deleting/5729680.html
     56editing/deleting/delete-by-word-001.html
     57editing/deleting/delete-by-word-002.html
     58editing/deleting/delete-ligature-001.html
     59editing/deleting/delete-ligature-002.html
     60editing/deleting/delete-ligature-003.html
     61editing/deleting/forward-delete-key.html
     62editing/deleting/skip-virama-001.html
     63editing/deleting/smart-delete-001.html
     64editing/deleting/smart-delete-002.html
     65editing/deleting/smart-delete-003.html
     66editing/deleting/smart-delete-004.html
     67editing/execCommand/findString-2.html
     68editing/input/emacs-ctrl-o.html
     69editing/input/option-page-up-down.html
     70editing/input/page-up-down-scrolls.html
     71editing/input/scroll-viewport-page-up-down.html
     72editing/inserting/return-key-in-hidden-field.html
     73editing/inserting/typing-tab-designmode-forms.html
     74editing/inserting/typing-tab-designmode.html
     75editing/pasteboard/4861080.html
     76editing/pasteboard/4944770-2.html
     77editing/pasteboard/4947130.html
     78editing/pasteboard/drag-drop-dead-frame.html
     79editing/pasteboard/drag-drop-input-textarea.html
     80editing/pasteboard/drag-drop-modifies-page.html
     81editing/pasteboard/drag-drop-url-text.html
     82editing/pasteboard/drag-image-in-about-blank-frame.html
     83editing/pasteboard/drag-image-to-contenteditable-in-iframe.html
     84editing/pasteboard/drag-selected-image-to-contenteditable.html
    5585editing/pasteboard/drop-file-svg.html
    56 editing/selection/drag-select-rapidly.html
    57 fast/forms/select-listbox-multiple-no-focusring.html
    58 fast/forms/textinput-not-fired-on-enter-in-input.html
    59 svg/animations/animate-color-fill-currentColor.html
    60 svg/dynamic-updates/SVGFESpecularLightingElement-dom-in-attr.html
    61 svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularConstant-attr.html
    62 svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularExponent-attr.html
    63 svg/dynamic-updates/SVGFESpecularLightingElement-dom-suraceScale-attr.html
    64 svg/dynamic-updates/SVGFESpecularLightingElement-remove-lightSource.html
    65 svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-in-prop.html
    66 svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularConstant-prop.html
    67 svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularExponent-prop.html
    68 svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-suraceScale-prop.html
    69 fast/forms/file-input-hit-test.html
    70 fast/repaint/slider-thumb-drag-release.html
    71 fast/repaint/slider-thumb-float.html
    72 editing/pasteboard/emacs-ctrl-k-y-001.html
    73 editing/pasteboard/drag-drop-dead-frame.html
    74 editing/pasteboard/drag-drop-modifies-page.html
    75 editing/pasteboard/drag-selected-image-to-contenteditable.html
     86editing/pasteboard/drop-inputtext-acquires-style.html
    7687editing/pasteboard/drop-link.html
    77 editing/pasteboard/drop-text-events-sideeffect.html
    7888editing/pasteboard/drop-text-events.html
    7989editing/pasteboard/drop-text-without-selection.html
     90editing/pasteboard/emacs-cntl-y-001.html
    8091editing/pasteboard/emacs-ctrl-a-k-y.html
     92editing/pasteboard/emacs-ctrl-k-y-001.html
     93editing/pasteboard/file-input-files-access.html
     94editing/pasteboard/files-during-page-drags.html
     95editing/pasteboard/get-data-text-plain-drop.html
    8196editing/pasteboard/smart-drag-drop.html
    8297editing/pasteboard/smart-paste-001.html
     
    88103editing/pasteboard/smart-paste-008.html
    89104editing/pasteboard/subframe-dragndrop-1.html
    90 inspector/timeline/timeline-event-dispatch.html
    91 fast/text/offsetForPosition-complex-fallback.html
    92 svg/animations/animate-path-to-animation.html
    93 fast/forms/input-number-change-type-on-focus.html
    94 fast/forms/search-hide-cancel-on-cancel.html
    95 fast/dom/search-shadow-host-crash.html
    96 http/tests/security/isolatedWorld/events.html
    97 http/tests/security/isolatedWorld/userGestureEvents.html
    98 http/tests/misc/isindex-with-no-form-base-href.html
    99 plugins/clicking-missing-plugin-fires-delegate.html
    100 editing/deleting/delete-by-word-001.html
    101 editing/deleting/delete-by-word-002.html
    102 editing/deleting/delete-ligature-001.html
    103 editing/deleting/delete-ligature-002.html
    104 editing/deleting/delete-ligature-003.html
    105 editing/input/emacs-ctrl-o.html
    106 editing/selection/contenteditable-click-inside.html
    107 fast/forms/focus-change-on-keypress.html
    108 fast/forms/select-live-pseudo-selectors.html
    109 editing/selection/caret-bidi-first-and-last-letters.html
    110 compositing/iframes/layout-on-compositing-change.html
    111 editing/deleting/5390681-2.html
    112 editing/deleting/5729680.html
    113 editing/deleting/forward-delete-key.html
    114 editing/deleting/skip-virama-001.html
    115 editing/deleting/smart-delete-001.html
    116 editing/deleting/smart-delete-002.html
    117 editing/deleting/smart-delete-003.html
    118 editing/deleting/smart-delete-004.html
    119 editing/execCommand/findString-2.html
    120 editing/input/option-page-up-down.html
    121 editing/input/page-up-down-scrolls.html
    122 editing/input/scroll-viewport-page-up-down.html
    123 editing/inserting/insert-paste-bidi-control.html
    124 editing/inserting/return-key-in-hidden-field.html
    125 editing/inserting/typing-tab-designmode-forms.html
    126 editing/inserting/typing-tab-designmode.html
    127 editing/pasteboard/4861080.html
    128 editing/pasteboard/4944770-2.html
    129 editing/pasteboard/4947130.html
    130 editing/pasteboard/copy-crash.html
    131 editing/pasteboard/drag-drop-iframe-refresh-crash.html
    132 editing/pasteboard/drag-drop-input-textarea.html
    133 editing/pasteboard/drag-drop-url-text.html
    134 editing/pasteboard/drag-image-in-about-blank-frame.html
    135 editing/pasteboard/drag-image-to-contenteditable-in-iframe.html
    136 editing/pasteboard/drop-inputtext-acquires-style.html
    137 editing/pasteboard/emacs-cntl-y-001.html
    138 editing/pasteboard/file-input-files-access.html
    139 editing/pasteboard/files-during-page-drags.html
    140 editing/pasteboard/get-data-text-plain-drop.html
    141105editing/selection/14971.html
    142106editing/selection/4895428-1.html
    143 editing/selection/4895428-2.html
    144 editing/selection/4895428-3.html
    145107editing/selection/4895428-4.html
    146 editing/selection/5057506-2.html
    147108editing/selection/5057506.html
    148 editing/selection/5131716-1.html
    149 editing/selection/5131716-2.html
    150 editing/selection/5131716-3.html
    151 editing/selection/5131716-4.html
    152 editing/selection/5209984.html
    153 editing/selection/5213963.html
    154109editing/selection/5232159.html
    155 editing/selection/5240265.html
    156110editing/selection/5333725.html
    157111editing/selection/5354455-1.html
    158112editing/selection/5354455-2.html
    159 editing/selection/6476.html
    160 editing/selection/after-line-break.html
    161 editing/selection/anchor-focus1.html
    162113editing/selection/anchor-focus2.html
    163114editing/selection/anchor-focus3.html
    164115editing/selection/button-right-click.html
    165 editing/selection/caret-ltr-2-left.html
    166 editing/selection/caret-ltr-2.html
    167 editing/selection/caret-ltr-right.html
    168 editing/selection/caret-ltr.html
    169 editing/selection/caret-rtl-2-left.html
    170 editing/selection/caret-rtl-2.html
    171 editing/selection/caret-rtl-right.html
    172 editing/selection/caret-rtl.html
    173 editing/selection/click-after-nested-block.html
    174 editing/selection/click-before-and-after-table.html
    175116editing/selection/click-below-rtl-text.html
    176117editing/selection/click-in-focusable-link-should-not-clear-selection.html
    177118editing/selection/click-in-margins-inside-editable-div.html
    178119editing/selection/click-in-padding-with-multiple-line-boxes.html
    179 editing/selection/click-left-of-rtl-wrapping-text.html
    180 editing/selection/click-outside-editable-div.html
    181 editing/selection/click-start-of-line.html
    182120editing/selection/contains-boundaries.html
    183121editing/selection/context-menu-on-text.html
    184 editing/selection/crash-on-drag-with-mutation-events.html
    185 editing/selection/delete-word-granularity-text-control.html
    186122editing/selection/doubleclick-beside-cr-span.html
    187123editing/selection/doubleclick-crash.html
     
    189125editing/selection/doubleclick-whitespace-img-crash.html
    190126editing/selection/doubleclick-whitespace.html
    191 editing/selection/drag-in-iframe.html
    192127editing/selection/drag-select-1.html
     128editing/selection/drag-select-rapidly.html
    193129editing/selection/drag-start-event-client-x-y.html
    194 editing/selection/drag-text-delay.html
    195130editing/selection/drag-to-contenteditable-iframe.html
    196131editing/selection/editable-links.html
     
    202137editing/selection/fake-doubleclick.html
    203138editing/selection/fake-drag.html
    204 editing/selection/focus-and-display-none.html
    205 editing/selection/focus-crash.html
    206 editing/selection/hit-test-anonymous.html
    207139editing/selection/inline-closest-leaf-child.html
    208140editing/selection/last-empty-inline.html
    209 editing/selection/mixed-editability-1.html
    210141editing/selection/mixed-editability-10.html
    211142editing/selection/move-begin-end.html
    212143editing/selection/paragraph-granularity.html
    213 editing/selection/select-all-iframe.html
    214144editing/selection/select-from-textfield-outwards.html
    215145editing/selection/selection-actions.html
    216146editing/selection/shift-click.html
    217147editing/selection/shrink-selection-after-shift-pagedown.html
    218 editing/selection/triple-click-in-pre.html
    219148editing/selection/user-drag-element-and-user-select-none.html
    220149editing/selection/word-granularity.html
     
    224153editing/undo/undo-smart-delete-reversed-selection.html
    225154editing/undo/undo-smart-delete-word.html
    226 fast/block/float/float-in-float-hit-testing.html
    227 fast/block/float/relative-painted-twice.html
    228155fast/blockflow/horizontal-bt-replaced-selection.html
    229156fast/blockflow/japanese-lr-selection.html
     
    231158fast/blockflow/vertical-lr-replaced-selection.html
    232159fast/blockflow/vertical-rl-replaced-selection.html
    233 fast/css-generated-content/drag-state.html
    234 fast/css-generated-content/hover-style-change.html
    235 fast/css-generated-content/positioned-background-hit-test-crash.html
    236 fast/css-generated-content/spellingToolTip-assert.html
    237 fast/css/affected-by-hover-after-style-change.html
    238 fast/css/first-letter-first-line-hover.html
    239 fast/css/first-letter-hover.html
    240 fast/css/hover-affects-child.html
    241 fast/css/hover-subselector.html
    242 fast/css/layerZOrderCrash.html
    243 fast/css/list-item-pseudo-nocrash.html
    244 fast/css/nested-layers-with-hover.html
    245 fast/css/resize-corner-tracking-transformed.html
    246 fast/css/resize-corner-tracking.html
    247 fast/css/resize-single-axis.html
    248 fast/css/universal-hover-quirk.html
    249160fast/css/user-drag-none.html
    250 fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll.html
    251 fast/dom/horizontal-scrollbar-in-rtl.html
    252161fast/dom/HTMLSelectElement/click-size-zero-no-crash.html
    253 fast/dom/HTMLTableColElement/resize-table-using-col-width.html
    254 fast/dom/Node/mutation-blur.html
    255 fast/dom/replaced-image-map.html
    256 fast/dom/vertical-scrollbar-in-rtl.html
    257162fast/dom/Window/window-postmessage-clone-frames.html
    258163fast/dom/Window/window-postmessage-clone.html
    259 fast/dom/Window/window-xy-properties.html
    260 fast/dynamic/hover-style-recalc-crash.html
    261 fast/dynamic/hovered-detach.html
     164fast/dom/horizontal-scrollbar-in-rtl.html
     165fast/dom/vertical-scrollbar-in-rtl.html
    262166fast/dynamic/layer-hit-test-crash.html
    263167fast/events/5056619.html
    264168fast/events/access-key-self-destruct.html
    265169fast/events/anchor-empty-focus.html
    266 fast/events/anchor-image-scrolled-x-y.html
    267170fast/events/arrow-keys-on-body.html
    268171fast/events/arrow-navigation.html
     
    273176fast/events/autoscroll.html
    274177fast/events/bogus-dropEffect-effectAllowed.html
    275 fast/events/capture-on-target.html
    276178fast/events/check-defocus-event-order-when-triggered-by-mouse-click.html
    277179fast/events/check-defocus-event-order-when-triggered-by-tab.html
    278180fast/events/click-count.html
    279 fast/events/click-focus-anchor.html
    280 fast/events/click-focus-control.html
    281 fast/events/clientXY-in-zoom-and-scroll.html
    282181fast/events/content-changed-during-drop.html
    283182fast/events/context-no-deselect.html
     
    292191fast/events/drag-file-crash.html
    293192fast/events/drag-in-frames.html
    294 fast/events/drag-outside-window.html
    295193fast/events/drag-parent-node.html
    296194fast/events/drag-to-navigate.html
    297 fast/events/dragging-mouse-moves.html
    298195fast/events/event-input-contentEditable.html
    299 fast/events/event-sender-mouse-moved.html
    300 fast/events/event-view-toString.html
    301196fast/events/focus-change-crash.html
    302197fast/events/focus-change-crash2.html
    303198fast/events/focusingUnloadedFrame.html
    304 fast/events/frame-click-focus.html
    305 fast/events/frame-detached-in-mousedown.html
    306199fast/events/imagemap-norender-crash.html
    307 fast/events/input-image-scrolled-x-y.html
    308200fast/events/input-tab-focus-no-duplicate-events.html
    309201fast/events/inputText-never-fired-on-keydown-cancel.html
     
    321213fast/events/menu-keydown-on-hidden-element.html
    322214fast/events/mouse-click-events.html
    323 fast/events/mouse-drag-from-frame-to-other-frame.html
    324 fast/events/mouse-drag-from-frame.html
    325 fast/events/mouse-focus-imagemap.html
    326 fast/events/mouse-relative-position.html
    327 fast/events/mouseclick-target-and-positioning.html
    328 fast/events/mousedown-in-subframe-scrollbar.html
    329 fast/events/mousedown_in_scrollbar.html
    330 fast/events/mousemove-after-drag-over-scrollbar.html
    331 fast/events/mouseout-dead-node.html
    332 fast/events/mouseout-dead-subframe.html
    333 fast/events/mouseout-on-window.html
    334 fast/events/mouseover-mouseout.html
    335 fast/events/mouseover-mouseout2.html
    336215fast/events/mouseup-from-button2.html
    337 fast/events/mouseup-outside-button.html
    338 fast/events/mouseup-outside-document.html
    339216fast/events/multiline-link-arrow-navigation.html
    340217fast/events/node-event-anchor-lock.html
    341 fast/events/onchange-click-hang.html
    342218fast/events/onchange-passwordfield.html
    343219fast/events/onchange-searchfield.html
     
    345221fast/events/onchange-text-form-field.html
    346222fast/events/onchange-textfield.html
    347 fast/events/onclick-list-marker.html
    348223fast/events/ondragenter.html
    349224fast/events/ondrop-text-html.html
    350225fast/events/onsearch-enter.html
    351226fast/events/open-window-from-another-frame.html
    352 fast/events/overflow-scroll-fake-mouse-move.html
    353227fast/events/platform-wheelevent-in-scrolling-div.html
    354 fast/events/pointer-events-2.html
    355 fast/events/pointer-events.html
    356228fast/events/popup-blocking-click-in-iframe.html
    357229fast/events/popup-when-select-change.html
    358230fast/events/prevent-drag-to-navigate.html
    359231fast/events/recorded-keydown-event.html
    360 fast/events/related-target.html
    361232fast/events/remove-child-onscroll.html
    362 fast/events/remove-shadow-host-crash.html
    363233fast/events/right-click-focus.html
    364234fast/events/scroll-after-click-on-tab-index.html
    365 fast/events/scroll-to-anchor-in-overflow-hidden.html
    366235fast/events/scrollbar-double-click.html
    367236fast/events/select-onchange-crash.html
    368237fast/events/selectionchange-user-initiated.html
    369238fast/events/selectstart-during-autoscroll.html
    370 fast/events/shadow-boundary-crossing.html
    371239fast/events/space-scroll-event.html
    372240fast/events/special-key-events-in-input-text.html
     
    376244fast/events/tab-is-focusable-assert.html
    377245fast/events/tabindex-focus-chain.html
    378 fast/events/updateLayoutForHitTest.html
    379246fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
    380247fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
    381 fast/events/window-events-bubble.html
    382 fast/events/window-events-bubble2.html
    383 fast/events/window-events-capture.html
    384248fast/events/zoom-dblclick.html
    385 fast/files
    386 fast/forms/25153.html
     249fast/files/apply-blob-url-to-img.html
     250fast/files/apply-blob-url-to-xhr.html
     251fast/files/domurl-script-execution-context-crash.html
     252fast/files/file-reader-abort.html
     253fast/files/read-blob-async.html
     254fast/files/read-file-async.html
    387255fast/forms/access-key.html
    388256fast/forms/button-enter-click.html
     
    394262fast/forms/empty-textarea-toggle-disabled.html
    395263fast/forms/enter-clicks-buttons.html
     264fast/forms/focus-change-on-keypress.html
    396265fast/forms/focus-control-to-page.html
    397266fast/forms/focus-selection-input.html
     
    399268fast/forms/get-file-upload.html
    400269fast/forms/implicit-submission.html
    401 fast/forms/input-appearance-preventDefault.html
    402 fast/forms/input-file-not-open-without-gesture.html
    403270fast/forms/input-file-re-render.html
    404271fast/forms/input-live-pseudo-selectors.html
    405 fast/forms/input-number-crash.html
    406 fast/forms/input-number-events.html
    407272fast/forms/input-number-keyoperation.html
    408273fast/forms/input-radio-checked-tab.html
    409274fast/forms/input-readonly-autoscroll.html
    410 fast/forms/input-select-on-click.html
    411 fast/forms/input-spinbutton-capturing.html
    412 fast/forms/input-text-click-inside.html
    413 fast/forms/input-text-click-outside.html
    414275fast/forms/input-text-double-click.html
    415276fast/forms/input-text-drag-down.html
     
    417278fast/forms/input-text-option-delete.html
    418279fast/forms/input-text-scroll-left-on-blur.html
    419 fast/forms/input-text-self-emptying-click.html
    420280fast/forms/input-type-change-in-onfocus-keyboard.html
    421 fast/forms/input-type-change-in-onfocus-mouse.html
    422281fast/forms/legend-access-key.html
    423282fast/forms/listbox-deselect-scroll.html
     
    432291fast/forms/onselect-textfield.html
    433292fast/forms/option-mouseevents.html
    434 fast/forms/password-doubleclick-selection.html
    435 fast/forms/radio-check-click-and-drag.html
    436 fast/forms/radio-nested-labels.html
    437293fast/forms/radio_checked_name.html
    438294fast/forms/render-text-crash.html
    439295fast/forms/restore-selection-after-layout.html
    440 fast/forms/search-abs-pos-cancel-button.html
    441 fast/forms/search-cancel-button-events.html
    442 fast/forms/search-cancel-button-mouseup.html
    443 fast/forms/search-click-in-placeholder.html
    444 fast/forms/search-delete-while-cancel-button-clicked.html
    445296fast/forms/search-event-delay.html
    446 fast/forms/search-hidden-cancel-button.html
    447 fast/forms/search-rtl.html
    448 fast/forms/search-transformed.html
    449 fast/forms/search-zoomed.html
    450297fast/forms/select-accesskey.html
    451298fast/forms/select-cache-desynchronization.html
     
    453300fast/forms/select-empty-list.html
    454301fast/forms/select-listbox-focus-displaynone.html
     302fast/forms/select-listbox-multiple-no-focusring.html
     303fast/forms/select-live-pseudo-selectors.html
    455304fast/forms/select-option-accesskey-crash.html
    456305fast/forms/select-popup-pagekeys.html
     
    474323fast/forms/textfield-outline.html
    475324fast/forms/textfield-to-password-on-focus.html
    476 fast/frames/frame-dead-region.html
    477 fast/frames/frame-deep-nested-resize.html
    478 fast/frames/hover-timer-crash.html
     325fast/forms/textinput-not-fired-on-enter-in-input.html
    479326fast/frames/iframe-window-focus.html
    480327fast/frames/take-focus-from-iframe.html
    481328fast/history/history_reload.html
    482329fast/history/window-open.html
    483 fast/html/details-add-summary-1-and-click.html
    484 fast/html/details-add-summary-2-and-click.html
    485 fast/html/details-add-summary-3-and-click.html
    486 fast/html/details-add-summary-4-and-click.html
    487 fast/html/details-add-summary-5-and-click.html
    488 fast/html/details-add-summary-6-and-click.html
    489 fast/html/details-add-summary-7-and-click.html
    490 fast/html/details-add-summary-8-and-click.html
    491 fast/html/details-add-summary-9-and-click.html
    492 fast/html/details-add-summary-10-and-click.html
    493 fast/html/details-mouse-click.html
    494 fast/html/details-remove-summary-1-and-click.html
    495 fast/html/details-remove-summary-2-and-click.html
    496 fast/html/details-remove-summary-3-and-click.html
    497 fast/html/details-remove-summary-4-and-click.html
    498 fast/html/details-remove-summary-5-and-click.html
    499 fast/html/details-remove-summary-6-and-click.html
    500 fast/images/drag-pdf-as-image.html
    501 fast/images/drag-svg-as-image.html
    502 fast/images/image-map-multiple-xhtml.xhtml
    503 fast/images/image-map-multiple.html
    504 fast/images/image-map-zoom.html
    505 fast/images/imagemap-case.html
    506 fast/inline-block/14498-positionForCoordinates.html
    507 fast/inline/dirtyLinesForInline.html
    508 fast/inline/relative-positioned-overflow.html
    509 fast/layers/resize-layer-deletion-crash.html
    510330fast/lists/drag-into-marker.html
    511 fast/loader/document-with-fragment-url-1.html
    512 fast/loader/document-with-fragment-url-2.html
    513 fast/loader/document-with-fragment-url-3.html
    514 fast/loader/document-with-fragment-url-4.html
    515 fast/loader/early-load-cancel.html
    516 fast/loader/fragment-after-redirect-gets-back-entry.html
    517331fast/loader/policy-delegate-action-hit-test-zoomed.html
    518 fast/loader/repeat-same-document-navigation.html
    519 fast/overflow/hit-test-overflow-controls.html
    520 fast/overflow/overflow-text-hit-testing.html
    521 fast/parser/tabindex-parsing.html
    522332fast/repaint/fixed-move-after-keyboard-scroll.html
    523 fast/repaint/japanese-rl-selection-clear.html
    524333fast/repaint/japanese-rl-selection-repaint.html
    525334fast/repaint/repaint-across-writing-mode-boundary.html
    526335fast/repaint/selection-rl.html
    527 fast/replaced/image-map-2.html
    528 fast/replaced/image-map-bug16782.html
    529 fast/replaced/image-map.html
    530 fast/selectors/unqualified-hover-quirks.html
    531 fast/selectors/unqualified-hover-strict.html
    532 fast/table/click-near-anonymous-table.html
    533 fast/text/atsui-pointtooffset-calls-cg.html
    534336fast/text/atsui-rtl-override-selection.html
    535 fast/text/in-rendered-text-rtl.html
    536337fast/text/international/khmer-selection.html
    537 fast/text/international/thai-offsetForPosition-inside-character.html
    538 fast/text/offsetForPosition-cluster-at-zero.html
     338fast/text/offsetForPosition-complex-fallback.html
    539339fast/text/reset-drag-on-mouse-down.html
    540 fast/text/textIteratorNilRenderer.html
    541 http/tests/fileapi
    542 http/tests/local/blob/send-data-blob.html
    543340http/tests/local/blob/send-hybrid-blob.html
    544 http/tests/local/blob/send-sliced-data-blob.html
    545341http/tests/local/drag-over-remote-content.html
    546 http/tests/local/fileapi
    547 http/tests/local/formdata
     342http/tests/local/fileapi/file-last-modified.html
     343http/tests/local/fileapi/send-dragged-file.html
     344http/tests/local/fileapi/send-sliced-dragged-file.html
     345http/tests/local/formdata/form-data-with-unknown-file-extension.html
     346http/tests/local/formdata/send-form-data-constructed-from-form.html
     347http/tests/local/formdata/send-form-data-with-sliced-file.html
     348http/tests/local/formdata/send-form-data.html
     349http/tests/local/formdata/upload-events.html
    548350http/tests/misc/bubble-drag-events.html
    549 http/tests/misc/drag-over-iframe-invalid-source-crash.html
     351http/tests/misc/isindex-with-no-form-base-href.html
    550352http/tests/misc/isindex-with-no-form.html
    551 http/tests/navigation/document-location-click-timeout.html
    552 http/tests/navigation/document-location-click.html
    553 http/tests/navigation/document-location-mouseover.html
    554353http/tests/navigation/no-referrer-reset.html
    555 http/tests/navigation/no-referrer-same-window.html
    556 http/tests/navigation/no-referrer-subframe.html
    557354http/tests/navigation/no-referrer-target-blank.html
    558 http/tests/navigation/redirect-preserves-referrer.html
    559355http/tests/security/clipboard/clipboard-file-access.html
    560356http/tests/security/dataTransfer-set-data-file-url.html
    561 http/tests/security/drag-drop-different-origin.html
    562357http/tests/security/drag-drop-same-unique-origin.html
    563358http/tests/security/drag-over-remote-content-iframe.html
    564 http/tests/security/listener/xss-window-onclick-addEventListener.html
    565 http/tests/security/listener/xss-window-onclick-shortcut.html
    566 media/audio-delete-while-slider-thumb-clicked.html
     359http/tests/security/isolatedWorld/userGestureEvents.html
    567360media/controls-drag-timebar.html
    568361media/controls-right-click-on-timebar.html
     
    573366platform/mac/editing/selection/doubleclick-should-not-expand-across-lines.html
    574367platform/mac/editing/selection/word-thai.html
    575 platform/mac/fast/forms/input-appearance-spinbutton-up.html
    576 platform/mac/fast/forms/input-number-click.html
    577368platform/mac/fast/forms/listbox-scrollbar-hit-test.html
    578369platform/mac/fast/overflow/overflow-scrollbar-hit-test.html
    579 plugins/change-widget-and-click-crash.html
     370plugins/clicking-missing-plugin-fires-delegate.html
    580371plugins/mouse-events.html
    581 plugins/mouse-move-over-plugin-in-frame.html
    582 plugins/resize-from-plugin.html
    583 scrollbars/overflow-custom-scrollbar-crash.html
    584 scrollbars/scrollbar-click-does-not-blur-content.html
    585372scrollbars/scrollbar-iframe-click-does-not-blur-content.html
    586 scrollbars/scrollbar-middleclick-nopaste.html
    587373scrollbars/scrollbar-miss-mousemove-disabled.html
    588 scrollbars/scrollbar-miss-mousemove.html
    589374scrollbars/scrollevent-iframe-no-scrolling-wheel.html
    590 storage/multiple-transactions-on-different-handles.html
     375
    591376svg/animations/animVal-basics.html
    592377svg/animations/animate-calcMode-spline-by.html
     
    596381svg/animations/animate-calcMode-spline-values.html
    597382svg/animations/animate-color-calcMode-discrete.html
     383svg/animations/animate-color-fill-currentColor.html
    598384svg/animations/animate-color-rgba-calcMode-discrete.html
    599385svg/animations/animate-color-transparent.html
     
    611397svg/animations/animate-path-animation-qQ-tT-inverse.html
    612398svg/animations/animate-path-nested-transforms.html
     399svg/animations/animate-path-to-animation.html
    613400svg/animations/animate-points.html
    614401svg/animations/animate-text-nested-transforms.html
     
    813600svg/dynamic-updates/SVGFEPointLightElement-svgdom-y-prop.html
    814601svg/dynamic-updates/SVGFEPointLightElement-svgdom-z-prop.html
     602svg/dynamic-updates/SVGFESpecularLightingElement-dom-in-attr.html
     603svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularConstant-attr.html
     604svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularExponent-attr.html
     605svg/dynamic-updates/SVGFESpecularLightingElement-dom-suraceScale-attr.html
     606svg/dynamic-updates/SVGFESpecularLightingElement-remove-lightSource.html
     607svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-in-prop.html
     608svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularConstant-prop.html
     609svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularExponent-prop.html
     610svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-suraceScale-prop.html
    815611svg/dynamic-updates/SVGFESpotLightElement-dom-limitingConeAngle-attr.html
    816612svg/dynamic-updates/SVGFESpotLightElement-dom-pointsAtX-attr.html
     
    891687svg/dynamic-updates/SVGImageElement-svgdom-x-prop.html
    892688svg/dynamic-updates/SVGImageElement-svgdom-y-prop.html
     689svg/dynamic-updates/SVGLineElement-dom-requiredFeatures.html
     690svg/dynamic-updates/SVGLineElement-dom-x1-attr.html
     691svg/dynamic-updates/SVGLineElement-dom-x2-attr.html
     692svg/dynamic-updates/SVGLineElement-dom-y1-attr.html
     693svg/dynamic-updates/SVGLineElement-dom-y2-attr.html
     694svg/dynamic-updates/SVGLineElement-svgdom-requiredFeatures.html
     695svg/dynamic-updates/SVGLineElement-svgdom-x1-prop.html
     696svg/dynamic-updates/SVGLineElement-svgdom-x2-prop.html
     697svg/dynamic-updates/SVGLineElement-svgdom-y1-prop.html
     698svg/dynamic-updates/SVGLineElement-svgdom-y2-prop.html
    893699svg/dynamic-updates/SVGLinearGradientElement-dom-gradientTransform-attr.html
    894700svg/dynamic-updates/SVGLinearGradientElement-dom-gradientUnits-attr.html
     
    903709svg/dynamic-updates/SVGLinearGradientElement-svgdom-y1-prop.html
    904710svg/dynamic-updates/SVGLinearGradientElement-svgdom-y2-prop.html
    905 svg/dynamic-updates/SVGLineElement-dom-requiredFeatures.html
    906 svg/dynamic-updates/SVGLineElement-dom-x1-attr.html
    907 svg/dynamic-updates/SVGLineElement-dom-x2-attr.html
    908 svg/dynamic-updates/SVGLineElement-dom-y1-attr.html
    909 svg/dynamic-updates/SVGLineElement-dom-y2-attr.html
    910 svg/dynamic-updates/SVGLineElement-svgdom-requiredFeatures.html
    911 svg/dynamic-updates/SVGLineElement-svgdom-x1-prop.html
    912 svg/dynamic-updates/SVGLineElement-svgdom-x2-prop.html
    913 svg/dynamic-updates/SVGLineElement-svgdom-y1-prop.html
    914 svg/dynamic-updates/SVGLineElement-svgdom-y2-prop.html
    915711svg/dynamic-updates/SVGMarkerElement-dom-markerHeight-attr.html
    916712svg/dynamic-updates/SVGMarkerElement-dom-markerUnits-attr.html
     
    986782svg/dynamic-updates/SVGSVGElement-dom-requiredFeatures.html
    987783svg/dynamic-updates/SVGSVGElement-svgdom-requiredFeatures.html
     784svg/dynamic-updates/SVGTRefElement-dom-href-attr.html
    988785svg/dynamic-updates/SVGTextElement-dom-requiredFeatures.html
    989786svg/dynamic-updates/SVGTextElement-dom-transform-attr.html
     
    991788svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop.html
    992789svg/dynamic-updates/SVGTextElement-svgdom-transform-prop.html
    993 svg/dynamic-updates/SVGTRefElement-dom-href-attr.html
    994790svg/dynamic-updates/SVGUseElement-dom-requiredFeatures.html
    995791svg/dynamic-updates/SVGUseElement-svgdom-requiredFeatures.html
  • trunk/Source/WebKit2/ChangeLog

    r82622 r82625  
     12011-03-31  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Implement mouseDown, mouseUp, and mouseMoveTo in WebKitTestRunner
     6        https://bugs.webkit.org/show_bug.cgi?id=57573
     7
     8        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
     9        (WKBundlePageSimulateMouseDown): Added.
     10        (WKBundlePageSimulateMouseUp): Added.
     11        (WKBundlePageSimulateMouseMotion): Added.
     12        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Added above functions.
     13        * WebProcess/WebPage/WebPage.cpp:
     14        (WebKit::WebPage::simulateMouseDown): Added.
     15        (WebKit::WebPage::simulateMouseUp): Added.
     16        (WebKit::WebPage::simulateMouseMotion): Added.
     17        * WebProcess/WebPage/WebPage.h: Added above functions.
     18
    1192011-03-31  Sam Weinig  <sam@webkit.org>
    220
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp

    r79863 r82625  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    218218    toImpl(page)->forceRepaintWithoutCallback();
    219219}
     220
     221void WKBundlePageSimulateMouseDown(WKBundlePageRef page, int button, WKPoint position, int clickCount, WKEventModifiers modifiers, double time)
     222{
     223    toImpl(page)->simulateMouseDown(button, toIntPoint(position), clickCount, modifiers, time);
     224}
     225
     226void WKBundlePageSimulateMouseUp(WKBundlePageRef page, int button, WKPoint position, int clickCount, WKEventModifiers modifiers, double time)
     227{
     228    toImpl(page)->simulateMouseUp(button, toIntPoint(position), clickCount, modifiers, time);
     229}
     230
     231void WKBundlePageSimulateMouseMotion(WKBundlePageRef page, WKPoint position, double time)
     232{
     233    toImpl(page)->simulateMouseMotion(toIntPoint(position), time);
     234}
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h

    r79863 r82625  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4848WK_EXPORT void WKBundlePageForceRepaint(WKBundlePageRef page);
    4949
     50WK_EXPORT void WKBundlePageSimulateMouseDown(WKBundlePageRef page, int button, WKPoint position, int clickCount, WKEventModifiers modifiers, double time);
     51WK_EXPORT void WKBundlePageSimulateMouseUp(WKBundlePageRef page, int button, WKPoint position, int clickCount, WKEventModifiers modifiers, double time);
     52WK_EXPORT void WKBundlePageSimulateMouseMotion(WKBundlePageRef page, WKPoint position, double time);
     53
    5054#ifdef __cplusplus
    5155}
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r82531 r82625  
    21592159#endif
    21602160
     2161void WebPage::simulateMouseDown(int button, WebCore::IntPoint position, int clickCount, WKEventModifiers modifiers, double time)
     2162{
     2163    mouseEvent(WebMouseEvent(WebMouseEvent::MouseDown, static_cast<WebMouseEvent::Button>(button), position, position, 0, 0, 0, clickCount, static_cast<WebMouseEvent::Modifiers>(modifiers), time));
     2164}
     2165
     2166void WebPage::simulateMouseUp(int button, WebCore::IntPoint position, int clickCount, WKEventModifiers modifiers, double time)
     2167{
     2168    mouseEvent(WebMouseEvent(WebMouseEvent::MouseUp, static_cast<WebMouseEvent::Button>(button), position, position, 0, 0, 0, clickCount, static_cast<WebMouseEvent::Modifiers>(modifiers), time));
     2169}
     2170
     2171void WebPage::simulateMouseMotion(WebCore::IntPoint position, double time)
     2172{
     2173    mouseEvent(WebMouseEvent(WebMouseEvent::MouseMove, WebMouseEvent::NoButton, position, position, 0, 0, 0, 0, WebMouseEvent::Modifiers(), time));
     2174}
     2175
    21612176} // namespace WebKit
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h

    r82398 r82625  
    374374#endif
    375375
     376    void simulateMouseDown(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, double time);
     377    void simulateMouseUp(int button, WebCore::IntPoint, int clickCount, WKEventModifiers, double time);
     378    void simulateMouseMotion(WebCore::IntPoint, double time);
     379
    376380private:
    377381    WebPage(uint64_t pageID, const WebPageCreationParameters&);
  • trunk/Tools/ChangeLog

    r82591 r82625  
     12011-03-31  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Implement mouseDown, mouseUp, and mouseMoveTo in WebKitTestRunner
     6        https://bugs.webkit.org/show_bug.cgi?id=57573
     7
     8        * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
     9        Added real definitions for mouseDown, mouseUp, mouseMoveTo and leapForward.
     10        Removed fake definitions of keyDown and contextClick.
     11
     12        * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
     13        (WTR::operator==): Added. So we can compare two WKPoint structs.
     14        (WTR::parseModifier): Added.
     15        (WTR::parseModifierArray): Added.
     16        (WTR::EventSendingController::EventSendingController): Initialize the
     17        new data members.
     18        (WTR::EventSendingController::mouseDown): Added. Calls
     19        WKBundlePageSimulateMouseDown.
     20        (WTR::EventSendingController::mouseUp): Added. Calls
     21        WKBundlePageSimulateMouseUp.
     22        (WTR::EventSendingController::mouseMoveTo): Added. Calls
     23        WKBundlePageSimulateMouseMotion.
     24        (WTR::EventSendingController::leapForward): Added.
     25        (WTR::EventSendingController::updateClickCount): Added. Used by the
     26        mouseDown/Up functions to create a click count.
     27
     28        * WebKitTestRunner/InjectedBundle/EventSendingController.h: Updated
     29        for the changes above.
     30
    1312011-03-31  Sergio Villar Senin  <svillar@igalia.com>
    232
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl

    r65029 r82625  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 20111 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727
    2828    interface EventSendingController {
    29         [CustomArgumentHandling] void mouseDown();
    30         [CustomArgumentHandling] void mouseUp();
    31         [CustomArgumentHandling] void mouseMoveTo();
    32         [CustomArgumentHandling] void keyDown();
    33         [CustomArgumentHandling] void contextClick(); // CustomArgumentHandling only to throw exception while not implemented.
    34         [CustomArgumentHandling] void leapForward(/*in unsigned long delay*/); // CustomArgumentHandling only to throw exception while not implemented.
     29        void mouseDown(in long buttonNumber, in object modifierArray);
     30        void mouseUp(in long buttonNumber, in object modifierArray);
     31        void mouseMoveTo(in long x, in long y);
     32        void leapForward(in long milliseconds);
    3533
    3634        // Zoom functions.
  • trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp

    r81135 r82625  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3030#include "InjectedBundlePage.h"
    3131#include "JSEventSendingController.h"
    32 #include <WebKit2/WKBundlePage.h>
     32#include <WebKit2/WKBundleFrame.h>
    3333#include <WebKit2/WKBundlePagePrivate.h>
    3434#include <WebKit2/WKBundlePrivate.h>
     
    3838static const float ZoomMultiplierRatio = 1.2f;
    3939
     40static bool operator==(const WKPoint& a, const WKPoint& b)
     41{
     42    return a.x == b.x && a.y == b.y;
     43}
     44
     45static WKEventModifiers parseModifier(JSStringRef modifier)
     46{
     47    if (JSStringIsEqualToUTF8CString(modifier, "ctrlKey"))
     48        return kWKEventModifiersControlKey;
     49    if (JSStringIsEqualToUTF8CString(modifier, "shiftKey") || JSStringIsEqualToUTF8CString(modifier, "rangeSelectionKey"))
     50        return kWKEventModifiersShiftKey;
     51    if (JSStringIsEqualToUTF8CString(modifier, "altKey"))
     52        return kWKEventModifiersAltKey;
     53    if (JSStringIsEqualToUTF8CString(modifier, "metaKey") || JSStringIsEqualToUTF8CString(modifier, "addSelectionKey"))
     54        return kWKEventModifiersMetaKey;
     55    return 0;
     56}
     57
     58static unsigned arrayLength(JSContextRef context, JSObjectRef array)
     59{
     60    JSRetainPtr<JSStringRef> lengthString(Adopt, JSStringCreateWithUTF8CString("length"));
     61    JSValueRef lengthValue = JSObjectGetProperty(context, array, lengthString.get(), 0);
     62    if (!lengthValue)
     63        return 0;
     64    return static_cast<unsigned>(JSValueToNumber(context, lengthValue, 0));
     65}
     66
     67static WKEventModifiers parseModifierArray(JSContextRef context, JSValueRef arrayValue)
     68{
     69    if (!arrayValue)
     70        return 0;
     71    if (!JSValueIsObject(context, arrayValue))
     72        return 0;
     73    JSObjectRef array = const_cast<JSObjectRef>(arrayValue);
     74    unsigned length = arrayLength(context, array);
     75    WKEventModifiers modifiers = 0;
     76    for (unsigned i = 0; i < length; i++) {
     77        JSValueRef exception = 0;
     78        JSValueRef value = JSObjectGetPropertyAtIndex(context, array, i, &exception);
     79        if (exception)
     80            continue;
     81        JSRetainPtr<JSStringRef> string(Adopt, JSValueToStringCopy(context, value, &exception));
     82        if (exception)
     83            continue;
     84        modifiers |= parseModifier(string.get());
     85    }
     86    return modifiers;
     87}
     88
    4089PassRefPtr<EventSendingController> EventSendingController::create()
    4190{
     
    4493
    4594EventSendingController::EventSendingController()
     95    : m_time(0)
     96    , m_position()
     97    , m_clickCount(0)
     98    , m_clickTime(0)
     99    , m_clickPosition()
     100    , m_clickButton(kWKEventMouseButtonNoButton)
    46101{
    47102}
     
    56111}
    57112
    58 static void setExceptionForString(JSContextRef context, JSValueRef* exception, const char* string)
    59 {
    60     JSRetainPtr<JSStringRef> exceptionString(Adopt, JSStringCreateWithUTF8CString(string));
    61     *exception = JSValueMakeString(context, exceptionString.get());
    62 }
    63 
    64 void EventSendingController::mouseDown(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    65 {
    66     setExceptionForString(context, exception, "EventSender.mouseDown is not yet supported.");
    67 }
    68 
    69 void EventSendingController::mouseUp(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    70 {
    71     setExceptionForString(context, exception, "EventSender.mouseUp is not yet supported.");
    72 }
    73 
    74 void EventSendingController::mouseMoveTo(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    75 {
    76     setExceptionForString(context, exception, "EventSender.mouseMoveTo is not yet supported.");
    77 }
    78 
    79 void EventSendingController::keyDown(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    80 {
    81     setExceptionForString(context, exception, "EventSender.keyDown is not yet supported.");
    82 }
    83 
    84 void EventSendingController::contextClick(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    85 {
    86     setExceptionForString(context, exception, "EventSender.contextClick is not yet supported.");
    87 }
    88 
    89 void EventSendingController::leapForward(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    90 {
    91     setExceptionForString(context, exception, "EventSender.leapForward is not yet supported.");
     113void EventSendingController::mouseDown(int button, JSValueRef modifierArray)
     114{
     115    WKBundlePageRef page = InjectedBundle::shared().page()->page();
     116    WKBundleFrameRef frame = WKBundlePageGetMainFrame(page);
     117    JSContextRef context = WKBundleFrameGetJavaScriptContext(frame);
     118    WKEventModifiers modifiers = parseModifierArray(context, modifierArray);
     119    updateClickCount(button);
     120    WKBundlePageSimulateMouseDown(page, button, m_position, m_clickCount, modifiers, m_time);
     121}
     122
     123void EventSendingController::mouseUp(int button, JSValueRef modifierArray)
     124{
     125    WKBundlePageRef page = InjectedBundle::shared().page()->page();
     126    WKBundleFrameRef frame = WKBundlePageGetMainFrame(page);
     127    JSContextRef context = WKBundleFrameGetJavaScriptContext(frame);
     128    WKEventModifiers modifiers = parseModifierArray(context, modifierArray);
     129    updateClickCount(button);
     130    WKBundlePageSimulateMouseUp(page, button, m_position, m_clickCount, modifiers, m_time);
     131}
     132
     133void EventSendingController::mouseMoveTo(int x, int y)
     134{
     135    m_position.x = x;
     136    m_position.y = y;
     137    WKBundlePageSimulateMouseMotion(InjectedBundle::shared().page()->page(), m_position, m_time);
     138}
     139
     140void EventSendingController::leapForward(int milliseconds)
     141{
     142    m_time += milliseconds / 1000.0;
     143}
     144
     145void EventSendingController::updateClickCount(WKEventMouseButton button)
     146{
     147    if (m_time - m_clickTime < 1 && m_position == m_clickPosition && button == m_clickButton) {
     148        ++m_clickCount;
     149        m_clickTime = m_time;
     150        return;
     151    }
     152
     153    m_clickCount = 1;
     154    m_clickTime = m_time;
     155    m_clickPosition = m_position;
     156    m_clickButton = button;
    92157}
    93158
  • trunk/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h

    r65029 r82625  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2828
    2929#include "JSWrappable.h"
     30#include <WebKit2/WKEvent.h>
     31#include <WebKit2/WKGeometry.h>
    3032#include <wtf/PassRefPtr.h>
    3133
     
    4244    virtual JSClassRef wrapperClass();
    4345
    44     void mouseDown(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    45     void mouseUp(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    46     void mouseMoveTo(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    47     void keyDown(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    48     void contextClick(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
    49     void leapForward(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
     46    void mouseDown(int button, JSValueRef modifierArray);
     47    void mouseUp(int button, JSValueRef modifierArray);
     48    void mouseMoveTo(int x, int y);
     49    void leapForward(int milliseconds);
    5050
    5151    // Zoom functions.
     
    5757private:
    5858    EventSendingController();
     59
     60    void updateClickCount(WKEventMouseButton);
     61
     62    double m_time;
     63    WKPoint m_position;
     64
     65    int m_clickCount;
     66    double m_clickTime;
     67    WKPoint m_clickPosition;
     68    WKEventMouseButton m_clickButton;
    5969};
    6070
Note: See TracChangeset for help on using the changeset viewer.