Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: Source/WebCore/page/EventHandler.cpp

Issue 14296003: Remove TOUCH_EVENTS and TOUCH_EVENT_TRACKING compile-time flags. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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"
73 #include "PlatformWheelEvent.h" 74 #include "PlatformWheelEvent.h"
74 #include "PluginDocument.h" 75 #include "PluginDocument.h"
75 #include "RenderFrameSet.h" 76 #include "RenderFrameSet.h"
76 #include "RenderLayer.h" 77 #include "RenderLayer.h"
77 #include "RenderTextControlSingleLine.h" 78 #include "RenderTextControlSingleLine.h"
78 #include "RenderView.h" 79 #include "RenderView.h"
79 #include "RenderWidget.h" 80 #include "RenderWidget.h"
80 #include "ScrollAnimator.h" 81 #include "ScrollAnimator.h"
81 #include "Scrollbar.h" 82 #include "Scrollbar.h"
82 #include "Settings.h" 83 #include "Settings.h"
83 #include "ShadowRoot.h" 84 #include "ShadowRoot.h"
84 #include "SpatialNavigation.h" 85 #include "SpatialNavigation.h"
85 #include "StaticHashSetNodeList.h" 86 #include "StaticHashSetNodeList.h"
86 #include "StyleCachedImage.h" 87 #include "StyleCachedImage.h"
87 #include "TextEvent.h" 88 #include "TextEvent.h"
88 #include "TextIterator.h" 89 #include "TextIterator.h"
90 #include "TouchEvent.h"
91 #include "TouchList.h"
89 #include "UserTypingGestureIndicator.h" 92 #include "UserTypingGestureIndicator.h"
90 #include "WheelEvent.h" 93 #include "WheelEvent.h"
91 #include "WindowsKeyboardCodes.h" 94 #include "WindowsKeyboardCodes.h"
92 #include "htmlediting.h" 95 #include "htmlediting.h"
93 #include <wtf/Assertions.h> 96 #include <wtf/Assertions.h>
94 #include <wtf/CurrentTime.h> 97 #include <wtf/CurrentTime.h>
95 #include <wtf/StdLibExtras.h> 98 #include <wtf/StdLibExtras.h>
96 #include <wtf/TemporaryChange.h> 99 #include <wtf/TemporaryChange.h>
97 100
98 #if ENABLE(TOUCH_ADJUSTMENT) 101 #if ENABLE(TOUCH_ADJUSTMENT)
99 #include "TouchAdjustment.h" 102 #include "TouchAdjustment.h"
100 #endif 103 #endif
101 104
102 #if ENABLE(SVG) 105 #if ENABLE(SVG)
103 #include "SVGDocument.h" 106 #include "SVGDocument.h"
104 #include "SVGElementInstance.h" 107 #include "SVGElementInstance.h"
105 #include "SVGNames.h" 108 #include "SVGNames.h"
106 #include "SVGUseElement.h" 109 #include "SVGUseElement.h"
107 #endif 110 #endif
108 111
109 #if ENABLE(TOUCH_EVENTS)
110 #include "PlatformTouchEvent.h"
111 #include "TouchEvent.h"
112 #include "TouchList.h"
113 #endif
114
115 #if ENABLE(CSS_IMAGE_SET) 112 #if ENABLE(CSS_IMAGE_SET)
116 #include "StyleCachedImageSet.h" 113 #include "StyleCachedImageSet.h"
117 #endif 114 #endif
118 115
119 namespace WebCore { 116 namespace WebCore {
120 117
121 using namespace HTMLNames; 118 using namespace HTMLNames;
122 119
123 // The link drag hysteresis is much larger than the others because there 120 // The link drag hysteresis is much larger than the others because there
124 // needs to be enough space to cancel the link press without starting a link dra g, 121 // needs to be enough space to cancel the link press without starting a link dra g,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 ~MaximumDurationTracker() 180 ~MaximumDurationTracker()
184 { 181 {
185 *m_maxDuration = max(*m_maxDuration, monotonicallyIncreasingTime() - m_s tart); 182 *m_maxDuration = max(*m_maxDuration, monotonicallyIncreasingTime() - m_s tart);
186 } 183 }
187 184
188 private: 185 private:
189 double* m_maxDuration; 186 double* m_maxDuration;
190 double m_start; 187 double m_start;
191 }; 188 };
192 189
193 #if ENABLE(TOUCH_EVENTS)
194 class SyntheticTouchPoint : public PlatformTouchPoint { 190 class SyntheticTouchPoint : public PlatformTouchPoint {
195 public: 191 public:
196 192
197 // The default values are based on http://dvcs.w3.org/hg/webevents/raw-file/ tip/touchevents.html 193 // The default values are based on http://dvcs.w3.org/hg/webevents/raw-file/ tip/touchevents.html
198 explicit SyntheticTouchPoint(const PlatformMouseEvent& event) 194 explicit SyntheticTouchPoint(const PlatformMouseEvent& event)
199 { 195 {
200 const static int idDefaultValue = 0; 196 const static int idDefaultValue = 0;
201 const static int radiusYDefaultValue = 1; 197 const static int radiusYDefaultValue = 1;
202 const static int radiusXDefaultValue = 1; 198 const static int radiusXDefaultValue = 1;
203 const static float rotationAngleDefaultValue = 0.0f; 199 const static float rotationAngleDefaultValue = 0.0f;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 default: 244 default:
249 ASSERT_NOT_REACHED(); 245 ASSERT_NOT_REACHED();
250 m_type = NoType; 246 m_type = NoType;
251 break; 247 break;
252 } 248 }
253 m_timestamp = event.timestamp(); 249 m_timestamp = event.timestamp();
254 m_modifiers = event.modifiers(); 250 m_modifiers = event.modifiers();
255 m_touchPoints.append(SyntheticTouchPoint(event)); 251 m_touchPoints.append(SyntheticTouchPoint(event));
256 } 252 }
257 }; 253 };
258 #endif
259 254
260 static inline ScrollGranularity wheelGranularityToScrollGranularity(unsigned del taMode) 255 static inline ScrollGranularity wheelGranularityToScrollGranularity(unsigned del taMode)
261 { 256 {
262 switch (deltaMode) { 257 switch (deltaMode) {
263 case WheelEvent::DOM_DELTA_PAGE: 258 case WheelEvent::DOM_DELTA_PAGE:
264 return ScrollByPage; 259 return ScrollByPage;
265 case WheelEvent::DOM_DELTA_LINE: 260 case WheelEvent::DOM_DELTA_LINE:
266 return ScrollByLine; 261 return ScrollByLine;
267 case WheelEvent::DOM_DELTA_PIXEL: 262 case WheelEvent::DOM_DELTA_PIXEL:
268 return ScrollByPixel; 263 return ScrollByPixel;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 , m_fakeMouseMoveEventTimer(this, &EventHandler::fakeMouseMoveEventTimerFire d) 301 , m_fakeMouseMoveEventTimer(this, &EventHandler::fakeMouseMoveEventTimerFire d)
307 #if ENABLE(SVG) 302 #if ENABLE(SVG)
308 , m_svgPan(false) 303 , m_svgPan(false)
309 #endif 304 #endif
310 , m_resizeLayer(0) 305 , m_resizeLayer(0)
311 , m_eventHandlerWillResetCapturingMouseEventsNode(0) 306 , m_eventHandlerWillResetCapturingMouseEventsNode(0)
312 , m_clickCount(0) 307 , m_clickCount(0)
313 , m_mousePositionIsUnknown(true) 308 , m_mousePositionIsUnknown(true)
314 , m_mouseDownTimestamp(0) 309 , m_mouseDownTimestamp(0)
315 , m_widgetIsLatched(false) 310 , m_widgetIsLatched(false)
316 #if ENABLE(TOUCH_EVENTS)
317 , m_originatingTouchPointTargetKey(0) 311 , m_originatingTouchPointTargetKey(0)
318 , m_touchPressed(false) 312 , m_touchPressed(false)
319 #endif
320 , m_scrollGestureHandlingNode(0) 313 , m_scrollGestureHandlingNode(0)
321 , m_lastHitTestResultOverWidget(false) 314 , m_lastHitTestResultOverWidget(false)
322 , m_maxMouseMovedDuration(0) 315 , m_maxMouseMovedDuration(0)
323 , m_baseEventType(PlatformEvent::NoType) 316 , m_baseEventType(PlatformEvent::NoType)
324 , m_didStartDrag(false) 317 , m_didStartDrag(false)
325 , m_didLongPressInvokeContextMenu(false) 318 , m_didLongPressInvokeContextMenu(false)
326 #if ENABLE(CURSOR_VISIBILITY) 319 #if ENABLE(CURSOR_VISIBILITY)
327 , m_autoHideCursorTimer(this, &EventHandler::autoHideCursorTimerFired) 320 , m_autoHideCursorTimer(this, &EventHandler::autoHideCursorTimerFired)
328 #endif 321 #endif
329 { 322 {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 m_mousePositionIsUnknown = true; 360 m_mousePositionIsUnknown = true;
368 m_lastKnownMousePosition = IntPoint(); 361 m_lastKnownMousePosition = IntPoint();
369 m_lastKnownMouseGlobalPosition = IntPoint(); 362 m_lastKnownMouseGlobalPosition = IntPoint();
370 m_lastMouseDownUserGestureToken.clear(); 363 m_lastMouseDownUserGestureToken.clear();
371 m_mousePressNode = 0; 364 m_mousePressNode = 0;
372 m_mousePressed = false; 365 m_mousePressed = false;
373 m_capturesDragging = false; 366 m_capturesDragging = false;
374 m_capturingMouseEventsNode = 0; 367 m_capturingMouseEventsNode = 0;
375 m_latchedWheelEventNode = 0; 368 m_latchedWheelEventNode = 0;
376 m_previousWheelScrolledNode = 0; 369 m_previousWheelScrolledNode = 0;
377 #if ENABLE(TOUCH_EVENTS)
378 m_originatingTouchPointTargets.clear(); 370 m_originatingTouchPointTargets.clear();
379 m_originatingTouchPointDocument.clear(); 371 m_originatingTouchPointDocument.clear();
380 m_originatingTouchPointTargetKey = 0; 372 m_originatingTouchPointTargetKey = 0;
381 #endif
382 m_scrollGestureHandlingNode = 0; 373 m_scrollGestureHandlingNode = 0;
383 m_lastHitTestResultOverWidget = false; 374 m_lastHitTestResultOverWidget = false;
384 m_previousGestureScrolledNode = 0; 375 m_previousGestureScrolledNode = 0;
385 m_scrollbarHandlingScrollGesture = 0; 376 m_scrollbarHandlingScrollGesture = 0;
386 m_maxMouseMovedDuration = 0; 377 m_maxMouseMovedDuration = 0;
387 m_baseEventType = PlatformEvent::NoType; 378 m_baseEventType = PlatformEvent::NoType;
388 m_didStartDrag = false; 379 m_didStartDrag = false;
389 m_didLongPressInvokeContextMenu = false; 380 m_didLongPressInvokeContextMenu = false;
390 } 381 }
391 382
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 1361
1371 bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent) 1362 bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
1372 { 1363 {
1373 RefPtr<FrameView> protector(m_frame->view()); 1364 RefPtr<FrameView> protector(m_frame->view());
1374 1365
1375 if (InspectorInstrumentation::handleMousePress(m_frame->page())) { 1366 if (InspectorInstrumentation::handleMousePress(m_frame->page())) {
1376 invalidateClick(); 1367 invalidateClick();
1377 return true; 1368 return true;
1378 } 1369 }
1379 1370
1380 #if ENABLE(TOUCH_EVENTS)
1381 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent); 1371 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent);
1382 if (defaultPrevented) 1372 if (defaultPrevented)
1383 return true; 1373 return true;
1384 #endif
1385 1374
1386 UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture); 1375 UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
1387 m_lastMouseDownUserGestureToken = gestureIndicator.currentToken(); 1376 m_lastMouseDownUserGestureToken = gestureIndicator.currentToken();
1388 1377
1389 // FIXME (bug 68185): this call should be made at another abstraction layer 1378 // FIXME (bug 68185): this call should be made at another abstraction layer
1390 m_frame->loader()->resetMultipleFormSubmissionProtection(); 1379 m_frame->loader()->resetMultipleFormSubmissionProtection();
1391 1380
1392 cancelFakeMouseMoveEvent(); 1381 cancelFakeMouseMoveEvent();
1393 m_mousePressed = true; 1382 m_mousePressed = true;
1394 m_capturesDragging = true; 1383 m_capturesDragging = true;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& mouseEvent, Hi tTestResult* hoveredNode, bool onlyUpdateScrollbars) 1550 bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& mouseEvent, Hi tTestResult* hoveredNode, bool onlyUpdateScrollbars)
1562 { 1551 {
1563 // in Radar 3703768 we saw frequent crashes apparently due to the 1552 // in Radar 3703768 we saw frequent crashes apparently due to the
1564 // part being null here, which seems impossible, so check for nil 1553 // part being null here, which seems impossible, so check for nil
1565 // but also assert so that we can try to figure this out in debug 1554 // but also assert so that we can try to figure this out in debug
1566 // builds, if it happens. 1555 // builds, if it happens.
1567 ASSERT(m_frame); 1556 ASSERT(m_frame);
1568 if (!m_frame) 1557 if (!m_frame)
1569 return false; 1558 return false;
1570 1559
1571 #if ENABLE(TOUCH_EVENTS)
1572 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent); 1560 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent);
1573 if (defaultPrevented) 1561 if (defaultPrevented)
1574 return true; 1562 return true;
1575 #endif
1576 1563
1577 RefPtr<FrameView> protector(m_frame->view()); 1564 RefPtr<FrameView> protector(m_frame->view());
1578 1565
1579 setLastKnownMousePosition(mouseEvent); 1566 setLastKnownMousePosition(mouseEvent);
1580 1567
1581 if (m_hoverTimer.isActive()) 1568 if (m_hoverTimer.isActive())
1582 m_hoverTimer.stop(); 1569 m_hoverTimer.stop();
1583 1570
1584 cancelFakeMouseMoveEvent(); 1571 cancelFakeMouseMoveEvent();
1585 1572
(...skipping 15 matching lines...) Expand all
1601 if (m_mousePressed) 1588 if (m_mousePressed)
1602 hitType |= HitTestRequest::Active; 1589 hitType |= HitTestRequest::Active;
1603 else if (onlyUpdateScrollbars) { 1590 else if (onlyUpdateScrollbars) {
1604 // Mouse events should be treated as "read-only" if we're updating only scrollbars. This 1591 // Mouse events should be treated as "read-only" if we're updating only scrollbars. This
1605 // means that :hover and :active freeze in the state they were in, rathe r than updating 1592 // means that :hover and :active freeze in the state they were in, rathe r than updating
1606 // for nodes the mouse moves while the window is not key (which will be the case if 1593 // for nodes the mouse moves while the window is not key (which will be the case if
1607 // onlyUpdateScrollbars is true). 1594 // onlyUpdateScrollbars is true).
1608 hitType |= HitTestRequest::ReadOnly; 1595 hitType |= HitTestRequest::ReadOnly;
1609 } 1596 }
1610 1597
1611 #if ENABLE(TOUCH_EVENTS)
1612 // Treat any mouse move events as readonly if the user is currently touching the screen. 1598 // Treat any mouse move events as readonly if the user is currently touching the screen.
1613 if (m_touchPressed) 1599 if (m_touchPressed)
1614 hitType |= HitTestRequest::Active | HitTestRequest::ReadOnly; 1600 hitType |= HitTestRequest::Active | HitTestRequest::ReadOnly;
1615 #endif
1616 HitTestRequest request(hitType); 1601 HitTestRequest request(hitType);
1617 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent); 1602 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent);
1618 if (hoveredNode) 1603 if (hoveredNode)
1619 *hoveredNode = mev.hitTestResult(); 1604 *hoveredNode = mev.hitTestResult();
1620 1605
1621 Scrollbar* scrollbar = 0; 1606 Scrollbar* scrollbar = 0;
1622 1607
1623 if (m_resizeLayer && m_resizeLayer->inResizeMode()) 1608 if (m_resizeLayer && m_resizeLayer->inResizeMode())
1624 m_resizeLayer->resize(mouseEvent, m_offsetFromResizeCorner); 1609 m_resizeLayer->resize(mouseEvent, m_offsetFromResizeCorner);
1625 else { 1610 else {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 Node* adjustedClickNode = clickNode ? clickNode->shadowHost() : 0; 1687 Node* adjustedClickNode = clickNode ? clickNode->shadowHost() : 0;
1703 return adjustedTargetNode == adjustedClickNode; 1688 return adjustedTargetNode == adjustedClickNode;
1704 } 1689 }
1705 1690
1706 bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent) 1691 bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent)
1707 { 1692 {
1708 RefPtr<FrameView> protector(m_frame->view()); 1693 RefPtr<FrameView> protector(m_frame->view());
1709 1694
1710 m_frame->selection()->setCaretBlinkingSuspended(false); 1695 m_frame->selection()->setCaretBlinkingSuspended(false);
1711 1696
1712 #if ENABLE(TOUCH_EVENTS)
1713 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent); 1697 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent);
1714 if (defaultPrevented) 1698 if (defaultPrevented)
1715 return true; 1699 return true;
1716 #endif
1717 1700
1718 OwnPtr<UserGestureIndicator> gestureIndicator; 1701 OwnPtr<UserGestureIndicator> gestureIndicator;
1719 1702
1720 if (m_lastMouseDownUserGestureToken) 1703 if (m_lastMouseDownUserGestureToken)
1721 gestureIndicator = adoptPtr(new UserGestureIndicator(m_lastMouseDownUser GestureToken.release())); 1704 gestureIndicator = adoptPtr(new UserGestureIndicator(m_lastMouseDownUser GestureToken.release()));
1722 else 1705 else
1723 gestureIndicator = adoptPtr(new UserGestureIndicator(DefinitelyProcessin gUserGesture)); 1706 gestureIndicator = adoptPtr(new UserGestureIndicator(DefinitelyProcessin gUserGesture));
1724 1707
1725 #if ENABLE(PAN_SCROLLING) 1708 #if ENABLE(PAN_SCROLLING)
1726 m_autoscrollController->handleMouseReleaseEvent(mouseEvent); 1709 m_autoscrollController->handleMouseReleaseEvent(mouseEvent);
(...skipping 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after
3620 m_lastScrollbarUnderMouse->mouseExited(); 3603 m_lastScrollbarUnderMouse->mouseExited();
3621 3604
3622 // Send mouse entered if we're setting a new scrollbar. 3605 // Send mouse entered if we're setting a new scrollbar.
3623 if (scrollbar && setLast) 3606 if (scrollbar && setLast)
3624 scrollbar->mouseEntered(); 3607 scrollbar->mouseEntered();
3625 3608
3626 m_lastScrollbarUnderMouse = setLast ? scrollbar : 0; 3609 m_lastScrollbarUnderMouse = setLast ? scrollbar : 0;
3627 } 3610 }
3628 } 3611 }
3629 3612
3630 #if ENABLE(TOUCH_EVENTS)
3631
3632 static const AtomicString& eventNameForTouchPointState(PlatformTouchPoint::State state) 3613 static const AtomicString& eventNameForTouchPointState(PlatformTouchPoint::State state)
3633 { 3614 {
3634 switch (state) { 3615 switch (state) {
3635 case PlatformTouchPoint::TouchReleased: 3616 case PlatformTouchPoint::TouchReleased:
3636 return eventNames().touchendEvent; 3617 return eventNames().touchendEvent;
3637 case PlatformTouchPoint::TouchCancelled: 3618 case PlatformTouchPoint::TouchCancelled:
3638 return eventNames().touchcancelEvent; 3619 return eventNames().touchcancelEvent;
3639 case PlatformTouchPoint::TouchPressed: 3620 case PlatformTouchPoint::TouchPressed:
3640 return eventNames().touchstartEvent; 3621 return eventNames().touchstartEvent;
3641 case PlatformTouchPoint::TouchMoved: 3622 case PlatformTouchPoint::TouchMoved:
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
3888 return false; 3869 return false;
3889 3870
3890 // The order is important. This check should follow the subframe test: http: //webkit.org/b/111292. 3871 // The order is important. This check should follow the subframe test: http: //webkit.org/b/111292.
3891 if (eventType == PlatformEvent::MouseMoved && !m_touchPressed) 3872 if (eventType == PlatformEvent::MouseMoved && !m_touchPressed)
3892 return true; 3873 return true;
3893 3874
3894 SyntheticSingleTouchEvent touchEvent(event); 3875 SyntheticSingleTouchEvent touchEvent(event);
3895 return handleTouchEvent(touchEvent); 3876 return handleTouchEvent(touchEvent);
3896 } 3877 }
3897 3878
3898 #endif
3899
3900 void EventHandler::setLastKnownMousePosition(const PlatformMouseEvent& event) 3879 void EventHandler::setLastKnownMousePosition(const PlatformMouseEvent& event)
3901 { 3880 {
3902 m_mousePositionIsUnknown = false; 3881 m_mousePositionIsUnknown = false;
3903 m_lastKnownMousePosition = event.position(); 3882 m_lastKnownMousePosition = event.position();
3904 m_lastKnownMouseGlobalPosition = event.globalPosition(); 3883 m_lastKnownMouseGlobalPosition = event.globalPosition();
3905 } 3884 }
3906 3885
3907 bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& m ev, Frame* subframe) 3886 bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& m ev, Frame* subframe)
3908 { 3887 {
3909 // If we're clicking into a frame that is selected, the frame will appear 3888 // 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
4000 unsigned EventHandler::accessKeyModifiers() 3979 unsigned EventHandler::accessKeyModifiers()
4001 { 3980 {
4002 #if OS(DARWIN) 3981 #if OS(DARWIN)
4003 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3982 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
4004 #else 3983 #else
4005 return PlatformEvent::AltKey; 3984 return PlatformEvent::AltKey;
4006 #endif 3985 #endif
4007 } 3986 }
4008 3987
4009 } // namespace WebCore 3988 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698