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 2234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2245 m_clickNode = currentHitTest.innerNode(); | 2245 m_clickNode = currentHitTest.innerNode(); |
2246 if (m_clickNode && m_clickNode->isTextNode()) | 2246 if (m_clickNode && m_clickNode->isTextNode()) |
2247 m_clickNode = NodeRenderingTraversal::parent(m_clickNode.get()); | 2247 m_clickNode = NodeRenderingTraversal::parent(m_clickNode.get()); |
2248 | 2248 |
2249 PlatformMouseEvent fakeMouseDown(gestureEvent.position(), gestureEvent.globa
lPosition(), | 2249 PlatformMouseEvent fakeMouseDown(gestureEvent.position(), gestureEvent.globa
lPosition(), |
2250 LeftButton, PlatformEvent::MousePressed, gestureEvent.tapCount(), | 2250 LeftButton, PlatformEvent::MousePressed, gestureEvent.tapCount(), |
2251 modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp()); | 2251 modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp()); |
2252 bool swallowMouseDownEvent = !dispatchMouseEvent(EventTypeNames::mousedown,
currentHitTest.innerNode(), gestureEvent.tapCount(), fakeMouseDown, true); | 2252 bool swallowMouseDownEvent = !dispatchMouseEvent(EventTypeNames::mousedown,
currentHitTest.innerNode(), gestureEvent.tapCount(), fakeMouseDown, true); |
2253 if (!swallowMouseDownEvent) | 2253 if (!swallowMouseDownEvent) |
2254 swallowMouseDownEvent = handleMouseFocus(MouseEventWithHitTestResults(fa
keMouseDown, currentHitTest)); | 2254 swallowMouseDownEvent = handleMouseFocus(MouseEventWithHitTestResults(fa
keMouseDown, currentHitTest)); |
2255 if (!swallowMouseDownEvent) | 2255 if (!swallowMouseDownEvent) { |
2256 swallowMouseDownEvent = handleMousePressEvent(MouseEventWithHitTestResul
ts(fakeMouseDown, currentHitTest)); | 2256 swallowMouseDownEvent = handleMousePressEvent(MouseEventWithHitTestResul
ts(fakeMouseDown, currentHitTest)); |
| 2257 // m_selectionInitiationState is initialized after dispatching mousedown
event. |
| 2258 m_selectionInitiationState = HaveNotStartedSelection; |
| 2259 } |
2257 | 2260 |
2258 // FIXME: Use a hit-test cache to avoid unnecessary hit tests. http://crbug.
com/398920 | 2261 // FIXME: Use a hit-test cache to avoid unnecessary hit tests. http://crbug.
com/398920 |
2259 if (currentHitTest.innerNode()) | 2262 if (currentHitTest.innerNode()) |
2260 currentHitTest = hitTestResultInFrame(m_frame, adjustedPoint, hitType); | 2263 currentHitTest = hitTestResultInFrame(m_frame, adjustedPoint, hitType); |
2261 PlatformMouseEvent fakeMouseUp(gestureEvent.position(), gestureEvent.globalP
osition(), | 2264 PlatformMouseEvent fakeMouseUp(gestureEvent.position(), gestureEvent.globalP
osition(), |
2262 LeftButton, PlatformEvent::MouseReleased, gestureEvent.tapCount(), | 2265 LeftButton, PlatformEvent::MouseReleased, gestureEvent.tapCount(), |
2263 modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp()); | 2266 modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp()); |
2264 bool swallowMouseUpEvent = !dispatchMouseEvent(EventTypeNames::mouseup, curr
entHitTest.innerNode(), gestureEvent.tapCount(), fakeMouseUp, false); | 2267 bool swallowMouseUpEvent = !dispatchMouseEvent(EventTypeNames::mouseup, curr
entHitTest.innerNode(), gestureEvent.tapCount(), fakeMouseUp, false); |
2265 | 2268 |
2266 bool swallowClickEvent = false; | 2269 bool swallowClickEvent = false; |
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3885 unsigned EventHandler::accessKeyModifiers() | 3888 unsigned EventHandler::accessKeyModifiers() |
3886 { | 3889 { |
3887 #if OS(MACOSX) | 3890 #if OS(MACOSX) |
3888 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3891 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3889 #else | 3892 #else |
3890 return PlatformEvent::AltKey; | 3893 return PlatformEvent::AltKey; |
3891 #endif | 3894 #endif |
3892 } | 3895 } |
3893 | 3896 |
3894 } // namespace blink | 3897 } // namespace blink |
OLD | NEW |