- 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
+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
-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
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
{
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>
--- /dev/null
+3045813c8e8f48417d65490519832b3e
+\ No newline at end of file
--- /dev/null
+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"
--- /dev/null
+<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>
+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.
- (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) {