| 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 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2314 } | 2314 } |
| 2315 else | 2315 else |
| 2316 hitType |= HitTestRequest::Active | HitTestRequest::ReadOnly; | 2316 hitType |= HitTestRequest::Active | HitTestRequest::ReadOnly; |
| 2317 | 2317 |
| 2318 if ((!scrollbar && !eventTarget) || !(hitType & HitTestRequest::ReadOnly)) { | 2318 if ((!scrollbar && !eventTarget) || !(hitType & HitTestRequest::ReadOnly)) { |
| 2319 IntPoint hitTestPoint = m_frame->view()->windowToContents(adjustedPoint)
; | 2319 IntPoint hitTestPoint = m_frame->view()->windowToContents(adjustedPoint)
; |
| 2320 HitTestResult result = hitTestResultAtPoint(hitTestPoint, hitType | HitT
estRequest::AllowFrameScrollbars); | 2320 HitTestResult result = hitTestResultAtPoint(hitTestPoint, hitType | HitT
estRequest::AllowFrameScrollbars); |
| 2321 | 2321 |
| 2322 if (shouldKeepActiveForMinInterval) { | 2322 if (shouldKeepActiveForMinInterval) { |
| 2323 m_lastDeferredTapElement = result.innerElement(); | 2323 m_lastDeferredTapElement = result.innerElement(); |
| 2324 m_activeIntervalTimer.startOneShot(minimumActiveInterval - activeInt
erval); | 2324 m_activeIntervalTimer.startOneShot(minimumActiveInterval - activeInt
erval, FROM_HERE); |
| 2325 } | 2325 } |
| 2326 | 2326 |
| 2327 eventTarget = result.targetNode(); | 2327 eventTarget = result.targetNode(); |
| 2328 if (!scrollbar) { | 2328 if (!scrollbar) { |
| 2329 FrameView* view = m_frame->view(); | 2329 FrameView* view = m_frame->view(); |
| 2330 scrollbar = view ? view->scrollbarAtPoint(gestureEvent.position()) :
0; | 2330 scrollbar = view ? view->scrollbarAtPoint(gestureEvent.position()) :
0; |
| 2331 } | 2331 } |
| 2332 if (!scrollbar) | 2332 if (!scrollbar) |
| 2333 scrollbar = result.scrollbar(); | 2333 scrollbar = result.scrollbar(); |
| 2334 } | 2334 } |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2886 // context menu event. | 2886 // context menu event. |
| 2887 handleMousePressEvent(mouseEvent); | 2887 handleMousePressEvent(mouseEvent); |
| 2888 return sendContextMenuEvent(mouseEvent); | 2888 return sendContextMenuEvent(mouseEvent); |
| 2889 // We do not need to send a corresponding mouse release because in case of | 2889 // We do not need to send a corresponding mouse release because in case of |
| 2890 // right-click, the context menu takes capture and consumes all events. | 2890 // right-click, the context menu takes capture and consumes all events. |
| 2891 } | 2891 } |
| 2892 | 2892 |
| 2893 void EventHandler::scheduleHoverStateUpdate() | 2893 void EventHandler::scheduleHoverStateUpdate() |
| 2894 { | 2894 { |
| 2895 if (!m_hoverTimer.isActive()) | 2895 if (!m_hoverTimer.isActive()) |
| 2896 m_hoverTimer.startOneShot(0); | 2896 m_hoverTimer.startOneShot(0, FROM_HERE); |
| 2897 } | 2897 } |
| 2898 | 2898 |
| 2899 void EventHandler::scheduleCursorUpdate() | 2899 void EventHandler::scheduleCursorUpdate() |
| 2900 { | 2900 { |
| 2901 if (!m_cursorUpdateTimer.isActive()) | 2901 if (!m_cursorUpdateTimer.isActive()) |
| 2902 m_cursorUpdateTimer.startOneShot(cursorUpdateInterval); | 2902 m_cursorUpdateTimer.startOneShot(cursorUpdateInterval, FROM_HERE); |
| 2903 } | 2903 } |
| 2904 | 2904 |
| 2905 void EventHandler::dispatchFakeMouseMoveEventSoon() | 2905 void EventHandler::dispatchFakeMouseMoveEventSoon() |
| 2906 { | 2906 { |
| 2907 if (m_mousePressed) | 2907 if (m_mousePressed) |
| 2908 return; | 2908 return; |
| 2909 | 2909 |
| 2910 if (m_mousePositionIsUnknown) | 2910 if (m_mousePositionIsUnknown) |
| 2911 return; | 2911 return; |
| 2912 | 2912 |
| 2913 Settings* settings = m_frame->settings(); | 2913 Settings* settings = m_frame->settings(); |
| 2914 if (settings && !settings->deviceSupportsMouse()) | 2914 if (settings && !settings->deviceSupportsMouse()) |
| 2915 return; | 2915 return; |
| 2916 | 2916 |
| 2917 // If the content has ever taken longer than fakeMouseMoveShortInterval we | 2917 // If the content has ever taken longer than fakeMouseMoveShortInterval we |
| 2918 // reschedule the timer and use a longer time. This will cause the content | 2918 // reschedule the timer and use a longer time. This will cause the content |
| 2919 // to receive these moves only after the user is done scrolling, reducing | 2919 // to receive these moves only after the user is done scrolling, reducing |
| 2920 // pauses during the scroll. | 2920 // pauses during the scroll. |
| 2921 if (m_maxMouseMovedDuration > fakeMouseMoveShortInterval) { | 2921 if (m_maxMouseMovedDuration > fakeMouseMoveShortInterval) { |
| 2922 if (m_fakeMouseMoveEventTimer.isActive()) | 2922 if (m_fakeMouseMoveEventTimer.isActive()) |
| 2923 m_fakeMouseMoveEventTimer.stop(); | 2923 m_fakeMouseMoveEventTimer.stop(); |
| 2924 m_fakeMouseMoveEventTimer.startOneShot(fakeMouseMoveLongInterval); | 2924 m_fakeMouseMoveEventTimer.startOneShot(fakeMouseMoveLongInterval, FROM_H
ERE); |
| 2925 } else { | 2925 } else { |
| 2926 if (!m_fakeMouseMoveEventTimer.isActive()) | 2926 if (!m_fakeMouseMoveEventTimer.isActive()) |
| 2927 m_fakeMouseMoveEventTimer.startOneShot(fakeMouseMoveShortInterval); | 2927 m_fakeMouseMoveEventTimer.startOneShot(fakeMouseMoveShortInterval, F
ROM_HERE); |
| 2928 } | 2928 } |
| 2929 } | 2929 } |
| 2930 | 2930 |
| 2931 void EventHandler::dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad& quad) | 2931 void EventHandler::dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad& quad) |
| 2932 { | 2932 { |
| 2933 FrameView* view = m_frame->view(); | 2933 FrameView* view = m_frame->view(); |
| 2934 if (!view) | 2934 if (!view) |
| 2935 return; | 2935 return; |
| 2936 | 2936 |
| 2937 if (!quad.containsPoint(view->windowToContents(m_lastKnownMousePosition))) | 2937 if (!quad.containsPoint(view->windowToContents(m_lastKnownMousePosition))) |
| (...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4026 unsigned EventHandler::accessKeyModifiers() | 4026 unsigned EventHandler::accessKeyModifiers() |
| 4027 { | 4027 { |
| 4028 #if OS(MACOSX) | 4028 #if OS(MACOSX) |
| 4029 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 4029 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 4030 #else | 4030 #else |
| 4031 return PlatformEvent::AltKey; | 4031 return PlatformEvent::AltKey; |
| 4032 #endif | 4032 #endif |
| 4033 } | 4033 } |
| 4034 | 4034 |
| 4035 } // namespace WebCore | 4035 } // namespace WebCore |
| OLD | NEW |