| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 #include "Image.h" | 63 #include "Image.h" |
| 64 #include "InspectorInstrumentation.h" | 64 #include "InspectorInstrumentation.h" |
| 65 #include "KeyboardEvent.h" | 65 #include "KeyboardEvent.h" |
| 66 #include "MouseEvent.h" | 66 #include "MouseEvent.h" |
| 67 #include "MouseEventWithHitTestResults.h" | 67 #include "MouseEventWithHitTestResults.h" |
| 68 #include "NotImplemented.h" | 68 #include "NotImplemented.h" |
| 69 #include "Page.h" | 69 #include "Page.h" |
| 70 #include "PlatformEvent.h" | 70 #include "PlatformEvent.h" |
| 71 #include "PlatformGestureEvent.h" | 71 #include "PlatformGestureEvent.h" |
| 72 #include "PlatformKeyboardEvent.h" | 72 #include "PlatformKeyboardEvent.h" |
| 73 #include "PlatformTouchEvent.h" | |
| 74 #include "PlatformWheelEvent.h" | 73 #include "PlatformWheelEvent.h" |
| 75 #include "PluginDocument.h" | 74 #include "PluginDocument.h" |
| 76 #include "RenderFrameSet.h" | 75 #include "RenderFrameSet.h" |
| 77 #include "RenderLayer.h" | 76 #include "RenderLayer.h" |
| 78 #include "RenderTextControlSingleLine.h" | 77 #include "RenderTextControlSingleLine.h" |
| 79 #include "RenderView.h" | 78 #include "RenderView.h" |
| 80 #include "RenderWidget.h" | 79 #include "RenderWidget.h" |
| 81 #include "ScrollAnimator.h" | 80 #include "ScrollAnimator.h" |
| 82 #include "Scrollbar.h" | 81 #include "Scrollbar.h" |
| 83 #include "Settings.h" | 82 #include "Settings.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 99 #include <wtf/StdLibExtras.h> | 98 #include <wtf/StdLibExtras.h> |
| 100 #include <wtf/TemporaryChange.h> | 99 #include <wtf/TemporaryChange.h> |
| 101 | 100 |
| 102 #if ENABLE(SVG) | 101 #if ENABLE(SVG) |
| 103 #include "SVGDocument.h" | 102 #include "SVGDocument.h" |
| 104 #include "SVGElementInstance.h" | 103 #include "SVGElementInstance.h" |
| 105 #include "SVGNames.h" | 104 #include "SVGNames.h" |
| 106 #include "SVGUseElement.h" | 105 #include "SVGUseElement.h" |
| 107 #endif | 106 #endif |
| 108 | 107 |
| 108 #if ENABLE(TOUCH_EVENTS) |
| 109 #include "PlatformTouchEvent.h" |
| 110 #include "TouchEvent.h" |
| 111 #include "TouchList.h" |
| 112 #endif |
| 113 |
| 109 #if ENABLE(CSS_IMAGE_SET) | 114 #if ENABLE(CSS_IMAGE_SET) |
| 110 #include "StyleCachedImageSet.h" | 115 #include "StyleCachedImageSet.h" |
| 111 #endif | 116 #endif |
| 112 | 117 |
| 113 namespace WebCore { | 118 namespace WebCore { |
| 114 | 119 |
| 115 using namespace HTMLNames; | 120 using namespace HTMLNames; |
| 116 | 121 |
| 117 // The link drag hysteresis is much larger than the others because there | 122 // The link drag hysteresis is much larger than the others because there |
| 118 // needs to be enough space to cancel the link press without starting a link dra
g, | 123 // needs to be enough space to cancel the link press without starting a link dra
g, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 ~MaximumDurationTracker() | 181 ~MaximumDurationTracker() |
| 177 { | 182 { |
| 178 *m_maxDuration = max(*m_maxDuration, monotonicallyIncreasingTime() - m_s
tart); | 183 *m_maxDuration = max(*m_maxDuration, monotonicallyIncreasingTime() - m_s
tart); |
| 179 } | 184 } |
| 180 | 185 |
| 181 private: | 186 private: |
| 182 double* m_maxDuration; | 187 double* m_maxDuration; |
| 183 double m_start; | 188 double m_start; |
| 184 }; | 189 }; |
| 185 | 190 |
| 191 #if ENABLE(TOUCH_EVENTS) |
| 186 class SyntheticTouchPoint : public PlatformTouchPoint { | 192 class SyntheticTouchPoint : public PlatformTouchPoint { |
| 187 public: | 193 public: |
| 188 | 194 |
| 189 // The default values are based on http://dvcs.w3.org/hg/webevents/raw-file/
tip/touchevents.html | 195 // The default values are based on http://dvcs.w3.org/hg/webevents/raw-file/
tip/touchevents.html |
| 190 explicit SyntheticTouchPoint(const PlatformMouseEvent& event) | 196 explicit SyntheticTouchPoint(const PlatformMouseEvent& event) |
| 191 { | 197 { |
| 192 const static int idDefaultValue = 0; | 198 const static int idDefaultValue = 0; |
| 193 const static int radiusYDefaultValue = 1; | 199 const static int radiusYDefaultValue = 1; |
| 194 const static int radiusXDefaultValue = 1; | 200 const static int radiusXDefaultValue = 1; |
| 195 const static float rotationAngleDefaultValue = 0.0f; | 201 const static float rotationAngleDefaultValue = 0.0f; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 default: | 246 default: |
| 241 ASSERT_NOT_REACHED(); | 247 ASSERT_NOT_REACHED(); |
| 242 m_type = NoType; | 248 m_type = NoType; |
| 243 break; | 249 break; |
| 244 } | 250 } |
| 245 m_timestamp = event.timestamp(); | 251 m_timestamp = event.timestamp(); |
| 246 m_modifiers = event.modifiers(); | 252 m_modifiers = event.modifiers(); |
| 247 m_touchPoints.append(SyntheticTouchPoint(event)); | 253 m_touchPoints.append(SyntheticTouchPoint(event)); |
| 248 } | 254 } |
| 249 }; | 255 }; |
| 256 #endif |
| 250 | 257 |
| 251 static inline ScrollGranularity wheelGranularityToScrollGranularity(unsigned del
taMode) | 258 static inline ScrollGranularity wheelGranularityToScrollGranularity(unsigned del
taMode) |
| 252 { | 259 { |
| 253 switch (deltaMode) { | 260 switch (deltaMode) { |
| 254 case WheelEvent::DOM_DELTA_PAGE: | 261 case WheelEvent::DOM_DELTA_PAGE: |
| 255 return ScrollByPage; | 262 return ScrollByPage; |
| 256 case WheelEvent::DOM_DELTA_LINE: | 263 case WheelEvent::DOM_DELTA_LINE: |
| 257 return ScrollByLine; | 264 return ScrollByLine; |
| 258 case WheelEvent::DOM_DELTA_PIXEL: | 265 case WheelEvent::DOM_DELTA_PIXEL: |
| 259 return ScrollByPixel; | 266 return ScrollByPixel; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 , m_fakeMouseMoveEventTimer(this, &EventHandler::fakeMouseMoveEventTimerFire
d) | 304 , m_fakeMouseMoveEventTimer(this, &EventHandler::fakeMouseMoveEventTimerFire
d) |
| 298 #if ENABLE(SVG) | 305 #if ENABLE(SVG) |
| 299 , m_svgPan(false) | 306 , m_svgPan(false) |
| 300 #endif | 307 #endif |
| 301 , m_resizeLayer(0) | 308 , m_resizeLayer(0) |
| 302 , m_eventHandlerWillResetCapturingMouseEventsNode(0) | 309 , m_eventHandlerWillResetCapturingMouseEventsNode(0) |
| 303 , m_clickCount(0) | 310 , m_clickCount(0) |
| 304 , m_mousePositionIsUnknown(true) | 311 , m_mousePositionIsUnknown(true) |
| 305 , m_mouseDownTimestamp(0) | 312 , m_mouseDownTimestamp(0) |
| 306 , m_widgetIsLatched(false) | 313 , m_widgetIsLatched(false) |
| 314 #if ENABLE(TOUCH_EVENTS) |
| 307 , m_originatingTouchPointTargetKey(0) | 315 , m_originatingTouchPointTargetKey(0) |
| 308 , m_touchPressed(false) | 316 , m_touchPressed(false) |
| 317 #endif |
| 309 , m_scrollGestureHandlingNode(0) | 318 , m_scrollGestureHandlingNode(0) |
| 310 , m_lastHitTestResultOverWidget(false) | 319 , m_lastHitTestResultOverWidget(false) |
| 311 , m_maxMouseMovedDuration(0) | 320 , m_maxMouseMovedDuration(0) |
| 312 , m_baseEventType(PlatformEvent::NoType) | 321 , m_baseEventType(PlatformEvent::NoType) |
| 313 , m_didStartDrag(false) | 322 , m_didStartDrag(false) |
| 314 , m_didLongPressInvokeContextMenu(false) | 323 , m_didLongPressInvokeContextMenu(false) |
| 315 #if ENABLE(CURSOR_VISIBILITY) | 324 #if ENABLE(CURSOR_VISIBILITY) |
| 316 , m_autoHideCursorTimer(this, &EventHandler::autoHideCursorTimerFired) | 325 , m_autoHideCursorTimer(this, &EventHandler::autoHideCursorTimerFired) |
| 317 #endif | 326 #endif |
| 318 { | 327 { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 m_mousePositionIsUnknown = true; | 365 m_mousePositionIsUnknown = true; |
| 357 m_lastKnownMousePosition = IntPoint(); | 366 m_lastKnownMousePosition = IntPoint(); |
| 358 m_lastKnownMouseGlobalPosition = IntPoint(); | 367 m_lastKnownMouseGlobalPosition = IntPoint(); |
| 359 m_lastMouseDownUserGestureToken.clear(); | 368 m_lastMouseDownUserGestureToken.clear(); |
| 360 m_mousePressNode = 0; | 369 m_mousePressNode = 0; |
| 361 m_mousePressed = false; | 370 m_mousePressed = false; |
| 362 m_capturesDragging = false; | 371 m_capturesDragging = false; |
| 363 m_capturingMouseEventsNode = 0; | 372 m_capturingMouseEventsNode = 0; |
| 364 m_latchedWheelEventNode = 0; | 373 m_latchedWheelEventNode = 0; |
| 365 m_previousWheelScrolledNode = 0; | 374 m_previousWheelScrolledNode = 0; |
| 375 #if ENABLE(TOUCH_EVENTS) |
| 366 m_originatingTouchPointTargets.clear(); | 376 m_originatingTouchPointTargets.clear(); |
| 367 m_originatingTouchPointDocument.clear(); | 377 m_originatingTouchPointDocument.clear(); |
| 368 m_originatingTouchPointTargetKey = 0; | 378 m_originatingTouchPointTargetKey = 0; |
| 379 #endif |
| 369 m_scrollGestureHandlingNode = 0; | 380 m_scrollGestureHandlingNode = 0; |
| 370 m_lastHitTestResultOverWidget = false; | 381 m_lastHitTestResultOverWidget = false; |
| 371 m_previousGestureScrolledNode = 0; | 382 m_previousGestureScrolledNode = 0; |
| 372 m_scrollbarHandlingScrollGesture = 0; | 383 m_scrollbarHandlingScrollGesture = 0; |
| 373 m_maxMouseMovedDuration = 0; | 384 m_maxMouseMovedDuration = 0; |
| 374 m_baseEventType = PlatformEvent::NoType; | 385 m_baseEventType = PlatformEvent::NoType; |
| 375 m_didStartDrag = false; | 386 m_didStartDrag = false; |
| 376 m_didLongPressInvokeContextMenu = false; | 387 m_didLongPressInvokeContextMenu = false; |
| 377 } | 388 } |
| 378 | 389 |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1352 | 1363 |
| 1353 bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent) | 1364 bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent) |
| 1354 { | 1365 { |
| 1355 RefPtr<FrameView> protector(m_frame->view()); | 1366 RefPtr<FrameView> protector(m_frame->view()); |
| 1356 | 1367 |
| 1357 if (InspectorInstrumentation::handleMousePress(m_frame->page())) { | 1368 if (InspectorInstrumentation::handleMousePress(m_frame->page())) { |
| 1358 invalidateClick(); | 1369 invalidateClick(); |
| 1359 return true; | 1370 return true; |
| 1360 } | 1371 } |
| 1361 | 1372 |
| 1373 #if ENABLE(TOUCH_EVENTS) |
| 1362 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent); | 1374 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent); |
| 1363 if (defaultPrevented) | 1375 if (defaultPrevented) |
| 1364 return true; | 1376 return true; |
| 1377 #endif |
| 1365 | 1378 |
| 1366 UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture); | 1379 UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture); |
| 1367 m_lastMouseDownUserGestureToken = gestureIndicator.currentToken(); | 1380 m_lastMouseDownUserGestureToken = gestureIndicator.currentToken(); |
| 1368 | 1381 |
| 1369 // FIXME (bug 68185): this call should be made at another abstraction layer | 1382 // FIXME (bug 68185): this call should be made at another abstraction layer |
| 1370 m_frame->loader()->resetMultipleFormSubmissionProtection(); | 1383 m_frame->loader()->resetMultipleFormSubmissionProtection(); |
| 1371 | 1384 |
| 1372 cancelFakeMouseMoveEvent(); | 1385 cancelFakeMouseMoveEvent(); |
| 1373 m_mousePressed = true; | 1386 m_mousePressed = true; |
| 1374 m_capturesDragging = true; | 1387 m_capturesDragging = true; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1544 bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& mouseEvent, Hi
tTestResult* hoveredNode, bool onlyUpdateScrollbars) | 1557 bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& mouseEvent, Hi
tTestResult* hoveredNode, bool onlyUpdateScrollbars) |
| 1545 { | 1558 { |
| 1546 // in Radar 3703768 we saw frequent crashes apparently due to the | 1559 // in Radar 3703768 we saw frequent crashes apparently due to the |
| 1547 // part being null here, which seems impossible, so check for nil | 1560 // part being null here, which seems impossible, so check for nil |
| 1548 // but also assert so that we can try to figure this out in debug | 1561 // but also assert so that we can try to figure this out in debug |
| 1549 // builds, if it happens. | 1562 // builds, if it happens. |
| 1550 ASSERT(m_frame); | 1563 ASSERT(m_frame); |
| 1551 if (!m_frame) | 1564 if (!m_frame) |
| 1552 return false; | 1565 return false; |
| 1553 | 1566 |
| 1567 #if ENABLE(TOUCH_EVENTS) |
| 1554 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent); | 1568 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent); |
| 1555 if (defaultPrevented) | 1569 if (defaultPrevented) |
| 1556 return true; | 1570 return true; |
| 1571 #endif |
| 1557 | 1572 |
| 1558 RefPtr<FrameView> protector(m_frame->view()); | 1573 RefPtr<FrameView> protector(m_frame->view()); |
| 1559 | 1574 |
| 1560 setLastKnownMousePosition(mouseEvent); | 1575 setLastKnownMousePosition(mouseEvent); |
| 1561 | 1576 |
| 1562 if (m_hoverTimer.isActive()) | 1577 if (m_hoverTimer.isActive()) |
| 1563 m_hoverTimer.stop(); | 1578 m_hoverTimer.stop(); |
| 1564 | 1579 |
| 1565 cancelFakeMouseMoveEvent(); | 1580 cancelFakeMouseMoveEvent(); |
| 1566 | 1581 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1582 if (m_mousePressed) | 1597 if (m_mousePressed) |
| 1583 hitType |= HitTestRequest::Active; | 1598 hitType |= HitTestRequest::Active; |
| 1584 else if (onlyUpdateScrollbars) { | 1599 else if (onlyUpdateScrollbars) { |
| 1585 // Mouse events should be treated as "read-only" if we're updating only
scrollbars. This | 1600 // Mouse events should be treated as "read-only" if we're updating only
scrollbars. This |
| 1586 // means that :hover and :active freeze in the state they were in, rathe
r than updating | 1601 // means that :hover and :active freeze in the state they were in, rathe
r than updating |
| 1587 // for nodes the mouse moves while the window is not key (which will be
the case if | 1602 // for nodes the mouse moves while the window is not key (which will be
the case if |
| 1588 // onlyUpdateScrollbars is true). | 1603 // onlyUpdateScrollbars is true). |
| 1589 hitType |= HitTestRequest::ReadOnly; | 1604 hitType |= HitTestRequest::ReadOnly; |
| 1590 } | 1605 } |
| 1591 | 1606 |
| 1607 #if ENABLE(TOUCH_EVENTS) |
| 1592 // Treat any mouse move events as readonly if the user is currently touching
the screen. | 1608 // Treat any mouse move events as readonly if the user is currently touching
the screen. |
| 1593 if (m_touchPressed) | 1609 if (m_touchPressed) |
| 1594 hitType |= HitTestRequest::Active | HitTestRequest::ReadOnly; | 1610 hitType |= HitTestRequest::Active | HitTestRequest::ReadOnly; |
| 1611 #endif |
| 1595 HitTestRequest request(hitType); | 1612 HitTestRequest request(hitType); |
| 1596 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent); | 1613 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent); |
| 1597 if (hoveredNode) | 1614 if (hoveredNode) |
| 1598 *hoveredNode = mev.hitTestResult(); | 1615 *hoveredNode = mev.hitTestResult(); |
| 1599 | 1616 |
| 1600 Scrollbar* scrollbar = 0; | 1617 Scrollbar* scrollbar = 0; |
| 1601 | 1618 |
| 1602 if (m_resizeLayer && m_resizeLayer->inResizeMode()) | 1619 if (m_resizeLayer && m_resizeLayer->inResizeMode()) |
| 1603 m_resizeLayer->resize(mouseEvent, m_offsetFromResizeCorner); | 1620 m_resizeLayer->resize(mouseEvent, m_offsetFromResizeCorner); |
| 1604 else { | 1621 else { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1681 Node* adjustedClickNode = clickNode ? clickNode->shadowHost() : 0; | 1698 Node* adjustedClickNode = clickNode ? clickNode->shadowHost() : 0; |
| 1682 return adjustedTargetNode == adjustedClickNode; | 1699 return adjustedTargetNode == adjustedClickNode; |
| 1683 } | 1700 } |
| 1684 | 1701 |
| 1685 bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent) | 1702 bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent) |
| 1686 { | 1703 { |
| 1687 RefPtr<FrameView> protector(m_frame->view()); | 1704 RefPtr<FrameView> protector(m_frame->view()); |
| 1688 | 1705 |
| 1689 m_frame->selection()->setCaretBlinkingSuspended(false); | 1706 m_frame->selection()->setCaretBlinkingSuspended(false); |
| 1690 | 1707 |
| 1708 #if ENABLE(TOUCH_EVENTS) |
| 1691 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent); | 1709 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent); |
| 1692 if (defaultPrevented) | 1710 if (defaultPrevented) |
| 1693 return true; | 1711 return true; |
| 1712 #endif |
| 1694 | 1713 |
| 1695 OwnPtr<UserGestureIndicator> gestureIndicator; | 1714 OwnPtr<UserGestureIndicator> gestureIndicator; |
| 1696 | 1715 |
| 1697 if (m_lastMouseDownUserGestureToken) | 1716 if (m_lastMouseDownUserGestureToken) |
| 1698 gestureIndicator = adoptPtr(new UserGestureIndicator(m_lastMouseDownUser
GestureToken.release())); | 1717 gestureIndicator = adoptPtr(new UserGestureIndicator(m_lastMouseDownUser
GestureToken.release())); |
| 1699 else | 1718 else |
| 1700 gestureIndicator = adoptPtr(new UserGestureIndicator(DefinitelyProcessin
gUserGesture)); | 1719 gestureIndicator = adoptPtr(new UserGestureIndicator(DefinitelyProcessin
gUserGesture)); |
| 1701 | 1720 |
| 1702 #if ENABLE(PAN_SCROLLING) | 1721 #if ENABLE(PAN_SCROLLING) |
| 1703 m_autoscrollController->handleMouseReleaseEvent(mouseEvent); | 1722 m_autoscrollController->handleMouseReleaseEvent(mouseEvent); |
| (...skipping 1910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3614 m_lastScrollbarUnderMouse->mouseExited(); | 3633 m_lastScrollbarUnderMouse->mouseExited(); |
| 3615 | 3634 |
| 3616 // Send mouse entered if we're setting a new scrollbar. | 3635 // Send mouse entered if we're setting a new scrollbar. |
| 3617 if (scrollbar && setLast) | 3636 if (scrollbar && setLast) |
| 3618 scrollbar->mouseEntered(); | 3637 scrollbar->mouseEntered(); |
| 3619 | 3638 |
| 3620 m_lastScrollbarUnderMouse = setLast ? scrollbar : 0; | 3639 m_lastScrollbarUnderMouse = setLast ? scrollbar : 0; |
| 3621 } | 3640 } |
| 3622 } | 3641 } |
| 3623 | 3642 |
| 3643 #if ENABLE(TOUCH_EVENTS) |
| 3644 |
| 3624 static const AtomicString& eventNameForTouchPointState(PlatformTouchPoint::State
state) | 3645 static const AtomicString& eventNameForTouchPointState(PlatformTouchPoint::State
state) |
| 3625 { | 3646 { |
| 3626 switch (state) { | 3647 switch (state) { |
| 3627 case PlatformTouchPoint::TouchReleased: | 3648 case PlatformTouchPoint::TouchReleased: |
| 3628 return eventNames().touchendEvent; | 3649 return eventNames().touchendEvent; |
| 3629 case PlatformTouchPoint::TouchCancelled: | 3650 case PlatformTouchPoint::TouchCancelled: |
| 3630 return eventNames().touchcancelEvent; | 3651 return eventNames().touchcancelEvent; |
| 3631 case PlatformTouchPoint::TouchPressed: | 3652 case PlatformTouchPoint::TouchPressed: |
| 3632 return eventNames().touchstartEvent; | 3653 return eventNames().touchstartEvent; |
| 3633 case PlatformTouchPoint::TouchMoved: | 3654 case PlatformTouchPoint::TouchMoved: |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3880 return false; | 3901 return false; |
| 3881 | 3902 |
| 3882 // The order is important. This check should follow the subframe test: http:
//webkit.org/b/111292. | 3903 // The order is important. This check should follow the subframe test: http:
//webkit.org/b/111292. |
| 3883 if (eventType == PlatformEvent::MouseMoved && !m_touchPressed) | 3904 if (eventType == PlatformEvent::MouseMoved && !m_touchPressed) |
| 3884 return true; | 3905 return true; |
| 3885 | 3906 |
| 3886 SyntheticSingleTouchEvent touchEvent(event); | 3907 SyntheticSingleTouchEvent touchEvent(event); |
| 3887 return handleTouchEvent(touchEvent); | 3908 return handleTouchEvent(touchEvent); |
| 3888 } | 3909 } |
| 3889 | 3910 |
| 3911 #endif |
| 3912 |
| 3890 void EventHandler::setLastKnownMousePosition(const PlatformMouseEvent& event) | 3913 void EventHandler::setLastKnownMousePosition(const PlatformMouseEvent& event) |
| 3891 { | 3914 { |
| 3892 m_mousePositionIsUnknown = false; | 3915 m_mousePositionIsUnknown = false; |
| 3893 m_lastKnownMousePosition = event.position(); | 3916 m_lastKnownMousePosition = event.position(); |
| 3894 m_lastKnownMouseGlobalPosition = event.globalPosition(); | 3917 m_lastKnownMouseGlobalPosition = event.globalPosition(); |
| 3895 } | 3918 } |
| 3896 | 3919 |
| 3897 bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& m
ev, Frame* subframe) | 3920 bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& m
ev, Frame* subframe) |
| 3898 { | 3921 { |
| 3899 // If we're clicking into a frame that is selected, the frame will appear | 3922 // If we're clicking into a frame that is selected, the frame will appear |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3990 unsigned EventHandler::accessKeyModifiers() | 4013 unsigned EventHandler::accessKeyModifiers() |
| 3991 { | 4014 { |
| 3992 #if OS(DARWIN) | 4015 #if OS(DARWIN) |
| 3993 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 4016 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 3994 #else | 4017 #else |
| 3995 return PlatformEvent::AltKey; | 4018 return PlatformEvent::AltKey; |
| 3996 #endif | 4019 #endif |
| 3997 } | 4020 } |
| 3998 | 4021 |
| 3999 } // namespace WebCore | 4022 } // namespace WebCore |
| OLD | NEW |