Lines Matching refs:gestureEvent
2062 bool EventHandler::handleGestureEvent(const PlatformGestureEvent& gestureEvent)
2070 if (gestureEvent.isScrollEvent())
2071 return handleGestureScrollEvent(gestureEvent);
2074 GestureEventWithHitTestResults targetedEvent = targetGestureEvent(gestureEvent);
2104 const PlatformGestureEvent& gestureEvent = targetedEvent.event();
2107 bool eventSwallowed = scrollbar->gestureEvent(gestureEvent);
2108 if (gestureEvent.type() == PlatformEvent::GestureTapDown && eventSwallowed)
2114 if (eventTarget && eventTarget->dispatchGestureEvent(gestureEvent))
2117 switch (gestureEvent.type()) {
2142 bool EventHandler::handleGestureScrollEvent(const PlatformGestureEvent& gestureEvent)
2148 if (gestureEvent.type() != PlatformEvent::GestureScrollBegin) {
2159 LayoutPoint viewPoint = view->windowToContents(gestureEvent.position());
2175 bool eventSwallowed = scrollbar->gestureEvent(gestureEvent);
2176 if (gestureEvent.type() == PlatformEvent::GestureScrollEnd
2177 || gestureEvent.type() == PlatformEvent::GestureFlingStart
2186 bool eventSwallowed = handleScrollGestureOnResizer(eventTarget.get(), gestureEvent);
2188 eventSwallowed = eventTarget->dispatchGestureEvent(gestureEvent);
2193 switch (gestureEvent.type()) {
2195 return handleGestureScrollBegin(gestureEvent);
2198 return handleGestureScrollUpdate(gestureEvent);
2200 return handleGestureScrollEnd(gestureEvent);
2215 const PlatformGestureEvent& gestureEvent = targetedEvent.event();
2216 HitTestRequest::HitTestRequestType hitType = getHitTypeForGestureType(gestureEvent.type());
2221 if (gestureEvent.altKey())
2223 if (gestureEvent.ctrlKey())
2225 if (gestureEvent.metaKey())
2227 if (gestureEvent.shiftKey())
2235 IntPoint adjustedPoint = m_frame->view()->windowToContents(gestureEvent.position());
2237 PlatformMouseEvent fakeMouseMove(gestureEvent.position(), gestureEvent.globalPosition(),
2239 modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp());
2253 PlatformMouseEvent fakeMouseDown(gestureEvent.position(), gestureEvent.globalPosition(),
2254 LeftButton, PlatformEvent::MousePressed, gestureEvent.tapCount(),
2255 modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp());
2256 bool swallowMouseDownEvent = !dispatchMouseEvent(EventTypeNames::mousedown, currentHitTest.innerNode(), gestureEvent.tapCount(), fakeMouseDown, true);
2265 PlatformMouseEvent fakeMouseUp(gestureEvent.position(), gestureEvent.globalPosition(),
2266 LeftButton, PlatformEvent::MouseReleased, gestureEvent.tapCount(),
2267 modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp());
2268 bool swallowMouseUpEvent = !dispatchMouseEvent(EventTypeNames::mouseup, currentHitTest.innerNode(), gestureEvent.tapCount(), fakeMouseUp, false);
2274 swallowClickEvent = !dispatchMouseEvent(EventTypeNames::click, clickTargetNode, gestureEvent.tapCount(), fakeMouseUp, true);
2287 const PlatformGestureEvent& gestureEvent = targetedEvent.event();
2288 IntPoint adjustedPoint = gestureEvent.position();
2296 PlatformMouseEvent mouseDownEvent(adjustedPoint, gestureEvent.globalPosition(), LeftButton, PlatformEvent::MousePressed, 1,
2297 gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey(), PlatformMouseEvent::FromTouch, WTF::currentTime());
2300 PlatformMouseEvent mouseDragEvent(adjustedPoint, gestureEvent.globalPosition(), LeftButton, PlatformEvent::MouseMoved, 1,
2301 gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey(), PlatformMouseEvent::FromTouch, WTF::currentTime());
2321 IntPoint hitTestPoint = m_frame->view()->windowToContents(gestureEvent.position());
2346 bool EventHandler::handleScrollGestureOnResizer(Node* eventTarget, const PlatformGestureEvent& gestureEvent) {
2347 if (gestureEvent.type() == PlatformEvent::GestureScrollBegin) {
2349 IntPoint p = m_frame->view()->windowToContents(gestureEvent.position());
2356 } else if (gestureEvent.type() == PlatformEvent::GestureScrollUpdate ||
2357 gestureEvent.type() == PlatformEvent::GestureScrollUpdateWithoutPropagation) {
2359 m_resizeScrollableArea->resize(gestureEvent, m_offsetFromResizeCorner);
2362 } else if (gestureEvent.type() == PlatformEvent::GestureScrollEnd) {
2373 bool EventHandler::passScrollGestureEventToWidget(const PlatformGestureEvent& gestureEvent, RenderObject* renderer)
2375 ASSERT(gestureEvent.isScrollEvent());
2388 return toFrameView(widget)->frame().eventHandler().handleGestureScrollEvent(gestureEvent);
2391 bool EventHandler::handleGestureScrollEnd(const PlatformGestureEvent& gestureEvent) {
2396 passScrollGestureEventToWidget(gestureEvent, node->renderer());
2401 bool EventHandler::handleGestureScrollBegin(const PlatformGestureEvent& gestureEvent)
2419 passScrollGestureEventToWidget(gestureEvent, m_scrollGestureHandlingNode->renderer());
2424 bool EventHandler::handleGestureScrollUpdate(const PlatformGestureEvent& gestureEvent)
2426 FloatSize delta(gestureEvent.deltaX(), gestureEvent.deltaY());
2435 return sendScrollEventToView(gestureEvent, delta);
2445 bool scrollShouldNotPropagate = gestureEvent.type() == PlatformEvent::GestureScrollUpdateWithoutPropagation;
2448 if (passScrollGestureEventToWidget(gestureEvent, renderer)) {
2472 return sendScrollEventToView(gestureEvent, delta);
2475 bool EventHandler::sendScrollEventToView(const PlatformGestureEvent& gestureEvent, const FloatSize& scaledDelta)
2482 IntPoint point(gestureEvent.position().x(), gestureEvent.position().y());
2483 IntPoint globalPoint(gestureEvent.globalPosition().x(), gestureEvent.globalPosition().y());
2488 gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey());
2564 GestureEventWithHitTestResults EventHandler::targetGestureEvent(const PlatformGestureEvent& gestureEvent, bool readOnly)
2570 ASSERT(!gestureEvent.isScrollEvent());
2572 HitTestRequest::HitTestRequestType hitType = getHitTypeForGestureType(gestureEvent.type());
2577 } else if (gestureEvent.type() == PlatformEvent::GestureTap) {
2590 IntPoint hitTestPoint = m_frame->view()->windowToContents(gestureEvent.position());
2592 if (shouldApplyTouchAdjustment(gestureEvent)) {
2593 padding = gestureEvent.area();
2600 PlatformGestureEvent adjustedEvent = gestureEvent;
2607 if (shouldApplyTouchAdjustment(gestureEvent)) {
2659 void EventHandler::applyTouchAdjustment(PlatformGestureEvent* gestureEvent, HitTestResult* hitTestResult)
2661 if (!shouldApplyTouchAdjustment(*gestureEvent))
2665 IntPoint adjustedPoint = gestureEvent->position();
2666 IntSize radius = gestureEvent->area();
2669 switch (gestureEvent->type()) {
2689 gestureEvent->applyTouchAdjustment(adjustedPoint);