OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1305 // event type. | 1305 // event type. |
1306 GestureEventWithHitTestResults targetedEvent = | 1306 GestureEventWithHitTestResults targetedEvent = |
1307 targetGestureEvent(gestureEvent); | 1307 targetGestureEvent(gestureEvent); |
1308 | 1308 |
1309 return handleGestureEvent(targetedEvent); | 1309 return handleGestureEvent(targetedEvent); |
1310 } | 1310 } |
1311 | 1311 |
1312 WebInputEventResult EventHandler::handleGestureEvent( | 1312 WebInputEventResult EventHandler::handleGestureEvent( |
1313 const GestureEventWithHitTestResults& targetedEvent) { | 1313 const GestureEventWithHitTestResults& targetedEvent) { |
1314 TRACE_EVENT0("input", "EventHandler::handleGestureEvent"); | 1314 TRACE_EVENT0("input", "EventHandler::handleGestureEvent"); |
1315 if (!m_frame->host()) | 1315 if (!m_frame->page()) |
1316 return WebInputEventResult::NotHandled; | 1316 return WebInputEventResult::NotHandled; |
1317 | 1317 |
1318 // Propagation to inner frames is handled below this function. | 1318 // Propagation to inner frames is handled below this function. |
1319 ASSERT(m_frame == m_frame->localFrameRoot()); | 1319 ASSERT(m_frame == m_frame->localFrameRoot()); |
1320 | 1320 |
1321 // Non-scrolling related gesture events do a single cross-frame hit-test and | 1321 // Non-scrolling related gesture events do a single cross-frame hit-test and |
1322 // jump directly to the inner most frame. This matches handleMousePressEvent | 1322 // jump directly to the inner most frame. This matches handleMousePressEvent |
1323 // etc. | 1323 // etc. |
1324 ASSERT(!targetedEvent.event().isScrollEvent()); | 1324 ASSERT(!targetedEvent.event().isScrollEvent()); |
1325 | 1325 |
(...skipping 12 matching lines...) Expand all Loading... |
1338 } | 1338 } |
1339 | 1339 |
1340 WebInputEventResult EventHandler::handleGestureEventInFrame( | 1340 WebInputEventResult EventHandler::handleGestureEventInFrame( |
1341 const GestureEventWithHitTestResults& targetedEvent) { | 1341 const GestureEventWithHitTestResults& targetedEvent) { |
1342 return m_gestureManager->handleGestureEventInFrame(targetedEvent); | 1342 return m_gestureManager->handleGestureEventInFrame(targetedEvent); |
1343 } | 1343 } |
1344 | 1344 |
1345 WebInputEventResult EventHandler::handleGestureScrollEvent( | 1345 WebInputEventResult EventHandler::handleGestureScrollEvent( |
1346 const WebGestureEvent& gestureEvent) { | 1346 const WebGestureEvent& gestureEvent) { |
1347 TRACE_EVENT0("input", "EventHandler::handleGestureScrollEvent"); | 1347 TRACE_EVENT0("input", "EventHandler::handleGestureScrollEvent"); |
1348 if (!m_frame->host()) | 1348 if (!m_frame->page()) |
1349 return WebInputEventResult::NotHandled; | 1349 return WebInputEventResult::NotHandled; |
1350 | 1350 |
1351 return m_scrollManager->handleGestureScrollEvent(gestureEvent); | 1351 return m_scrollManager->handleGestureScrollEvent(gestureEvent); |
1352 } | 1352 } |
1353 | 1353 |
1354 WebInputEventResult EventHandler::handleGestureScrollEnd( | 1354 WebInputEventResult EventHandler::handleGestureScrollEnd( |
1355 const WebGestureEvent& gestureEvent) { | 1355 const WebGestureEvent& gestureEvent) { |
1356 if (!m_frame->host()) | 1356 if (!m_frame->page()) |
1357 return WebInputEventResult::NotHandled; | 1357 return WebInputEventResult::NotHandled; |
1358 return m_scrollManager->handleGestureScrollEnd(gestureEvent); | 1358 return m_scrollManager->handleGestureScrollEnd(gestureEvent); |
1359 } | 1359 } |
1360 | 1360 |
1361 void EventHandler::setMouseDownMayStartAutoscroll() { | 1361 void EventHandler::setMouseDownMayStartAutoscroll() { |
1362 m_mouseEventManager->setMouseDownMayStartAutoscroll(); | 1362 m_mouseEventManager->setMouseDownMayStartAutoscroll(); |
1363 } | 1363 } |
1364 | 1364 |
1365 bool EventHandler::isScrollbarHandlingGestures() const { | 1365 bool EventHandler::isScrollbarHandlingGestures() const { |
1366 return m_scrollManager->isScrollbarHandlingGestures(); | 1366 return m_scrollManager->isScrollbarHandlingGestures(); |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2086 MouseEventWithHitTestResults& mev, | 2086 MouseEventWithHitTestResults& mev, |
2087 LocalFrame* subframe) { | 2087 LocalFrame* subframe) { |
2088 WebInputEventResult result = | 2088 WebInputEventResult result = |
2089 subframe->eventHandler().handleMouseReleaseEvent(mev.event()); | 2089 subframe->eventHandler().handleMouseReleaseEvent(mev.event()); |
2090 if (result != WebInputEventResult::NotHandled) | 2090 if (result != WebInputEventResult::NotHandled) |
2091 return result; | 2091 return result; |
2092 return WebInputEventResult::HandledSystem; | 2092 return WebInputEventResult::HandledSystem; |
2093 } | 2093 } |
2094 | 2094 |
2095 } // namespace blink | 2095 } // namespace blink |
OLD | NEW |