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 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2396 bool EventHandler::handleGestureLongPress(const PlatformGestureEvent& gestureEve
nt) | 2396 bool EventHandler::handleGestureLongPress(const PlatformGestureEvent& gestureEve
nt) |
2397 { | 2397 { |
2398 IntPoint adjustedPoint = gestureEvent.position(); | 2398 IntPoint adjustedPoint = gestureEvent.position(); |
2399 adjustGesturePosition(gestureEvent, adjustedPoint); | 2399 adjustGesturePosition(gestureEvent, adjustedPoint); |
2400 RefPtr<Frame> subframe = getSubFrameForGestureEvent(adjustedPoint, gestureEv
ent); | 2400 RefPtr<Frame> subframe = getSubFrameForGestureEvent(adjustedPoint, gestureEv
ent); |
2401 if (subframe && subframe->eventHandler()->handleGestureLongPress(gestureEven
t)) | 2401 if (subframe && subframe->eventHandler()->handleGestureLongPress(gestureEven
t)) |
2402 return true; | 2402 return true; |
2403 | 2403 |
2404 m_longTapShouldInvokeContextMenu = false; | 2404 m_longTapShouldInvokeContextMenu = false; |
2405 if (m_frame->settings() && m_frame->settings()->touchDragDropEnabled() && m_
frame->view()) { | 2405 if (m_frame->settings() && m_frame->settings()->touchDragDropEnabled() && m_
frame->view()) { |
| 2406 PlatformMouseEvent mouseDownEvent(adjustedPoint, gestureEvent.globalPosi
tion(), LeftButton, PlatformEvent::MousePressed, 1, |
| 2407 gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey
(), gestureEvent.metaKey(), WTF::currentTime()); |
| 2408 m_mouseDown = mouseDownEvent; |
| 2409 |
2406 PlatformMouseEvent mouseDragEvent(adjustedPoint, gestureEvent.globalPosi
tion(), LeftButton, PlatformEvent::MouseMoved, 1, | 2410 PlatformMouseEvent mouseDragEvent(adjustedPoint, gestureEvent.globalPosi
tion(), LeftButton, PlatformEvent::MouseMoved, 1, |
2407 gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey
(), gestureEvent.metaKey(), WTF::currentTime()); | 2411 gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey
(), gestureEvent.metaKey(), WTF::currentTime()); |
2408 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Disall
owShadowContent); | 2412 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Disall
owShadowContent); |
2409 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseDragE
vent); | 2413 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseDragE
vent); |
2410 m_didStartDrag = false; | 2414 m_didStartDrag = false; |
2411 m_mouseDownMayStartDrag = true; | 2415 m_mouseDownMayStartDrag = true; |
2412 dragState().m_dragSrc = 0; | 2416 dragState().m_dragSrc = 0; |
2413 m_mouseDownPos = m_frame->view()->windowToContents(mouseDragEvent.positi
on()); | 2417 m_mouseDownPos = m_frame->view()->windowToContents(mouseDragEvent.positi
on()); |
2414 handleDrag(mev, DontCheckDragHysteresis); | 2418 handleDrag(mev, DontCheckDragHysteresis); |
2415 if (m_didStartDrag) { | 2419 if (m_didStartDrag) { |
(...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3920 unsigned EventHandler::accessKeyModifiers() | 3924 unsigned EventHandler::accessKeyModifiers() |
3921 { | 3925 { |
3922 #if OS(DARWIN) | 3926 #if OS(DARWIN) |
3923 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3927 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3924 #else | 3928 #else |
3925 return PlatformEvent::AltKey; | 3929 return PlatformEvent::AltKey; |
3926 #endif | 3930 #endif |
3927 } | 3931 } |
3928 | 3932 |
3929 } // namespace WebCore | 3933 } // namespace WebCore |
OLD | NEW |