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.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107062
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-08 Alexander Pavlov <apavlov@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 <nzimmermann@rim.com>
[Qt] REGRESSION(r106918): It made svg/zoom/page/zoom-foreignObject.svg crash with Qt5-WK1
--- /dev/null
+
+Test touchend events are emulated in iframes correctly.
+
+Final touchend (test will time out if broken)
+
--- /dev/null
+<html>
+<script src="../../js/resources/js-test-pre.js"></script>
+<body>
+<iframe style="position:absolute; top:100px; left:100px;" src="./resources/emulated-touch-iframe2.html"></iframe>
+<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>
--- /dev/null
+<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>
+2012-02-08 Alexander Pavlov <apavlov@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 <awesomekling@apple.com>
StyledElement: Manully setNeedsStyleRecalc() after adding CSSProperties directly.
bool EventHandler::handleMouseReleaseEvent(const MouseEventWithHitTestResults& event)
{
-#if ENABLE(TOUCH_EVENTS)
- bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(event.event());
- if (defaultPrevented)
- return true;
-#endif
-
if (m_autoscrollInProgress)
stopAutoscrollTimer();
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)