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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 const double kFakeMouseMoveInterval = 0.1; | 60 const double kFakeMouseMoveInterval = 0.1; |
61 | 61 |
62 #if OS(MACOSX) | 62 #if OS(MACOSX) |
63 const double kTextDragDelay = 0.15; | 63 const double kTextDragDelay = 0.15; |
64 #else | 64 #else |
65 const double kTextDragDelay = 0.0; | 65 const double kTextDragDelay = 0.0; |
66 #endif | 66 #endif |
67 | 67 |
68 // The link drag hysteresis is much larger than the others because there | 68 // The link drag hysteresis is much larger than the others because there |
69 // needs to be enough space to cancel the link press without starting a link | 69 // needs to be enough space to cancel the link press without starting a link |
70 // drag, and because dragging links is rare. | 70 // drag, and because dragging links is rare. |
Peter Kasting
2016/10/06 09:05:36
This comment should be updated or removed.
pwnall
2016/10/20 01:40:39
Done.
| |
71 const int kLinkDragHysteresis = 40; | 71 const int kLinkDragHysteresis = 5; |
Peter Kasting
2016/10/06 09:05:36
Perhaps we should just use the text/image values b
pwnall
2016/10/20 01:40:39
I opted to prepare the path for obeying the platfo
| |
72 const int kImageDragHysteresis = 5; | 72 const int kImageDragHysteresis = 5; |
73 const int kTextDragHysteresis = 3; | 73 const int kTextDragHysteresis = 3; |
74 const int kGeneralDragHysteresis = 3; | 74 const int kGeneralDragHysteresis = 3; |
75 | 75 |
76 } // namespace | 76 } // namespace |
77 | 77 |
78 enum class DragInitiator { Mouse, Touch }; | 78 enum class DragInitiator { Mouse, Touch }; |
79 | 79 |
80 MouseEventManager::MouseEventManager(LocalFrame* frame, | 80 MouseEventManager::MouseEventManager(LocalFrame* frame, |
81 ScrollManager* scrollManager) | 81 ScrollManager* scrollManager) |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1013 | 1013 |
1014 void MouseEventManager::setClickCount(int clickCount) { | 1014 void MouseEventManager::setClickCount(int clickCount) { |
1015 m_clickCount = clickCount; | 1015 m_clickCount = clickCount; |
1016 } | 1016 } |
1017 | 1017 |
1018 bool MouseEventManager::mouseDownMayStartDrag() { | 1018 bool MouseEventManager::mouseDownMayStartDrag() { |
1019 return m_mouseDownMayStartDrag; | 1019 return m_mouseDownMayStartDrag; |
1020 } | 1020 } |
1021 | 1021 |
1022 } // namespace blink | 1022 } // namespace blink |
OLD | NEW |