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 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2072 // Perhaps we could simplify things by rewriting scroll handling to work inn
er frame | 2072 // Perhaps we could simplify things by rewriting scroll handling to work inn
er frame |
2073 // out, and then unify with other gesture events. | 2073 // out, and then unify with other gesture events. |
2074 if (gestureEvent.isScrollEvent()) | 2074 if (gestureEvent.isScrollEvent()) |
2075 return handleGestureScrollEvent(gestureEvent); | 2075 return handleGestureScrollEvent(gestureEvent); |
2076 | 2076 |
2077 // Non-scrolling related gesture events instead do a single cross-frame hit-
test and | 2077 // Non-scrolling related gesture events instead do a single cross-frame hit-
test and |
2078 // jump directly to the inner most frame. This matches handleMousePressEvent
etc. | 2078 // jump directly to the inner most frame. This matches handleMousePressEvent
etc. |
2079 | 2079 |
2080 // Hit test across all frames and do touch adjustment as necessary for the e
vent type. | 2080 // Hit test across all frames and do touch adjustment as necessary for the e
vent type. |
2081 GestureEventWithHitTestResults targetedEvent = targetGestureEvent(gestureEve
nt); | 2081 GestureEventWithHitTestResults targetedEvent = targetGestureEvent(gestureEve
nt); |
2082 ASSERT(!targetedEvent.hitTestResult().isOverWidget()); | |
2083 | 2082 |
2084 // Route to the correct frame. | 2083 // Route to the correct frame. |
2085 if (LocalFrame* innerFrame = targetedEvent.hitTestResult().innerNodeFrame()) | 2084 if (LocalFrame* innerFrame = targetedEvent.hitTestResult().innerNodeFrame()) |
2086 return innerFrame->eventHandler().handleGestureEventInFrame(targetedEven
t); | 2085 return innerFrame->eventHandler().handleGestureEventInFrame(targetedEven
t); |
2087 | 2086 |
2088 // No hit test result, handle in root instance. Perhaps we should just retur
n false instead? | 2087 // No hit test result, handle in root instance. Perhaps we should just retur
n false instead? |
2089 return handleGestureEventInFrame(targetedEvent); | 2088 return handleGestureEventInFrame(targetedEvent); |
2090 } | 2089 } |
2091 | 2090 |
2092 bool EventHandler::handleGestureEventInFrame(const GestureEventWithHitTestResult
s& targetedEvent) | 2091 bool EventHandler::handleGestureEventInFrame(const GestureEventWithHitTestResult
s& targetedEvent) |
(...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3821 unsigned EventHandler::accessKeyModifiers() | 3820 unsigned EventHandler::accessKeyModifiers() |
3822 { | 3821 { |
3823 #if OS(MACOSX) | 3822 #if OS(MACOSX) |
3824 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3823 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3825 #else | 3824 #else |
3826 return PlatformEvent::AltKey; | 3825 return PlatformEvent::AltKey; |
3827 #endif | 3826 #endif |
3828 } | 3827 } |
3829 | 3828 |
3830 } // namespace WebCore | 3829 } // namespace WebCore |
OLD | NEW |