| 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 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1332 // event type. | 1332 // event type. |
| 1333 GestureEventWithHitTestResults targetedEvent = | 1333 GestureEventWithHitTestResults targetedEvent = |
| 1334 targetGestureEvent(gestureEvent); | 1334 targetGestureEvent(gestureEvent); |
| 1335 | 1335 |
| 1336 return handleGestureEvent(targetedEvent); | 1336 return handleGestureEvent(targetedEvent); |
| 1337 } | 1337 } |
| 1338 | 1338 |
| 1339 WebInputEventResult EventHandler::handleGestureEvent( | 1339 WebInputEventResult EventHandler::handleGestureEvent( |
| 1340 const GestureEventWithHitTestResults& targetedEvent) { | 1340 const GestureEventWithHitTestResults& targetedEvent) { |
| 1341 TRACE_EVENT0("input", "EventHandler::handleGestureEvent"); | 1341 TRACE_EVENT0("input", "EventHandler::handleGestureEvent"); |
| 1342 if (!m_frame->host()) |
| 1343 return WebInputEventResult::NotHandled; |
| 1342 | 1344 |
| 1343 // Propagation to inner frames is handled below this function. | 1345 // Propagation to inner frames is handled below this function. |
| 1344 ASSERT(m_frame == m_frame->localFrameRoot()); | 1346 ASSERT(m_frame == m_frame->localFrameRoot()); |
| 1345 | 1347 |
| 1346 // Non-scrolling related gesture events do a single cross-frame hit-test and | 1348 // Non-scrolling related gesture events do a single cross-frame hit-test and |
| 1347 // jump directly to the inner most frame. This matches handleMousePressEvent | 1349 // jump directly to the inner most frame. This matches handleMousePressEvent |
| 1348 // etc. | 1350 // etc. |
| 1349 ASSERT(!targetedEvent.event().isScrollEvent()); | 1351 ASSERT(!targetedEvent.event().isScrollEvent()); |
| 1350 | 1352 |
| 1351 // Update mouseout/leave/over/enter events before jumping directly to the | 1353 // Update mouseout/leave/over/enter events before jumping directly to the |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1363 } | 1365 } |
| 1364 | 1366 |
| 1365 WebInputEventResult EventHandler::handleGestureEventInFrame( | 1367 WebInputEventResult EventHandler::handleGestureEventInFrame( |
| 1366 const GestureEventWithHitTestResults& targetedEvent) { | 1368 const GestureEventWithHitTestResults& targetedEvent) { |
| 1367 return m_gestureManager->handleGestureEventInFrame(targetedEvent); | 1369 return m_gestureManager->handleGestureEventInFrame(targetedEvent); |
| 1368 } | 1370 } |
| 1369 | 1371 |
| 1370 WebInputEventResult EventHandler::handleGestureScrollEvent( | 1372 WebInputEventResult EventHandler::handleGestureScrollEvent( |
| 1371 const PlatformGestureEvent& gestureEvent) { | 1373 const PlatformGestureEvent& gestureEvent) { |
| 1372 TRACE_EVENT0("input", "EventHandler::handleGestureScrollEvent"); | 1374 TRACE_EVENT0("input", "EventHandler::handleGestureScrollEvent"); |
| 1375 if (!m_frame->host()) |
| 1376 return WebInputEventResult::NotHandled; |
| 1373 | 1377 |
| 1374 return m_scrollManager->handleGestureScrollEvent(gestureEvent); | 1378 return m_scrollManager->handleGestureScrollEvent(gestureEvent); |
| 1375 } | 1379 } |
| 1376 | 1380 |
| 1377 WebInputEventResult EventHandler::handleGestureScrollEnd( | 1381 WebInputEventResult EventHandler::handleGestureScrollEnd( |
| 1378 const PlatformGestureEvent& gestureEvent) { | 1382 const PlatformGestureEvent& gestureEvent) { |
| 1383 if (!m_frame->host()) |
| 1384 return WebInputEventResult::NotHandled; |
| 1385 |
| 1379 return m_scrollManager->handleGestureScrollEnd(gestureEvent); | 1386 return m_scrollManager->handleGestureScrollEnd(gestureEvent); |
| 1380 } | 1387 } |
| 1381 | 1388 |
| 1382 void EventHandler::setMouseDownMayStartAutoscroll() { | 1389 void EventHandler::setMouseDownMayStartAutoscroll() { |
| 1383 m_mouseEventManager->setMouseDownMayStartAutoscroll(); | 1390 m_mouseEventManager->setMouseDownMayStartAutoscroll(); |
| 1384 } | 1391 } |
| 1385 | 1392 |
| 1386 bool EventHandler::isScrollbarHandlingGestures() const { | 1393 bool EventHandler::isScrollbarHandlingGestures() const { |
| 1387 return m_scrollManager->isScrollbarHandlingGestures(); | 1394 return m_scrollManager->isScrollbarHandlingGestures(); |
| 1388 } | 1395 } |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2100 } | 2107 } |
| 2101 | 2108 |
| 2102 FrameHost* EventHandler::frameHost() const { | 2109 FrameHost* EventHandler::frameHost() const { |
| 2103 if (!m_frame->page()) | 2110 if (!m_frame->page()) |
| 2104 return nullptr; | 2111 return nullptr; |
| 2105 | 2112 |
| 2106 return &m_frame->page()->frameHost(); | 2113 return &m_frame->page()->frameHost(); |
| 2107 } | 2114 } |
| 2108 | 2115 |
| 2109 } // namespace blink | 2116 } // namespace blink |
| OLD | NEW |