Title: [128615] trunk
- Revision
- 128615
- Author
- [email protected]
- Date
- 2012-09-14 08:55:08 -0700 (Fri, 14 Sep 2012)
Log Message
Gesture events sent to wrong node when page is scrolled
https://bugs.webkit.org/show_bug.cgi?id=96788
Patch by Rick Byers <[email protected]> on 2012-09-14
Reviewed by Antonio Gomes.
Source/WebCore:
Adjust the co-ordinate space correctly when doing hit testing for
gesture events (as for all other event handling code here).
Test: platform/chromium/plugins/gesture-events-scrolled.html
* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureEvent):
LayoutTests:
Add layout test based on gesture-events.html which tests the case when
the document is scrolled (so that client co-ordinates don't equal page
co-ordinates).
* platform/chromium/plugins/gesture-events-scrolled-expected.txt: Added.
* platform/chromium/plugins/gesture-events-scrolled.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (128614 => 128615)
--- trunk/LayoutTests/ChangeLog 2012-09-14 15:47:15 UTC (rev 128614)
+++ trunk/LayoutTests/ChangeLog 2012-09-14 15:55:08 UTC (rev 128615)
@@ -1,3 +1,16 @@
+2012-09-14 Rick Byers <[email protected]>
+
+ Gesture events sent to wrong node when page is scrolled
+ https://bugs.webkit.org/show_bug.cgi?id=96788
+
+ Reviewed by Antonio Gomes.
+
+ Add layout test based on gesture-events.html which tests the case when
+ the document is scrolled (so that client co-ordinates don't equal page
+ co-ordinates).
+ * platform/chromium/plugins/gesture-events-scrolled-expected.txt: Added.
+ * platform/chromium/plugins/gesture-events-scrolled.html: Added.
+
2012-09-14 Sudarsana Nagineni <[email protected]>
[EFL][WK2] Unskip test cases that are now passing
Added: trunk/LayoutTests/platform/chromium/plugins/gesture-events-scrolled-expected.txt (0 => 128615)
--- trunk/LayoutTests/platform/chromium/plugins/gesture-events-scrolled-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/chromium/plugins/gesture-events-scrolled-expected.txt 2012-09-14 15:55:08 UTC (rev 128615)
@@ -0,0 +1,10 @@
+Plugin received event: GestureTap
+Plugin received event: MouseEnter
+Plugin received event: MouseMove
+Plugin received event: MouseDown
+Plugin received event: MouseUp
+Plugin received event: GestureScrollBegin
+Plugin received event: GestureScrollUpdate
+Plugin received event: MouseWheel
+Plugin received event: GestureScrollEnd
+
Added: trunk/LayoutTests/platform/chromium/plugins/gesture-events-scrolled.html (0 => 128615)
--- trunk/LayoutTests/platform/chromium/plugins/gesture-events-scrolled.html (rev 0)
+++ trunk/LayoutTests/platform/chromium/plugins/gesture-events-scrolled.html 2012-09-14 15:55:08 UTC (rev 128615)
@@ -0,0 +1,43 @@
+<html>
+<head>
+<style>
+ body {
+ height: 2000px;
+ }
+ #plugin {
+ position: absolute;
+ top: 500px;
+ width: 150px;
+ height: 150px;
+ }
+</style>
+</head>
+
+<body>
+<embed id="plugin" type="application/x-webkit-test-webplugin" primitive="triangle" background-color="green" primitive-color="blue"></embed>
+<script>
+
+ if (!window.testRunner) {
+ document.write("This test does not work in manual mode.");
+ } else {
+ testRunner.dumpAsText();
+
+ // Scroll so the plugin is 100px down the page
+ window.scroll(0, 400);
+
+ // These events should not reach the plugin since it's futher down on the page.
+ eventSender.gestureTapDown(30, 30);
+ eventSender.gestureTapDown(30, 530);
+
+ // Send some gesture events to the plugin.
+ var positionX = 30;
+ var positionY = 110;
+ eventSender.gestureTap(positionX, positionY);
+ eventSender.gestureScrollBegin(positionX, positionY);
+ eventSender.gestureScrollUpdate(30, 0);
+ eventSender.gestureScrollEnd(0, 0);
+ }
+
+</script>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (128614 => 128615)
--- trunk/Source/WebCore/ChangeLog 2012-09-14 15:47:15 UTC (rev 128614)
+++ trunk/Source/WebCore/ChangeLog 2012-09-14 15:55:08 UTC (rev 128615)
@@ -1,3 +1,18 @@
+2012-09-14 Rick Byers <[email protected]>
+
+ Gesture events sent to wrong node when page is scrolled
+ https://bugs.webkit.org/show_bug.cgi?id=96788
+
+ Reviewed by Antonio Gomes.
+
+ Adjust the co-ordinate space correctly when doing hit testing for
+ gesture events (as for all other event handling code here).
+
+ Test: platform/chromium/plugins/gesture-events-scrolled.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleGestureEvent):
+
2012-09-14 Mikhail Pozdnyakov <[email protected]>
[EFL] Attempt to create a theme for 0 sized element leads to assertion hit
Modified: trunk/Source/WebCore/page/EventHandler.cpp (128614 => 128615)
--- trunk/Source/WebCore/page/EventHandler.cpp 2012-09-14 15:47:15 UTC (rev 128614)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2012-09-14 15:55:08 UTC (rev 128615)
@@ -2381,7 +2381,8 @@
eventTarget = m_scrollGestureHandlingNode.get();
if (!eventTarget) {
- HitTestResult result = hitTestResultAtPoint(gestureEvent.position(), false, false, DontHitTestScrollbars, HitTestRequest::ReadOnly | HitTestRequest::Active);
+ IntPoint hitTestPoint = m_frame->view()->windowToContents(gestureEvent.position());
+ HitTestResult result = hitTestResultAtPoint(hitTestPoint, false, false, DontHitTestScrollbars, HitTestRequest::ReadOnly | HitTestRequest::Active);
eventTarget = result.targetNode();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes