Added: trunk/LayoutTests/fast/events/ios/click-event-timestamp.html (0 => 209215)
--- trunk/LayoutTests/fast/events/ios/click-event-timestamp.html (rev 0)
+++ trunk/LayoutTests/fast/events/ios/click-event-timestamp.html 2016-12-01 22:48:55 UTC (rev 209215)
@@ -0,0 +1,75 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+
+<html>
+<head>
+ <meta name="viewport" content="width=device-width">
+ <script id="ui-script" type="text/plain">
+ (function() {
+ uiController.singleTapAtPoint(50, 50, function() {
+ uiController.uiScriptComplete();
+ });
+ })();
+ </script>
+ <script>
+ var uiScriptHasCompleted = false;
+ var boxClickCount = 0;
+ var firstClickEventTimeStamp = 0;
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ function getUIScript()
+ {
+ return document.getElementById('ui-script').text;
+ }
+
+ function runTest()
+ {
+ if (testRunner.runUIScript) {
+ testRunner.runUIScript(getUIScript(), function() {
+ setTimeout(function() {
+ testRunner.runUIScript(getUIScript(), function() {
+ uiScriptHasCompleted = true;
+ if (boxClickCount == 2)
+ testRunner.notifyDone();
+ });
+ }, 100);
+ });
+ }
+ }
+
+ function boxClicked(event)
+ {
+ boxClickCount++;
+ if (boxClickCount == 1) {
+ document.getElementById('target').textContent = 'FAIL: only received one click event';
+ firstClickEventTimeStamp = event.timeStamp;
+ return;
+ }
+ if (boxClickCount == 2) {
+ if (event.timeStamp > firstClickEventTimeStamp)
+ document.getElementById('target').textContent = 'PASS: click events had increasing timeStamps';
+ else
+ document.getElementById('target').textContent = 'FAIL: click events did not have increasing timeStamps';
+ if (uiScriptHasCompleted && window.testRunner)
+ testRunner.notifyDone();
+ }
+ }
+ </script>
+ <style>
+ #target {
+ height: 100px;
+ width: 100px;
+ background-color: silver;
+ }
+ </style>
+</head>
+<body _onload_="runTest()">
+
+<div id="target" _onclick_="boxClicked(event)">
+ FAIL: did not receive click event.
+</div>
+
+</body>
+</html>
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (209214 => 209215)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2016-12-01 22:36:22 UTC (rev 209214)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2016-12-01 22:48:55 UTC (rev 209215)
@@ -522,7 +522,7 @@
WKBeginObservingContentChanges(true);
- mainframe.eventHandler().mouseMoved(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0, WebCore::ForceAtClick, WebCore::NoTap));
+ mainframe.eventHandler().mouseMoved(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), WebCore::ForceAtClick, WebCore::NoTap));
mainframe.document()->updateStyleIfNeeded();
WKStopObservingContentChanges();
@@ -569,8 +569,8 @@
bool tapWasHandled = false;
m_lastInteractionLocation = roundedAdjustedPoint;
- tapWasHandled |= mainframe.eventHandler().handleMousePressEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MousePressed, 1, false, false, false, false, 0, WebCore::ForceAtClick, syntheticClickType));
- tapWasHandled |= mainframe.eventHandler().handleMouseReleaseEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MouseReleased, 1, false, false, false, false, 0, WebCore::ForceAtClick, syntheticClickType));
+ tapWasHandled |= mainframe.eventHandler().handleMousePressEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime(), WebCore::ForceAtClick, syntheticClickType));
+ tapWasHandled |= mainframe.eventHandler().handleMouseReleaseEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MouseReleased, 1, false, false, false, false, currentTime(), WebCore::ForceAtClick, syntheticClickType));
RefPtr<Frame> newFocusedFrame = m_page->focusController().focusedFrame();
RefPtr<Element> newFocusedElement = newFocusedFrame ? newFocusedFrame->document()->focusedElement() : nullptr;