Unreviewed, rolling out r94536.

http://trac.webkit.org/changeset/94536
https://bugs.webkit.org/show_bug.cgi?id=67836

breaks absoluteLocation() of RelatedMouseEvent (Requested by
jknotten on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-09-09

Source/WebCore:

* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):

LayoutTests:

* fast/events/page-scaled-mouse-click-expected.txt: Removed.
* fast/events/page-scaled-mouse-click.html: Removed.
* fast/events/script-tests/page-scaled-mouse-click.js: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 05aabbec
2011-09-09 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r94536.
http://trac.webkit.org/changeset/94536
https://bugs.webkit.org/show_bug.cgi?id=67836
breaks absoluteLocation() of RelatedMouseEvent (Requested by
jknotten on #webkit).
* fast/events/page-scaled-mouse-click-expected.txt: Removed.
* fast/events/page-scaled-mouse-click.html: Removed.
* fast/events/script-tests/page-scaled-mouse-click.js: Removed.
2011-09-08 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: live edit both for JS and CSS is not discoverable.
This tests that page scaling does not affect mouse event pageX and pageY coordinates.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS eventLog is "click(10, 10)"
PASS eventLog is "click(20, 20)"
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../js/resources/js-test-style.css">
<script src="../js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="script-tests/page-scaled-mouse-click.js"></script>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>
description("This tests that page scaling does not affect mouse event pageX and pageY coordinates.");
var div = document.createElement("div");
div.style.width = "100px";
div.style.height = "100px";
div.style.backgroundColor = "blue";
var eventLog = "";
function appendEventLog() {
var msg = event.type + "(" + event.pageX + ", " + event.pageY + ")";
if (window.eventSender) {
eventLog += msg;
} else {
debug(msg);
}
}
function clearEventLog() {
eventLog = "";
}
div.addEventListener("click", appendEventLog, false);
document.body.insertBefore(div, document.body.firstChild);
function sendEvents(button) {
if (!window.eventSender) {
debug("This test requires DumpRenderTree. Click on the blue rect with the left mouse button to log the mouse coordinates.")
return;
}
eventSender.mouseDown(button);
eventSender.mouseUp(button);
}
function testEvents(button, expectedString) {
sendEvents(button);
shouldBeEqualToString("eventLog", expectedString);
clearEventLog();
}
if (window.eventSender) {
eventSender.mouseMoveTo(10, 10);
testEvents(0, "click(10, 10)");
eventSender.scalePageBy(0.5, 0, 0);
// We are clicking in the same position on screen, but we have scaled the page out by 50%,
// we therefore expect the page-relative coordinates of the mouse event (pageX, pageY)
// to be doubled.
testEvents(0, "click(20, 20)");
}
var successfullyParsed = true;
2011-09-09 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r94536.
http://trac.webkit.org/changeset/94536
https://bugs.webkit.org/show_bug.cgi?id=67836
breaks absoluteLocation() of RelatedMouseEvent (Requested by
jknotten on #webkit).
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
2011-09-08 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: live edit both for JS and CSS is not discoverable.
......@@ -67,7 +67,7 @@ MouseRelatedEvent::MouseRelatedEvent(const AtomicString& eventType, bool canBubb
if (FrameView* frameView = frame->view()) {
scrollPosition = frameView->scrollPosition();
adjustedPageLocation = frameView->windowToContents(windowLocation);
float pageZoom = frame->pageZoomFactor() * frame->pageScaleFactor();
float pageZoom = frame->pageZoomFactor();
if (pageZoom != 1.0f) {
// Adjust our pageX and pageY to account for the page zoom.
adjustedPageLocation.scale(1 / pageZoom, 1 / pageZoom);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment