Fix by Mitz Pettel, reviewed by Darin.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Mar 2006 10:10:43 +0000 (10:10 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Mar 2006 10:10:43 +0000 (10:10 +0000)
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7589
          Mouse moved events do not work in DumpRenderTree

WebKitTools:
        * DumpRenderTree/DumpRenderTree.m:
        (-[EventSendingController mouseMoveToX:Y:]): Pass the correct windowNumber in the event.

LayoutTests:
        * fast/css/hover-subselector-expected.txt: Updated results.
        * fast/css/hover-subselector.html: Changed to work with the new mechanism.
        * fast/events/event-sender-mouse-moved-expected.checksum: Added.
        * fast/events/event-sender-mouse-moved-expected.png: Added.
        * fast/events/event-sender-mouse-moved-expected.txt: Added.
        * fast/events/event-sender-mouse-moved.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/fast/css/hover-subselector-expected.txt
LayoutTests/fast/css/hover-subselector.html
LayoutTests/fast/events/event-sender-mouse-moved-expected.checksum [new file with mode: 0644]
LayoutTests/fast/events/event-sender-mouse-moved-expected.png [new file with mode: 0644]
LayoutTests/fast/events/event-sender-mouse-moved-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/event-sender-mouse-moved.html [new file with mode: 0644]
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.m

index dab3eef6ae622db2d345ab605188da8c9861e8a2..33dd7d502c6c6dc0acdfe3bd2bcfb648efb0d0dc 100644 (file)
@@ -1,3 +1,17 @@
+2006-03-05  Mitz Pettel  <opendarwin.org@mitzpettel.com>
+
+        Reviewed by Darin, landed by ap.
+
+        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7589
+          Mouse moved events do not work in DumpRenderTree
+
+        * fast/css/hover-subselector-expected.txt: Updated results.
+        * fast/css/hover-subselector.html: Changed to work with the new mechanism.
+        * fast/events/event-sender-mouse-moved-expected.checksum: Added.
+        * fast/events/event-sender-mouse-moved-expected.png: Added.
+        * fast/events/event-sender-mouse-moved-expected.txt: Added.
+        * fast/events/event-sender-mouse-moved.html: Added.
+
 2006-03-03  Alexander Kellett  <lypanov@kde.org>
 
         - local machine unfortunately shows slightly differing results to the
index e6d0f1574bef73f82135eb6b8fd04e8db7cf1fdc..6cf4c28147634625ac2a00ebecd4d858b5ff0643 100644 (file)
@@ -1,5 +1,3 @@
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 layer at (0,0) size 800x600
   RenderCanvas at (0,0) size 800x600
 layer at (0,0) size 800x600
@@ -28,4 +26,3 @@ layer at (0,0) size 800x600
             text run at (192,20) width 96: "span#t:hover"
         RenderText {TEXT} at (288,18) size 170x18
           text run at (288,18) width 170: " matches the hovered span."
-caret: position 1 of child 0 {TEXT} of child 1 {SPAN} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
index 295727cf9dac595bc6c368ea26e55aae32514e4d..5cdbd877a5242cda4c2d8dc5f713bf83b6a52f80 100644 (file)
@@ -9,11 +9,9 @@ function test()
 {
     if (!window.eventSender)
         return;
-    eventSender.mouseMoveTo(0, 0);
-    document.body.offsetTop;    // force layout
-    eventSender.mouseMoveTo(16, 16);    // hover
-    eventSender.mouseDown();    // get noticed
-    eventSender.mouseUp();
+    document.body.offsetTop;    // Force layout. The mouse is not tracked before first layout.
+    eventSender.mouseMoveTo(16, 16);    // Hover.
+    document.body.offsetTop;    // Update layout for hovered state.
 }
 </script>
 </head>
diff --git a/LayoutTests/fast/events/event-sender-mouse-moved-expected.checksum b/LayoutTests/fast/events/event-sender-mouse-moved-expected.checksum
new file mode 100644 (file)
index 0000000..935fe5b
--- /dev/null
@@ -0,0 +1,2 @@
+3045813c8e8f48417d65490519832b3e
+\ No newline at end of file
diff --git a/LayoutTests/fast/events/event-sender-mouse-moved-expected.png b/LayoutTests/fast/events/event-sender-mouse-moved-expected.png
new file mode 100644 (file)
index 0000000..d899323
Binary files /dev/null and b/LayoutTests/fast/events/event-sender-mouse-moved-expected.png differ
diff --git a/LayoutTests/fast/events/event-sender-mouse-moved-expected.txt b/LayoutTests/fast/events/event-sender-mouse-moved-expected.txt
new file mode 100644 (file)
index 0000000..3e12707
--- /dev/null
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x576
+      RenderBlock {DIV} at (0,0) size 100x100
+      RenderBlock (anonymous) at (0,100) size 784x18
+        RenderText {TEXT} at (0,0) size 53x18
+          text run at (0,0) width 53: "Test for "
+        RenderInline {I} at (0,0) size 698x18
+          RenderInline {A} at (0,0) size 348x18 [color=#0000EE]
+            RenderText {TEXT} at (53,0) size 348x18
+              text run at (53,0) width 348: "http://bugzilla.opendarwin.org/show_bug.cgi?id=7589"
+          RenderText {TEXT} at (401,0) size 350x18
+            text run at (401,0) width 350: " Mouse moved events do not work in DumpRenderTree"
+        RenderText {TEXT} at (751,0) size 4x18
+          text run at (751,0) width 4: "."
+      RenderBlock {HR} at (0,126) size 784x2 [border: (1px inset #000000)]
+      RenderBlock {P} at (0,144) size 784x18
+        RenderText {TEXT} at (0,0) size 73x18
+          text run at (0,0) width 73: "Test result: "
+        RenderInline {SPAN} at (0,0) size 39x18
+          RenderText {TEXT} at (73,0) size 39x18
+            text run at (73,0) width 39: "PASS"
diff --git a/LayoutTests/fast/events/event-sender-mouse-moved.html b/LayoutTests/fast/events/event-sender-mouse-moved.html
new file mode 100644 (file)
index 0000000..aa31da0
--- /dev/null
@@ -0,0 +1,20 @@
+<script type="text/javascript">
+function test()
+{
+    if (!window.layoutTestController)
+        return;
+    document.body.offsetTop;    // Force layout. The mouse is not tracked before first layout.
+    eventSender.mouseMoveTo(20, 20);
+}
+</script>
+<style>
+    div#t { width: 100px; height: 100px; }
+</style>
+<body onload="test()">
+<div id="t" onmouseover="document.getElementById('result').innerText = 'PASS'">
+</div>
+Test for <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=7589">http://bugzilla.opendarwin.org/show_bug.cgi?id=7589</a>
+Mouse moved events do not work in DumpRenderTree</i>.
+<hr>
+<p>Test result: <span id="result">FAIL</span></p>
+</body>
index 3512c2e6a068a727ba1121aee8edeb24dc5d5ea1..733ee745646b0c95b718e8e4a45916b0a8d4f60c 100644 (file)
@@ -1,3 +1,15 @@
+2006-03-05  Mitz Pettel  <opendarwin.org@mitzpettel.com>
+
+        Reviewed by Darin, landed by ap.
+
+        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7589
+          Mouse moved events do not work in DumpRenderTree
+
+        Test: fast/events/event-sender-mouse-moved.html
+
+        * DumpRenderTree/DumpRenderTree.m:
+        (-[EventSendingController mouseMoveToX:Y:]): Pass the correct windowNumber in the event.
+
 2006-03-04  Eric Seidel  <eseidel@apple.com>
 
         Reviewed by hyatt.
index d27e1f464293e048cf49b92854d839feae476c4b..09360226e0aaeaa4cea5d8b2c8312b2f69487173 100644 (file)
@@ -723,7 +723,7 @@ static void dump(void)
 - (void)mouseMoveToX:(int)x Y:(int)y
 {
     lastMousePosition = NSMakePoint(x, [[frame webView] frame].size.height - y);
-    NSEvent *event = [NSEvent mouseEventWithType:(down ? NSLeftMouseDragged : NSMouseMoved) location:lastMousePosition modifierFlags:nil timestamp:GetCurrentEventTime() windowNumber:0 context:[NSGraphicsContext currentContext] eventNumber:++eventNumber clickCount:(down ? clickCount : 0) pressure:nil];
+    NSEvent *event = [NSEvent mouseEventWithType:(down ? NSLeftMouseDragged : NSMouseMoved) location:lastMousePosition modifierFlags:nil timestamp:GetCurrentEventTime() windowNumber:[[[frame webView] window] windowNumber] context:[NSGraphicsContext currentContext] eventNumber:++eventNumber clickCount:(down ? clickCount : 0) pressure:nil];
 
     NSView *subView = [[frame webView] hitTest:[event locationInWindow]];
     if (subView) {