Title: [107062] trunk
- Revision
- 107062
- Author
- apav...@chromium.org
- Date
- 2012-02-08 03:13:03 -0800 (Wed, 08 Feb 2012)
Log Message
Web Inspector: Touch event emulation fails for iframes
https://bugs.webkit.org/show_bug.cgi?id=77987
Reviewed by Pavel Feldman.
Source/WebCore:
Test: fast/events/touch/emulated-touch-iframe.html
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseReleaseEvent):
LayoutTests:
* fast/events/touch/emulated-touch-iframe-expected.txt: Added.
* fast/events/touch/emulated-touch-iframe.html: Added.
* fast/events/touch/resources/emulated-touch-iframe2.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (107061 => 107062)
--- trunk/LayoutTests/ChangeLog 2012-02-08 11:03:52 UTC (rev 107061)
+++ trunk/LayoutTests/ChangeLog 2012-02-08 11:13:03 UTC (rev 107062)
@@ -1,3 +1,14 @@
+2012-02-08 Alexander Pavlov <apav...@chromium.org>
+
+ Web Inspector: Touch event emulation fails for iframes
+ https://bugs.webkit.org/show_bug.cgi?id=77987
+
+ Reviewed by Pavel Feldman.
+
+ * fast/events/touch/emulated-touch-iframe-expected.txt: Added.
+ * fast/events/touch/emulated-touch-iframe.html: Added.
+ * fast/events/touch/resources/emulated-touch-iframe2.html: Added.
+
2012-02-08 Nikolas Zimmermann <nzimmerm...@rim.com>
[Qt] REGRESSION(r106918): It made svg/zoom/page/zoom-foreignObject.svg crash with Qt5-WK1
Added: trunk/LayoutTests/fast/events/touch/emulated-touch-iframe-expected.txt (0 => 107062)
--- trunk/LayoutTests/fast/events/touch/emulated-touch-iframe-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/touch/emulated-touch-iframe-expected.txt 2012-02-08 11:13:03 UTC (rev 107062)
@@ -0,0 +1,5 @@
+
+Test touchend events are emulated in iframes correctly.
+
+Final touchend (test will time out if broken)
+
Added: trunk/LayoutTests/fast/events/touch/emulated-touch-iframe.html (0 => 107062)
--- trunk/LayoutTests/fast/events/touch/emulated-touch-iframe.html (rev 0)
+++ trunk/LayoutTests/fast/events/touch/emulated-touch-iframe.html 2012-02-08 11:13:03 UTC (rev 107062)
@@ -0,0 +1,38 @@
+<html>
+<script src=""
+<body>
+<iframe style="position:absolute; top:100px; left:100px;" src=""
+<p>Test touchend events are emulated in iframes correctly.</p>
+<div id="console"></div>
+<script type="text/_javascript_">
+
+var eventCount = 0;
+var EXPECTED_EVENT_COUNT = 2;
+
+function testComplete()
+{
+ if (++eventCount === EXPECTED_EVENT_COUNT) {
+ debug("Final touchend (test will time out if broken)");
+ window.layoutTestController.notifyDone();
+ }
+}
+
+function runTest() {
+ if (window.eventSender && window.internals && window.internals.settings) {
+ window.eventSender.dragMode = false;
+ window.internals.settings.setTouchEventEmulationEnabled(true);
+
+ eventSender.mouseMoveTo(110, 110);
+ eventSender.mouseDown(0);
+ eventSender.mouseMoveTo(120, 130);
+ eventSender.mouseUp(0);
+ } else
+ debug('This test requires DRT.');
+}
+
+if (window.layoutTestController)
+ window.layoutTestController.waitUntilDone();
+
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/fast/events/touch/resources/emulated-touch-iframe2.html (0 => 107062)
--- trunk/LayoutTests/fast/events/touch/resources/emulated-touch-iframe2.html (rev 0)
+++ trunk/LayoutTests/fast/events/touch/resources/emulated-touch-iframe2.html 2012-02-08 11:13:03 UTC (rev 107062)
@@ -0,0 +1,9 @@
+<html>
+<body _onload_="parent.runTest()">
+<div id='mydiv' style='width:100px;height:100px;position:absolute;top:0px; left:0px; background-color:blue;'></div>
+<script type='text/_javascript_'>
+var myDiv = document.getElementById('mydiv');
+myDiv.addEventListener('touchend', function() { parent.testComplete(); }, false);
+</script>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (107061 => 107062)
--- trunk/Source/WebCore/ChangeLog 2012-02-08 11:03:52 UTC (rev 107061)
+++ trunk/Source/WebCore/ChangeLog 2012-02-08 11:13:03 UTC (rev 107062)
@@ -1,3 +1,15 @@
+2012-02-08 Alexander Pavlov <apav...@chromium.org>
+
+ Web Inspector: Touch event emulation fails for iframes
+ https://bugs.webkit.org/show_bug.cgi?id=77987
+
+ Reviewed by Pavel Feldman.
+
+ Test: fast/events/touch/emulated-touch-iframe.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMouseReleaseEvent):
+
2012-02-08 Andreas Kling <awesomekl...@apple.com>
StyledElement: Manully setNeedsStyleRecalc() after adding CSSProperties directly.
Modified: trunk/Source/WebCore/page/EventHandler.cpp (107061 => 107062)
--- trunk/Source/WebCore/page/EventHandler.cpp 2012-02-08 11:03:52 UTC (rev 107061)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2012-02-08 11:13:03 UTC (rev 107062)
@@ -807,12 +807,6 @@
bool EventHandler::handleMouseReleaseEvent(const MouseEventWithHitTestResults& event)
{
-#if ENABLE(TOUCH_EVENTS)
- bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(event.event());
- if (defaultPrevented)
- return true;
-#endif
-
if (m_autoscrollInProgress)
stopAutoscrollTimer();
@@ -1787,7 +1781,13 @@
bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent)
{
RefPtr<FrameView> protector(m_frame->view());
-
+
+#if ENABLE(TOUCH_EVENTS)
+ bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent);
+ if (defaultPrevented)
+ return true;
+#endif
+
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
#if ENABLE(PAN_SCROLLING)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes