Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: third_party/WebKit/Source/core/input/MouseEventManager.cpp

Issue 2401503002: Align drag threshold across content types. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698