| 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 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2258 | 2258 |
| 2259 // FIXME: Use a hit-test cache to avoid unnecessary hit tests. http://crbug.
com/398920 | 2259 // FIXME: Use a hit-test cache to avoid unnecessary hit tests. http://crbug.
com/398920 |
| 2260 newHitTest = hitTestResultInFrame(m_frame, adjustedPoint, HitTestRequest::Re
adOnly); | 2260 newHitTest = hitTestResultInFrame(m_frame, adjustedPoint, HitTestRequest::Re
adOnly); |
| 2261 PlatformMouseEvent fakeMouseUp(adjustedPoint, gestureEvent.globalPosition(), | 2261 PlatformMouseEvent fakeMouseUp(adjustedPoint, gestureEvent.globalPosition(), |
| 2262 LeftButton, PlatformEvent::MouseReleased, gestureEvent.tapCount(), | 2262 LeftButton, PlatformEvent::MouseReleased, gestureEvent.tapCount(), |
| 2263 modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp()); | 2263 modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp()); |
| 2264 bool swallowMouseUpEvent = !dispatchMouseEvent(EventTypeNames::mouseup, newH
itTest.targetNode(), gestureEvent.tapCount(), fakeMouseUp, false); | 2264 bool swallowMouseUpEvent = !dispatchMouseEvent(EventTypeNames::mouseup, newH
itTest.targetNode(), gestureEvent.tapCount(), fakeMouseUp, false); |
| 2265 | 2265 |
| 2266 bool swallowClickEvent = false; | 2266 bool swallowClickEvent = false; |
| 2267 if (m_clickNode) { | 2267 if (m_clickNode) { |
| 2268 Node* clickTargetNode = newHitTest.targetNode()->commonAncestor(*m_click
Node, parentForClickEvent); | 2268 if (newHitTest.targetNode()) { |
| 2269 swallowClickEvent = !dispatchMouseEvent(EventTypeNames::click, clickTarg
etNode, gestureEvent.tapCount(), fakeMouseUp, true); | 2269 Node* clickTargetNode = newHitTest.targetNode()->commonAncestor(*m_c
lickNode, parentForClickEvent); |
| 2270 swallowClickEvent = !dispatchMouseEvent(EventTypeNames::click, click
TargetNode, gestureEvent.tapCount(), fakeMouseUp, true); |
| 2271 } |
| 2270 m_clickNode = nullptr; | 2272 m_clickNode = nullptr; |
| 2271 } | 2273 } |
| 2272 | 2274 |
| 2273 if (!swallowMouseUpEvent) | 2275 if (!swallowMouseUpEvent) |
| 2274 swallowMouseUpEvent = handleMouseReleaseEvent(MouseEventWithHitTestResul
ts(fakeMouseUp, newHitTest)); | 2276 swallowMouseUpEvent = handleMouseReleaseEvent(MouseEventWithHitTestResul
ts(fakeMouseUp, newHitTest)); |
| 2275 | 2277 |
| 2276 return swallowMouseDownEvent | swallowMouseUpEvent | swallowClickEvent; | 2278 return swallowMouseDownEvent | swallowMouseUpEvent | swallowClickEvent; |
| 2277 } | 2279 } |
| 2278 | 2280 |
| 2279 bool EventHandler::handleGestureLongPress(const GestureEventWithHitTestResults&
targetedEvent) | 2281 bool EventHandler::handleGestureLongPress(const GestureEventWithHitTestResults&
targetedEvent) |
| (...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3852 unsigned EventHandler::accessKeyModifiers() | 3854 unsigned EventHandler::accessKeyModifiers() |
| 3853 { | 3855 { |
| 3854 #if OS(MACOSX) | 3856 #if OS(MACOSX) |
| 3855 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3857 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 3856 #else | 3858 #else |
| 3857 return PlatformEvent::AltKey; | 3859 return PlatformEvent::AltKey; |
| 3858 #endif | 3860 #endif |
| 3859 } | 3861 } |
| 3860 | 3862 |
| 3861 } // namespace blink | 3863 } // namespace blink |
| OLD | NEW |