Title: [126873] trunk
- Revision
- 126873
- Author
- hugo.l...@openbossa.org
- Date
- 2012-08-28 07:11:18 -0700 (Tue, 28 Aug 2012)
Log Message
[WK2] Send click events to WebCore when the user clicked on a non-special node with TOUCH_ADJUSTMENT enabled.
https://bugs.webkit.org/show_bug.cgi?id=91012
Reviewed by Antonio Gomes.
Source/WebCore:
Don't abort the gesture tap handling when the tap hits a non user
interactable node like a text node.
Test: touchadjustment/focusout-on-touch.html
* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureTap):
LayoutTests:
* touchadjustment/focusout-on-touch-expected.txt: Added.
* touchadjustment/focusout-on-touch.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (126872 => 126873)
--- trunk/LayoutTests/ChangeLog 2012-08-28 13:16:00 UTC (rev 126872)
+++ trunk/LayoutTests/ChangeLog 2012-08-28 14:11:18 UTC (rev 126873)
@@ -1,3 +1,13 @@
+2012-08-28 Hugo Parente Lima <hugo.l...@openbossa.org>
+
+ [WK2] Send click events to WebCore when the user clicked on a non-special node with TOUCH_ADJUSTMENT enabled.
+ https://bugs.webkit.org/show_bug.cgi?id=91012
+
+ Reviewed by Antonio Gomes.
+
+ * touchadjustment/focusout-on-touch-expected.txt: Added.
+ * touchadjustment/focusout-on-touch.html: Added.
+
2012-08-28 Thiago Marcos P. Santos <thiago.san...@intel.com>
Datalist RTL test fails on ports that have progress indicator on the range groove
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (126872 => 126873)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2012-08-28 13:16:00 UTC (rev 126872)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-08-28 14:11:18 UTC (rev 126873)
@@ -2755,6 +2755,9 @@
BUGWK77314 WIN MAC : fast/events/touch/send-oncancel-event.html = PASS TEXT
+// Skipped until setTouchPointRadius get implemented
+BUGWK91012 SKIP : touchadjustment/focusout-on-touch.html = PASS TEXT
+
// CRASH comes from BUGCR121442
BUGWK77397 LINUX : plugins/crash-restoring-plugin-page-from-page-cache.html = TIMEOUT CRASH
BUGWK77397 WIN MAC : plugins/crash-restoring-plugin-page-from-page-cache.html = TIMEOUT
Added: trunk/LayoutTests/touchadjustment/focusout-on-touch-expected.txt (0 => 126873)
--- trunk/LayoutTests/touchadjustment/focusout-on-touch-expected.txt (rev 0)
+++ trunk/LayoutTests/touchadjustment/focusout-on-touch-expected.txt 2012-08-28 14:11:18 UTC (rev 126873)
@@ -0,0 +1,3 @@
+ALERT: PASS!
+You should see "ALERT: PASS!"
+
Added: trunk/LayoutTests/touchadjustment/focusout-on-touch.html (0 => 126873)
--- trunk/LayoutTests/touchadjustment/focusout-on-touch.html (rev 0)
+++ trunk/LayoutTests/touchadjustment/focusout-on-touch.html 2012-08-28 14:11:18 UTC (rev 126873)
@@ -0,0 +1,66 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+<title>Touch Adjustment : Fake mouse events not delivered when touching on a non-interactable node - bug 91012</title>
+<style type="text/css">
+div {
+ width: 400px;
+ height: 400px;
+}
+</style>
+<script type="text/_javascript_">
+function runTest()
+{
+/*
+ WebKit generates fake mouse events on each touch event, here we test if
+ the touch adjustment doesn't caused an early return not firing the fake
+ mouse events used here to unfocus a simple text input.
+*/
+ if (!window.eventSender || !window.testRunner)
+ return;
+
+ testRunner.dumpAsText();
+
+ // Focus the text field
+ var textInput = document.getElementById("textInput");
+ if (document.activeElement === textInput)
+ alert("FAILED!");
+ textInput.focus();
+ if (document.activeElement != textInput)
+ alert("FAILED!");
+
+ // Try to loose the focus touching on a non-editable element.
+ var theDiv = document.getElementById("theDiv");
+ var w = theDiv.clientWidth;
+ var h = theDiv.clientHeight;
+ var x = theDiv.offsetLeft + w/2;
+ var y = theDiv.offsetTop + h/2;
+
+ eventSender.clearTouchPoints();
+ eventSender.setTouchPointRadius(10, 10);
+ eventSender.addTouchPoint(x, y);
+ eventSender.touchStart();
+ eventSender.releaseTouchPoint(0);
+ eventSender.touchEnd();
+
+ // Need to wait a bit so the gesture recognizer will be sure this isn't a double tap.
+ setTimeout(function() {
+ if (document.activeElement == document.body)
+ alert("PASS!")
+ else
+ alert("FAILED, " + document.activeElement.id + " is focused.");
+ testRunner.notifyDone();
+ }, 800);
+
+ // Wait and see...
+ testRunner.waitUntilDone();
+
+}
+
+</script>
+</head>
+<body _onload_="runTest()">
+<div id="theDiv">You should see "ALERT: PASS!"</div>
+<input id="textInput" type="text" value="Touch me please!" />
+</body>
+</html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (126872 => 126873)
--- trunk/Source/WebCore/ChangeLog 2012-08-28 13:16:00 UTC (rev 126872)
+++ trunk/Source/WebCore/ChangeLog 2012-08-28 14:11:18 UTC (rev 126873)
@@ -1,3 +1,18 @@
+2012-08-28 Hugo Parente Lima <hugo.l...@openbossa.org>
+
+ [WK2] Send click events to WebCore when the user clicked on a non-special node with TOUCH_ADJUSTMENT enabled.
+ https://bugs.webkit.org/show_bug.cgi?id=91012
+
+ Reviewed by Antonio Gomes.
+
+ Don't abort the gesture tap handling when the tap hits a non user
+ interactable node like a text node.
+
+ Test: touchadjustment/focusout-on-touch.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleGestureTap):
+
2012-08-28 Andreas Kling <kl...@webkit.org>
Simplify cloning of inline style (below Node.cloneNode)
Modified: trunk/Source/WebCore/page/EventHandler.cpp (126872 => 126873)
--- trunk/Source/WebCore/page/EventHandler.cpp 2012-08-28 13:16:00 UTC (rev 126872)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2012-08-28 14:11:18 UTC (rev 126873)
@@ -2451,8 +2451,8 @@
// FIXME: Refactor this code to not hit test multiple times. We use the adjusted position to ensure that the correct node is targeted by the later redundant hit tests.
IntPoint adjustedPoint = gestureEvent.position();
#if ENABLE(TOUCH_ADJUSTMENT)
- if (!gestureEvent.area().isEmpty() && !adjustGesturePosition(gestureEvent, adjustedPoint))
- return false;
+ if (!gestureEvent.area().isEmpty())
+ adjustGesturePosition(gestureEvent, adjustedPoint);
#endif
PlatformMouseEvent fakeMouseMove(adjustedPoint, gestureEvent.globalPosition(),
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes