| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/input/MouseEventManager.h" | 5 #include "core/input/MouseEventManager.h" |
| 6 | 6 |
| 7 #include "core/clipboard/DataObject.h" | 7 #include "core/clipboard/DataObject.h" |
| 8 #include "core/clipboard/DataTransfer.h" | 8 #include "core/clipboard/DataTransfer.h" |
| 9 #include "core/dom/Element.h" | 9 #include "core/dom/Element.h" |
| 10 #include "core/dom/ElementTraversal.h" | 10 #include "core/dom/ElementTraversal.h" |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 : WebInputEventResult::NotHandled; | 631 : WebInputEventResult::NotHandled; |
| 632 } | 632 } |
| 633 | 633 |
| 634 void MouseEventManager::updateSelectionForMouseDrag() { | 634 void MouseEventManager::updateSelectionForMouseDrag() { |
| 635 m_frame->eventHandler().selectionController().updateSelectionForMouseDrag( | 635 m_frame->eventHandler().selectionController().updateSelectionForMouseDrag( |
| 636 m_mousePressNode, m_dragStartPos, m_lastKnownMousePosition); | 636 m_mousePressNode, m_dragStartPos, m_lastKnownMousePosition); |
| 637 } | 637 } |
| 638 | 638 |
| 639 bool MouseEventManager::handleDragDropIfPossible( | 639 bool MouseEventManager::handleDragDropIfPossible( |
| 640 const GestureEventWithHitTestResults& targetedEvent) { | 640 const GestureEventWithHitTestResults& targetedEvent) { |
| 641 if (m_frame->settings() && m_frame->settings()->touchDragDropEnabled() && | 641 if (m_frame->settings() && m_frame->settings()->getTouchDragDropEnabled() && |
| 642 m_frame->view()) { | 642 m_frame->view()) { |
| 643 const WebGestureEvent& gestureEvent = targetedEvent.event(); | 643 const WebGestureEvent& gestureEvent = targetedEvent.event(); |
| 644 unsigned modifiers = gestureEvent.modifiers; | 644 unsigned modifiers = gestureEvent.modifiers; |
| 645 | 645 |
| 646 // TODO(mustaq): Suppressing long-tap MouseEvents could break | 646 // TODO(mustaq): Suppressing long-tap MouseEvents could break |
| 647 // drag-drop. Will do separately because of the risk. crbug.com/606938. | 647 // drag-drop. Will do separately because of the risk. crbug.com/606938. |
| 648 PlatformMouseEvent mouseDownEvent( | 648 PlatformMouseEvent mouseDownEvent( |
| 649 gestureEvent, WebPointerProperties::Button::Left, | 649 gestureEvent, WebPointerProperties::Button::Left, |
| 650 PlatformEvent::MousePressed, 1, | 650 PlatformEvent::MousePressed, 1, |
| 651 static_cast<PlatformEvent::Modifiers>(modifiers | | 651 static_cast<PlatformEvent::Modifiers>(modifiers | |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 | 986 |
| 987 void MouseEventManager::setClickCount(int clickCount) { | 987 void MouseEventManager::setClickCount(int clickCount) { |
| 988 m_clickCount = clickCount; | 988 m_clickCount = clickCount; |
| 989 } | 989 } |
| 990 | 990 |
| 991 bool MouseEventManager::mouseDownMayStartDrag() { | 991 bool MouseEventManager::mouseDownMayStartDrag() { |
| 992 return m_mouseDownMayStartDrag; | 992 return m_mouseDownMayStartDrag; |
| 993 } | 993 } |
| 994 | 994 |
| 995 } // namespace blink | 995 } // namespace blink |
| OLD | NEW |