LayoutTests:
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2007 21:53:39 +0000 (21:53 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2007 21:53:39 +0000 (21:53 +0000)
        Reviewed by Geoff.

        Replaced all calls to eventSender.mouseClick with paired calls to
        mouseDown/mouseUp.

        * fast/events/click-count.html:
        * fast/events/event-sender-mouse-click-expected.txt: Removed.
        * fast/events/event-sender-mouse-click.html: Removed.
        * fast/events/frame-click-focus.html:
        * fast/events/objc-event-api.html:
        * fast/forms/focus-selection-input.html:
        * fast/forms/focus-selection-textarea.html:

WebKitTools:

        Reviewed by Geoff.

        Removed eventSender.mouseClick because it was only useful for AppKit
        controls, which we don't use anymore.

        * DumpRenderTree/EventSendingController.m:
        (+[EventSendingController isSelectorExcludedFromWebScript:]): Removed
        mouseClick.

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

LayoutTests/ChangeLog
LayoutTests/fast/events/click-count.html
LayoutTests/fast/events/event-sender-mouse-click-expected.txt [deleted file]
LayoutTests/fast/events/event-sender-mouse-click.html [deleted file]
LayoutTests/fast/events/frame-click-focus.html
LayoutTests/fast/events/objc-event-api.html
LayoutTests/fast/forms/focus-selection-input.html
LayoutTests/fast/forms/focus-selection-textarea.html
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/EventSendingController.m

index fca8fbe8edc186bd422e980e394a603e4401e9f8..dfebfd0be81ba4fcf7e65760140da0bb8cf0dfe2 100644 (file)
@@ -1,3 +1,18 @@
+2007-03-22  Adam Roben  <aroben@apple.com>
+
+        Reviewed by Geoff.
+
+        Replaced all calls to eventSender.mouseClick with paired calls to
+        mouseDown/mouseUp.
+
+        * fast/events/click-count.html:
+        * fast/events/event-sender-mouse-click-expected.txt: Removed.
+        * fast/events/event-sender-mouse-click.html: Removed.
+        * fast/events/frame-click-focus.html:
+        * fast/events/objc-event-api.html:
+        * fast/forms/focus-selection-input.html:
+        * fast/forms/focus-selection-textarea.html:
+
 2007-03-22  Adam Roben  <aroben@apple.com>
 
         Reviewed by Ada.
index 2491d548a8652daf03d3a469bfc6a68f169e1d30..a40917c771251bbaa0e953c088b3f05c2921f1ac 100644 (file)
@@ -48,8 +48,10 @@ function testClick()
         return;
     }
     log("Clicking " + clickCount + " times<br>");
-    for (var click = 0; click < clickCount; click++)
-        eventSender.mouseClick();
+    for (var click = 0; click < clickCount; click++) {
+        eventSender.mouseDown();
+        eventSender.mouseUp();
+    }
     clickCount++;
     setTimeout(testClick, 1000);
 }
diff --git a/LayoutTests/fast/events/event-sender-mouse-click-expected.txt b/LayoutTests/fast/events/event-sender-mouse-click-expected.txt
deleted file mode 100644 (file)
index 114d6b8..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-Test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7583 DRT hangs when doing eventSender.mouseDown on native widgets. This tests eventSender.mouseClick().
-
-Test result: PASS.
-
-
diff --git a/LayoutTests/fast/events/event-sender-mouse-click.html b/LayoutTests/fast/events/event-sender-mouse-click.html
deleted file mode 100644 (file)
index 5017462..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<script>
-var clicked = false;
-</script>
-<input type="search" onfocus="clicked = true;">
-<p>
-    Test for <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=7583">http://bugzilla.opendarwin.org/show_bug.cgi?id=7583</a>
-    DRT hangs when doing eventSender.mouseDown on native widgets</i>. This tests eventSender.mouseClick().
-</p>
-<hr>
-<p>
-    Test result: <span id="result">(cannot run interactively)</span>.
-</p>
-<script>
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    eventSender.mouseMoveTo(20, 20);
-    eventSender.mouseClick();
-    document.getElementById('result').innerText = clicked ? 'PASS' : 'FAIL';
-}
-</script>
index 29e1d8f24a0f7cd4482baddd1aa8bf5fddbb3a27..6d50768e93d12efe4958acd12b1e93f8918644ef 100644 (file)
 
             if (window.eventSender) {
                 eventSender.mouseMoveTo(1, 300);
-                eventSender.mouseClick();
+                eventSender.mouseDown();
+                eventSender.mouseUp();
 
                 // We need to "wait" a bit before the next click -- otherwise it is ignored
                 eventSender.leapForward(2000);
 
                 eventSender.mouseMoveTo(50, 50);
-                eventSender.mouseClick();
+                eventSender.mouseDown();
+                eventSender.mouseUp();
 
                 eventSender.leapForward(2000);
 
                 eventSender.mouseMoveTo(1, 300);
-                eventSender.mouseClick();
+                eventSender.mouseDown();
+                eventSender.mouseUp();
             }
         }
     </script>
index 874fa3762d2053fcf457d9d56223dae0629a3282..15b3d5f3bf4c5362e5a2cff3a9847f3c429874b0 100644 (file)
@@ -17,7 +17,8 @@ function init() {
       eventSender.keyDown("e", ["altKey", "metaKey"]);
       
       eventSender.mouseMoveTo(400,150);
-      eventSender.mouseClick();
+      eventSender.mouseDown();
+      eventSender.mouseUp();
       
       eventSender.mouseDown();
       eventSender.mouseMoveTo(1,1);
index 0272864b9f322638bff2232f61d775942cf1f645..25efb0a2e5bce1fbaf40707c4e62c28ad7c33608 100644 (file)
@@ -34,7 +34,8 @@ function runTest()
     shouldBe("fourth.selectionStart", "12");
     shouldBe("fourth.selectionEnd", "19");
     eventSender.mouseMoveTo(fourth.offsetLeft + 4, fourth.offsetTop + 4);
-    eventSender.mouseClick();
+    eventSender.mouseDown();
+    eventSender.mouseUp();
     shouldBe("fourth.selectionStart", "0");
     shouldBe("fourth.selectionEnd", "0");
 
@@ -42,7 +43,8 @@ function runTest()
     shouldBe("fifth.selectionEnd", "18");
     var fifthLabel = document.getElementById("fifthLabel");
     eventSender.mouseMoveTo(fifthLabel.offsetLeft + 4, fifthLabel.offsetTop + 4);
-    eventSender.mouseClick();
+    eventSender.mouseDown();
+    eventSender.mouseUp();
     shouldBe("fifth.selectionStart", "11");
     shouldBe("fifth.selectionEnd", "18");
 
index cf2beb0f6b7738d8943d0d9f0d697500765c6795..88e6c5f4ad191db469bc92764d0e83698e84197e 100644 (file)
@@ -34,7 +34,8 @@ function runTest()
     shouldBe("fourth.selectionStart", "11");
     shouldBe("fourth.selectionEnd", "18");
     eventSender.mouseMoveTo(fourth.offsetLeft + 4, fourth.offsetTop + 4);
-    eventSender.mouseClick();
+    eventSender.mouseDown();
+    eventSender.mouseUp();
     shouldBe("fourth.selectionStart", "0");
     shouldBe("fourth.selectionEnd", "0");
 
@@ -42,7 +43,8 @@ function runTest()
     shouldBe("fifth.selectionEnd", "18");
     var fifthLabel = document.getElementById("fifthLabel");
     eventSender.mouseMoveTo(fifthLabel.offsetLeft + 4, fifthLabel.offsetTop + 4);
-    eventSender.mouseClick();
+    eventSender.mouseDown();
+    eventSender.mouseUp();
     shouldBe("fifth.selectionStart", "11");
     shouldBe("fifth.selectionEnd", "18");
 
@@ -189,4 +191,4 @@ automatically.</p>
 <p id="description"></p>
 <div id="console"></div>
 
-</body>
\ No newline at end of file
+</body>
index aac305854a81978d853f386292a4f89c57a8afb9..89824f16f3d3280f4b0cf497e3913da8ae0e7adc 100644 (file)
@@ -1,3 +1,14 @@
+2007-03-22  Adam Roben  <aroben@apple.com>
+
+        Reviewed by Geoff.
+
+        Removed eventSender.mouseClick because it was only useful for AppKit
+        controls, which we don't use anymore.
+
+        * DumpRenderTree/EventSendingController.m:
+        (+[EventSendingController isSelectorExcludedFromWebScript:]): Removed
+        mouseClick.
+
 2007-03-22  Adam Roben  <aroben@apple.com>
 
         Reviewed by Ada.
index c930a9df97616297a9be3dbf0f7c263c701cdbfb..9d7b6efac97e176c95b3e08b0dd2793468899d3b 100644 (file)
@@ -101,7 +101,6 @@ BOOL replayingSavedEvents;
 {
     if (aSelector == @selector(mouseDown)
             || aSelector == @selector(mouseUp)
-            || aSelector == @selector(mouseClick)
             || aSelector == @selector(contextClick)
             || aSelector == @selector(mouseMoveToX:Y:)
             || aSelector == @selector(leapForward:)
@@ -289,41 +288,6 @@ BOOL replayingSavedEvents;
     }
 }
 
-- (void)mouseClick
-{
-    [[[frame frameView] documentView] layout];
-    if ([self currentEventTime] - lastClick >= 1)
-        clickCount = 1;
-    else
-        clickCount++;
-    NSEvent *mouseDownEvent = [NSEvent mouseEventWithType:NSLeftMouseDown 
-                                        location:lastMousePosition 
-                                   modifierFlags:0 
-                                       timestamp:[self currentEventTime]
-                                    windowNumber:[[[frame webView] window] windowNumber] 
-                                         context:[NSGraphicsContext currentContext] 
-                                     eventNumber:++eventNumber 
-                                      clickCount:clickCount 
-                                        pressure:0.0];
-
-    NSView *subView = [[frame webView] hitTest:[mouseDownEvent locationInWindow]];
-    if (subView) {
-        [self leapForward:1];
-        NSEvent *mouseUpEvent = [NSEvent mouseEventWithType:NSLeftMouseUp
-                                                   location:lastMousePosition
-                                              modifierFlags:0
-                                                  timestamp:[self currentEventTime]
-                                               windowNumber:[[[frame webView] window] windowNumber]
-                                                    context:[NSGraphicsContext currentContext]
-                                                eventNumber:++eventNumber
-                                                 clickCount:clickCount
-                                                   pressure:0.0];
-        [subView mouseDown:mouseDownEvent];
-        [subView mouseUp:mouseUpEvent];
-        lastClick = [mouseUpEvent timestamp];
-    }
-}
-
 - (void)contextClick
 {
     [[[frame frameView] documentView] layout];