Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
2010-03-03 Chad Faragher <wyck@chromium.org>
Reviewed by Darin Adler. Changed the double-click framework code to pass adjusted page coordinates for zoomed pages. Added a new test to expose mistreatment of mouse click coordinates during a double-click. https://bugs.webkit.org/show_bug.cgi?id=35690 * fast/events/zoom-dblclick-expected.txt: Added. * fast/events/zoom-dblclick.html: Added. 2010-03-03 Chad Faragher <wyck@chromium.org> Reviewed by Darin Adler. Changed the double-click framework code to pass adjusted page coordinates for zoomed pages. Added a new test to expose mistreatment of mouse click coordinates during a double-click. https://bugs.webkit.org/show_bug.cgi?id=35690 Test: fast/events/zoom-dblclick.html * dom/Node.cpp: (WebCore::Node::dispatchMouseEvent): Canonical link: https://commits.webkit.org/46796@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@55499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
5 changed files
with
117 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,11 @@ | ||
|
||
|
||
Zoomed | ||
PASS event.clientX is 167 | ||
PASS event.clientY is 83 | ||
PASS event.pageX is 167 | ||
PASS event.pageY is 83 | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,78 @@ | ||
<!-- based on clientXY-in-zoom-and-scroll.html --> | ||
<link rel="stylesheet" href="../js/resources/js-test-style.css"> | ||
<script src="../js/resources/js-test-pre.js"></script> | ||
<script> | ||
function clickHandler(e) | ||
{ | ||
// do something | ||
event = e; | ||
var elem = document.getElementById('gizmo'); | ||
elem.textContent = "client(" + e.clientX + "," + e.clientY + ") page(" + e.pageX + "," + e.pageY + ")"; | ||
} | ||
</script> | ||
<br/> | ||
<div id="console"></div> | ||
<div id="testArea"> | ||
<div id="gizmo" style="position: absolute; left: 0px; top: 0px; overflow-x: hidden; overflow-y: hidden; width: 100%; height: 100%; text-align: middle;" onDblClick="clickHandler(event)">Double-click on this page.</div> | ||
</div> | ||
|
||
<script> | ||
var event; | ||
|
||
function sendDblClick() | ||
{ | ||
if (window.eventSender) { | ||
eventSender.leapForward(1000); // drain dblclick timer | ||
eventSender.mouseMoveTo(200, 100); // x and y different for safety | ||
eventSender.mouseDown(); | ||
eventSender.mouseUp(); | ||
eventSender.mouseDown(); | ||
eventSender.mouseUp(); | ||
} | ||
} | ||
function zoomPageIn() | ||
{ | ||
if (window.eventSender) { | ||
eventSender.zoomPageIn(); | ||
} | ||
} | ||
|
||
function zoomPageOut() | ||
{ | ||
if (window.eventSender) { | ||
eventSender.zoomPageOut(); | ||
} | ||
} | ||
|
||
if (window.layoutTestController) { | ||
layoutTestController.dumpAsText(); | ||
layoutTestController.waitUntilDone(); | ||
} | ||
|
||
// Zoomed. | ||
function zoomed(e) | ||
{ | ||
event = e; | ||
debug("\nZoomed"); | ||
shouldBe("event.clientX", "167"); | ||
shouldBe("event.clientY", "83"); | ||
shouldBe("event.pageX", "167"); | ||
shouldBe("event.pageY", "83"); | ||
} | ||
window.addEventListener("dblclick", zoomed, false); | ||
zoomPageIn(); | ||
sendDblClick(); | ||
zoomPageOut(); | ||
window.removeEventListener("dblclick", zoomed, false); | ||
|
||
if (window.layoutTestController) { | ||
var area = document.getElementById('testArea'); | ||
area.parentNode.removeChild(area); | ||
|
||
layoutTestController.notifyDone(); | ||
} | ||
|
||
successfullyParsed = true; | ||
</script> | ||
<script src="../js/resources/js-test-post.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters