Changeset 63807 in webkit
- Timestamp:
- Jul 21, 2010 2:19:02 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r63805 r63807 1 2010-07-20 Ben Murdoch <benm@google.com> 2 3 Reviewed by Steve Block. 4 5 Touch events do not affect the :active CSS state 6 https://bugs.webkit.org/show_bug.cgi?id=39493 7 8 * fast/events/touch/touch-active-state-expected.txt: Added. 9 * fast/events/touch/touch-active-state.html: Added. 10 1 11 2010-07-20 Yury Semikhatsky <yurys@chromium.org> 2 12 -
trunk/WebCore/ChangeLog
r63805 r63807 1 2010-07-20 Ben Murdoch <benm@google.com> 2 3 Reviewed by Steve Block. 4 5 Touch events do not affect the :active CSS state 6 https://bugs.webkit.org/show_bug.cgi?id=39493 7 8 Test: fast/events/touch/touch-active-state.html 9 10 * WebCore.exp.in: Update exports for new signature of 11 hitTestResultAtPoint. 12 * WebCore.order: ditto. 13 * page/EventHandler.cpp: 14 (WebCore::EventHandler::EventHandler): 15 (WebCore::EventHandler::hitTestResultAtPoint): Pass the type 16 of the hit test to perform as a parameter with a default 17 value rather than harcoding it in the function body. 18 (WebCore::EventHandler::handleMouseMoveEvent): Do not modiify 19 the active element during a mouse move if the user is 20 touching the screen. 21 (WebCore::EventHandler::handleTouchEvent): Set the correct 22 type of hit test to perform depending on the type of the 23 touch event we are handling. 24 * page/EventHandler.h: Update the signature of hitTestResultAtPoint. 25 1 26 2010-07-20 Yury Semikhatsky <yurys@chromium.org> 2 27 -
trunk/WebCore/WebCore.exp.in
r63794 r63807 217 217 __ZN7WebCore12EventHandler16handleWheelEventERNS_18PlatformWheelEventE 218 218 __ZN7WebCore12EventHandler20handleTextInputEventERKNS_6StringEPNS_5EventEbb 219 __ZN7WebCore12EventHandler20hitTestResultAtPointERKNS_8IntPointEbbNS_17HitTestScrollbarsE 219 __ZN7WebCore12EventHandler20hitTestResultAtPointERKNS_8IntPointEbbNS_17HitTestScrollbarsEi 220 220 __ZN7WebCore12EventHandler21handleMousePressEventERKNS_18PlatformMouseEventE 221 221 __ZN7WebCore12EventHandler23handleMouseReleaseEventERKNS_18PlatformMouseEventE -
trunk/WebCore/WebCore.order
r59514 r63807 3000 3000 __ZNK7WebCore14RenderThemeMac20supportsControlTintsEv 3001 3001 __ZN7WebCore15GraphicsContext23setUpdatingControlTintsEb 3002 __ZN7WebCore12EventHandler20hitTestResultAtPointERKNS_8IntPointEbbNS_17HitTestScrollbarsE 3002 __ZN7WebCore12EventHandler20hitTestResultAtPointERKNS_8IntPointEbbNS_17HitTestScrollbarsEi 3003 3003 __ZNK7WebCore13HitTestResult10isSelectedEv 3004 3004 __ZN7WebCore19SelectionController8containsERKNS_8IntPointE -
trunk/WebCore/page/EventHandler.cpp
r63731 r63807 191 191 , m_activationEventNumber(0) 192 192 #endif 193 #if ENABLE(TOUCH_EVENTS) 194 , m_touchPressed(false) 195 #endif 193 196 { 194 197 } … … 860 863 #endif // ENABLE(DRAG_SUPPORT) 861 864 862 HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent, bool ignoreClipping, HitTestScrollbars testScrollbars )865 HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent, bool ignoreClipping, HitTestScrollbars testScrollbars, int hitType) 863 866 { 864 867 HitTestResult result(point); 865 868 if (!m_frame->contentRenderer()) 866 869 return result; 867 int hitType = HitTestRequest::ReadOnly | HitTestRequest::Active;868 870 if (ignoreClipping) 869 871 hitType |= HitTestRequest::IgnoreClipping; … … 1442 1444 if (m_mousePressed) 1443 1445 hitType |= HitTestRequest::Active; 1446 1447 #if ENABLE(TOUCH_EVENTS) 1448 // Treat any mouse move events as readonly if the user is currently touching the screen. 1449 if (m_touchPressed) 1450 hitType |= HitTestRequest::Active | HitTestRequest::ReadOnly; 1451 #endif 1444 1452 HitTestRequest request(hitType); 1445 1453 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent); … … 2839 2847 const PlatformTouchPoint& point = points[i]; 2840 2848 IntPoint pagePoint = documentPointForWindowPoint(m_frame, point.pos()); 2841 HitTestResult result = hitTestResultAtPoint(pagePoint, /*allowShadowContent*/ false); 2849 2850 int hitType = HitTestRequest::Active | HitTestRequest::ReadOnly; 2851 // The HitTestRequest types used for mouse events map quite adequately 2852 // to touch events. Note that in addition to meaning that the hit test 2853 // should affect the active state of the current node if necessary, 2854 // HitTestRequest::Active signifies that the hit test is taking place 2855 // with the mouse (or finger in this case) being pressed. 2856 switch (point.state()) { 2857 case PlatformTouchPoint::TouchPressed: 2858 hitType = HitTestRequest::Active; 2859 break; 2860 case PlatformTouchPoint::TouchMoved: 2861 hitType = HitTestRequest::Active | HitTestRequest::MouseMove | HitTestRequest::ReadOnly; 2862 break; 2863 case PlatformTouchPoint::TouchReleased: 2864 case PlatformTouchPoint::TouchCancelled: 2865 hitType = HitTestRequest::MouseUp; 2866 break; 2867 default: 2868 break; 2869 } 2870 2871 HitTestResult result = hitTestResultAtPoint(pagePoint, /*allowShadowContent*/ false, false, DontHitTestScrollbars, hitType); 2842 2872 Node* target = result.innerNode(); 2843 2873 … … 2902 2932 } 2903 2933 2934 m_touchPressed = touches->length() > 0; 2935 2904 2936 bool defaultPrevented = false; 2905 2937 Touch* changedTouch = 0; -
trunk/WebCore/page/EventHandler.h
r62447 r63807 29 29 #include "DragActions.h" 30 30 #include "FocusDirection.h" 31 #include "HitTestRequest.h" 31 32 #include "PlatformMouseEvent.h" 32 33 #include "ScrollTypes.h" … … 106 107 void dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad&); 107 108 108 HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent, bool ignoreClipping = false, HitTestScrollbars scrollbars = DontHitTestScrollbars );109 HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent, bool ignoreClipping = false, HitTestScrollbars scrollbars = DontHitTestScrollbars, int hitType = HitTestRequest::ReadOnly | HitTestRequest::Active); 109 110 110 111 bool mousePressed() const { return m_mousePressed; } … … 432 433 typedef HashMap<int, RefPtr<EventTarget> > TouchTargetMap; 433 434 TouchTargetMap m_originatingTouchPointTargets; 435 bool m_touchPressed; 434 436 #endif 435 437 };
Note: See TracChangeset
for help on using the changeset viewer.