| 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 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 void EventHandler::setMouseDownMayStartAutoscroll() { | 1399 void EventHandler::setMouseDownMayStartAutoscroll() { |
| 1400 m_mouseEventManager->setMouseDownMayStartAutoscroll(); | 1400 m_mouseEventManager->setMouseDownMayStartAutoscroll(); |
| 1401 } | 1401 } |
| 1402 | 1402 |
| 1403 bool EventHandler::isScrollbarHandlingGestures() const { | 1403 bool EventHandler::isScrollbarHandlingGestures() const { |
| 1404 return m_scrollManager->isScrollbarHandlingGestures(); | 1404 return m_scrollManager->isScrollbarHandlingGestures(); |
| 1405 } | 1405 } |
| 1406 | 1406 |
| 1407 bool EventHandler::shouldApplyTouchAdjustment( | 1407 bool EventHandler::shouldApplyTouchAdjustment( |
| 1408 const WebGestureEvent& event) const { | 1408 const WebGestureEvent& event) const { |
| 1409 if (m_frame->settings() && !m_frame->settings()->touchAdjustmentEnabled()) | 1409 if (m_frame->settings() && !m_frame->settings()->GetTouchAdjustmentEnabled()) |
| 1410 return false; | 1410 return false; |
| 1411 return !event.tapAreaInRootFrame().isEmpty(); | 1411 return !event.tapAreaInRootFrame().isEmpty(); |
| 1412 } | 1412 } |
| 1413 | 1413 |
| 1414 bool EventHandler::bestClickableNodeForHitTestResult( | 1414 bool EventHandler::bestClickableNodeForHitTestResult( |
| 1415 const HitTestResult& result, | 1415 const HitTestResult& result, |
| 1416 IntPoint& targetPoint, | 1416 IntPoint& targetPoint, |
| 1417 Node*& targetNode) { | 1417 Node*& targetNode) { |
| 1418 // FIXME: Unify this with the other best* functions which are very similar. | 1418 // FIXME: Unify this with the other best* functions which are very similar. |
| 1419 | 1419 |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1875 // Use the focused node as the target for hover and active. | 1875 // Use the focused node as the target for hover and active. |
| 1876 HitTestRequest request(HitTestRequest::Active); | 1876 HitTestRequest request(HitTestRequest::Active); |
| 1877 HitTestResult result(request, locationInRootFrame); | 1877 HitTestResult result(request, locationInRootFrame); |
| 1878 result.setInnerNode(targetNode); | 1878 result.setInnerNode(targetNode); |
| 1879 doc->updateHoverActiveState(request, result.innerElement(), | 1879 doc->updateHoverActiveState(request, result.innerElement(), |
| 1880 result.scrollbar()); | 1880 result.scrollbar()); |
| 1881 | 1881 |
| 1882 // The contextmenu event is a mouse event even when invoked using the | 1882 // The contextmenu event is a mouse event even when invoked using the |
| 1883 // keyboard. This is required for web compatibility. | 1883 // keyboard. This is required for web compatibility. |
| 1884 PlatformEvent::EventType eventType = PlatformEvent::MousePressed; | 1884 PlatformEvent::EventType eventType = PlatformEvent::MousePressed; |
| 1885 if (m_frame->settings() && m_frame->settings()->showContextMenuOnMouseUp()) | 1885 if (m_frame->settings() && m_frame->settings()->GetShowContextMenuOnMouseUp()) |
| 1886 eventType = PlatformEvent::MouseReleased; | 1886 eventType = PlatformEvent::MouseReleased; |
| 1887 | 1887 |
| 1888 PlatformMouseEvent mouseEvent( | 1888 PlatformMouseEvent mouseEvent( |
| 1889 locationInRootFrame, globalPosition, | 1889 locationInRootFrame, globalPosition, |
| 1890 WebPointerProperties::Button::NoButton, eventType, /* clickCount */ 0, | 1890 WebPointerProperties::Button::NoButton, eventType, /* clickCount */ 0, |
| 1891 PlatformEvent::NoModifiers, PlatformMouseEvent::RealOrIndistinguishable, | 1891 PlatformEvent::NoModifiers, PlatformMouseEvent::RealOrIndistinguishable, |
| 1892 TimeTicks::Now(), WebPointerProperties::PointerType::Mouse); | 1892 TimeTicks::Now(), WebPointerProperties::PointerType::Mouse); |
| 1893 | 1893 |
| 1894 return sendContextMenuEvent(mouseEvent, overrideTargetElement); | 1894 return sendContextMenuEvent(mouseEvent, overrideTargetElement); |
| 1895 } | 1895 } |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2122 } | 2122 } |
| 2123 | 2123 |
| 2124 FrameHost* EventHandler::frameHost() const { | 2124 FrameHost* EventHandler::frameHost() const { |
| 2125 if (!m_frame->page()) | 2125 if (!m_frame->page()) |
| 2126 return nullptr; | 2126 return nullptr; |
| 2127 | 2127 |
| 2128 return &m_frame->page()->frameHost(); | 2128 return &m_frame->page()->frameHost(); |
| 2129 } | 2129 } |
| 2130 | 2130 |
| 2131 } // namespace blink | 2131 } // namespace blink |
| OLD | NEW |