[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
eric at webkit.org
eric at webkit.org
Wed Mar 17 17:57:12 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit f1fa1e0056a6a782e9bda4cb441cc09da3b1ea6b
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 23 13:12:15 2010 +0000
2010-02-23 Ben Murdoch <benm at google.com>
Reviewed by Eric Seidel.
pageX/Y co-ordinates of TouchEvent should be 0,0
https://bugs.webkit.org/show_bug.cgi?id=35239
Update layout tests to reflect the WebCore changes in this bug.
* fast/events/touch/basic-multi-touch-events-expected.txt: Updated.
* fast/events/touch/basic-single-touch-events-expected.txt: Updated.
* fast/events/touch/script-tests/basic-multi-touch-events.js:
(verifyTouchEvent): Add checking of TouchEvent.pageX/Y
* fast/events/touch/script-tests/basic-single-touch-events.js:
(verifyTouchEvent): ditto.
2010-02-23 Ben Murdoch <benm at google.com>
Reviewed by Eric Seidel.
pageX/Y co-ordinates of TouchEvent should be 0,0
https://bugs.webkit.org/show_bug.cgi?id=35239
The co-ordinates attached to a touch event are not used for tracking touch motion, rather the co-ordinates attached to Touches within the touch event should be used. Set the co-ordinates on the event itself to 0 to avoid confusion and match observed iPhone behavior.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleTouchEvent): Set the pageX/Y and screenX/Y co-ordinates attached to the touch event to 0,0 to match observed behavior on the iPhone.
* page/EventHandler.h: Remove now unused members m_firstTouchScreenPos and m_firstTouchPagePos.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55146 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e922c6e..3e1eae6 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-02-23 Ben Murdoch <benm at google.com>
+
+ Reviewed by Eric Seidel.
+
+ pageX/Y co-ordinates of TouchEvent should be 0,0
+ https://bugs.webkit.org/show_bug.cgi?id=35239
+
+ Update layout tests to reflect the WebCore changes in this bug.
+
+ * fast/events/touch/basic-multi-touch-events-expected.txt: Updated.
+ * fast/events/touch/basic-single-touch-events-expected.txt: Updated.
+ * fast/events/touch/script-tests/basic-multi-touch-events.js:
+ (verifyTouchEvent): Add checking of TouchEvent.pageX/Y
+ * fast/events/touch/script-tests/basic-single-touch-events.js:
+ (verifyTouchEvent): ditto.
+
2010-02-23 Shinichiro Hamaji <hamaji at chromium.org>
Reviewed by Eric Seidel.
diff --git a/LayoutTests/fast/events/touch/basic-multi-touch-events-expected.txt b/LayoutTests/fast/events/touch/basic-multi-touch-events-expected.txt
index 67db8dc..9f83f8f 100644
--- a/LayoutTests/fast/events/touch/basic-multi-touch-events-expected.txt
+++ b/LayoutTests/fast/events/touch/basic-multi-touch-events-expected.txt
@@ -9,6 +9,8 @@ PASS lastEvent.type is "touchstart"
PASS lastEvent.touches.length is 2
PASS lastEvent.changedTouches.length is 2
PASS lastEvent.targetTouches.length is 2
+PASS lastEvent.pageX is 0
+PASS lastEvent.pageY is 0
PASS lastEvent.touches[0].pageX is 10
PASS lastEvent.touches[0].pageY is 10
PASS lastEvent.touches[0].clientX is 10
@@ -44,6 +46,8 @@ PASS lastEvent.type is "touchmove"
PASS lastEvent.touches.length is 2
PASS lastEvent.changedTouches.length is 1
PASS lastEvent.targetTouches.length is 2
+PASS lastEvent.pageX is 0
+PASS lastEvent.pageY is 0
PASS lastEvent.touches[0].pageX is 15
PASS lastEvent.touches[0].pageY is 15
PASS lastEvent.touches[0].clientX is 15
@@ -64,6 +68,8 @@ PASS lastEvent.type is "touchend"
PASS lastEvent.touches.length is 1
PASS lastEvent.changedTouches.length is 1
PASS lastEvent.targetTouches.length is 1
+PASS lastEvent.pageX is 0
+PASS lastEvent.pageY is 0
PASS lastEvent.touches[0].pageX is 20
PASS lastEvent.touches[0].pageY is 30
PASS lastEvent.touches[0].clientX is 20
@@ -84,6 +90,8 @@ PASS lastEvent.type is "touchend"
PASS lastEvent.touches.length is 0
PASS lastEvent.changedTouches.length is 1
PASS lastEvent.targetTouches.length is 0
+PASS lastEvent.pageX is 0
+PASS lastEvent.pageY is 0
PASS lastEvent.changedTouches[0].pageX is 20
PASS lastEvent.changedTouches[0].pageY is 30
PASS lastEvent.changedTouches[0].clientX is 20
diff --git a/LayoutTests/fast/events/touch/basic-single-touch-events-expected.txt b/LayoutTests/fast/events/touch/basic-single-touch-events-expected.txt
index 634faa1..c424a09 100644
--- a/LayoutTests/fast/events/touch/basic-single-touch-events-expected.txt
+++ b/LayoutTests/fast/events/touch/basic-single-touch-events-expected.txt
@@ -7,6 +7,8 @@ PASS lastEvent.type is "touchstart"
PASS lastEvent.touches.length is 1
PASS lastEvent.changedTouches.length is 1
PASS lastEvent.targetTouches.length is 1
+PASS lastEvent.pageX is 0
+PASS lastEvent.pageY is 0
PASS lastEvent.shiftKey is false
PASS lastEvent.touches[0].target.id is "touchtarget"
PASS lastEvent.touches[0].pageX is 10
@@ -28,6 +30,8 @@ PASS lastEvent.type is "touchmove"
PASS lastEvent.touches.length is 1
PASS lastEvent.changedTouches.length is 1
PASS lastEvent.targetTouches.length is 1
+PASS lastEvent.pageX is 0
+PASS lastEvent.pageY is 0
PASS lastEvent.touches[0].pageX is 20
PASS lastEvent.touches[0].pageY is 15
PASS lastEvent.touches[0].clientX is 20
@@ -41,6 +45,8 @@ PASS lastEvent.type is "touchend"
PASS lastEvent.touches.length is 0
PASS lastEvent.changedTouches.length is 1
PASS lastEvent.targetTouches.length is 0
+PASS lastEvent.pageX is 0
+PASS lastEvent.pageY is 0
PASS lastEvent.changedTouches[0].pageX is 20
PASS lastEvent.changedTouches[0].pageY is 15
PASS lastEvent.changedTouches[0].clientX is 20
@@ -52,11 +58,15 @@ PASS lastEvent.type is "touchstart"
PASS lastEvent.touches.length is 1
PASS lastEvent.changedTouches.length is 1
PASS lastEvent.targetTouches.length is 1
+PASS lastEvent.pageX is 0
+PASS lastEvent.pageY is 0
PASS lastEvent.targetTouches[0].target.tagName is "DIV"
PASS lastEvent.type is "touchmove"
PASS lastEvent.touches.length is 1
PASS lastEvent.changedTouches.length is 1
PASS lastEvent.targetTouches.length is 0
+PASS lastEvent.pageX is 0
+PASS lastEvent.pageY is 0
PASS lastEvent.touches[0].target.tagName is "HTML"
PASS successfullyParsed is true
diff --git a/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events.js b/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events.js
index abfaf90..579c073 100644
--- a/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events.js
+++ b/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events.js
@@ -37,6 +37,8 @@ function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchC
shouldBe("lastEvent.touches.length", totalTouchCount.toString());
shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString());
shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString());
+ shouldBe("lastEvent.pageX", "0");
+ shouldBe("lastEvent.pageY", "0");
}
function verifyTouchPoint(list, point, x, y, id)
diff --git a/LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js b/LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js
index ca99d83..1c33458 100644
--- a/LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js
+++ b/LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js
@@ -37,6 +37,8 @@ function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchC
shouldBe("lastEvent.touches.length", totalTouchCount.toString());
shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString());
shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString());
+ shouldBe("lastEvent.pageX", "0");
+ shouldBe("lastEvent.pageY", "0");
}
function verifyTouchPoint(list, point, x, y, id)
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index cbf9a32..5162d91 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-02-23 Ben Murdoch <benm at google.com>
+
+ Reviewed by Eric Seidel.
+
+ pageX/Y co-ordinates of TouchEvent should be 0,0
+ https://bugs.webkit.org/show_bug.cgi?id=35239
+
+ The co-ordinates attached to a touch event are not used for tracking touch motion, rather the co-ordinates attached to Touches within the touch event should be used. Set the co-ordinates on the event itself to 0 to avoid confusion and match observed iPhone behavior.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleTouchEvent): Set the pageX/Y and screenX/Y co-ordinates attached to the touch event to 0,0 to match observed behavior on the iPhone.
+ * page/EventHandler.h: Remove now unused members m_firstTouchScreenPos and m_firstTouchPagePos.
+
2010-02-23 Stephan Aßmus <superstippi at gmx.de>
Reviewed by Eric Seidel.
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index a9a08e3..c3d1e5c 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -2589,8 +2589,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
if (event.type() == TouchStart && !i) {
m_touchEventTarget = target;
- m_firstTouchScreenPos = point.screenPos();
- m_firstTouchPagePos = pagePoint;
}
if (point.state() == PlatformTouchPoint::TouchReleased)
@@ -2620,9 +2618,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
RefPtr<TouchEvent> cancelEv =
TouchEvent::create(TouchList::create().get(), TouchList::create().get(), cancelTouches.get(),
*eventName, m_touchEventTarget->document()->defaultView(),
- m_firstTouchScreenPos.x(), m_firstTouchScreenPos.y(),
- m_firstTouchPagePos.x(), m_firstTouchPagePos.y(),
- event.ctrlKey(), event.altKey(), event.shiftKey(),
+ 0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(),
event.metaKey());
ExceptionCode ec = 0;
@@ -2635,9 +2631,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
RefPtr<TouchEvent> endEv =
TouchEvent::create(touches.get(), targetTouches.get(), releasedTouches.get(),
*eventName, m_touchEventTarget->document()->defaultView(),
- m_firstTouchScreenPos.x(), m_firstTouchScreenPos.y(),
- m_firstTouchPagePos.x(), m_firstTouchPagePos.y(),
- event.ctrlKey(), event.altKey(), event.shiftKey(),
+ 0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(),
event.metaKey());
ExceptionCode ec = 0;
m_touchEventTarget->dispatchEvent(endEv.get(), ec);
@@ -2655,9 +2649,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
RefPtr<TouchEvent> startEv =
TouchEvent::create(touches.get(), targetTouches.get(), pressedTouches.get(),
*eventName, m_touchEventTarget->document()->defaultView(),
- m_firstTouchScreenPos.x(), m_firstTouchScreenPos.y(),
- m_firstTouchPagePos.x(), m_firstTouchPagePos.y(),
- event.ctrlKey(), event.altKey(), event.shiftKey(),
+ 0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(),
event.metaKey());
ExceptionCode ec = 0;
m_touchEventTarget->dispatchEvent(startEv.get(), ec);
@@ -2668,9 +2660,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
RefPtr<TouchEvent> moveEv =
TouchEvent::create(touches.get(), targetTouches.get(), movedTouches.get(),
*eventName, m_touchEventTarget->document()->defaultView(),
- m_firstTouchScreenPos.x(), m_firstTouchScreenPos.y(),
- m_firstTouchPagePos.x(), m_firstTouchPagePos.y(),
- event.ctrlKey(), event.altKey(), event.shiftKey(),
+ 0, 0, 0, 0, event.ctrlKey(), event.altKey(), event.shiftKey(),
event.metaKey());
ExceptionCode ec = 0;
m_touchEventTarget->dispatchEvent(moveEv.get(), ec);
diff --git a/WebCore/page/EventHandler.h b/WebCore/page/EventHandler.h
index f490073..72a10f7 100644
--- a/WebCore/page/EventHandler.h
+++ b/WebCore/page/EventHandler.h
@@ -409,8 +409,6 @@ private:
#endif
#if ENABLE(TOUCH_EVENTS)
RefPtr<Node> m_touchEventTarget;
- IntPoint m_firstTouchScreenPos;
- IntPoint m_firstTouchPagePos;
#endif
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list