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

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

Issue 2645483002: Move the fake mouse move event timer to the UserInteraction task queue. (Closed)
Patch Set: fix build Created 3 years, 11 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 | « third_party/WebKit/Source/core/input/MouseEventManager.h ('k') | 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"
11 #include "core/dom/TaskRunnerHelper.h"
11 #include "core/editing/FrameSelection.h" 12 #include "core/editing/FrameSelection.h"
12 #include "core/editing/SelectionController.h" 13 #include "core/editing/SelectionController.h"
13 #include "core/events/DragEvent.h" 14 #include "core/events/DragEvent.h"
14 #include "core/events/MouseEvent.h" 15 #include "core/events/MouseEvent.h"
15 #include "core/frame/FrameView.h" 16 #include "core/frame/FrameView.h"
16 #include "core/frame/LocalFrame.h" 17 #include "core/frame/LocalFrame.h"
17 #include "core/frame/Settings.h" 18 #include "core/frame/Settings.h"
18 #include "core/html/HTMLCanvasElement.h" 19 #include "core/html/HTMLCanvasElement.h"
19 #include "core/input/EventHandler.h" 20 #include "core/input/EventHandler.h"
20 #include "core/input/EventHandlingUtil.h" 21 #include "core/input/EventHandlingUtil.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 73
73 } // namespace 74 } // namespace
74 75
75 enum class DragInitiator { Mouse, Touch }; 76 enum class DragInitiator { Mouse, Touch };
76 77
77 MouseEventManager::MouseEventManager(LocalFrame& frame, 78 MouseEventManager::MouseEventManager(LocalFrame& frame,
78 ScrollManager& scrollManager) 79 ScrollManager& scrollManager)
79 : m_frame(frame), 80 : m_frame(frame),
80 m_scrollManager(scrollManager), 81 m_scrollManager(scrollManager),
81 m_fakeMouseMoveEventTimer( 82 m_fakeMouseMoveEventTimer(
83 TaskRunnerHelper::get(TaskType::UserInteraction, &frame),
82 this, 84 this,
83 &MouseEventManager::fakeMouseMoveEventTimerFired) { 85 &MouseEventManager::fakeMouseMoveEventTimerFired) {
84 clear(); 86 clear();
85 } 87 }
86 88
87 void MouseEventManager::clear() { 89 void MouseEventManager::clear() {
88 m_nodeUnderMouse = nullptr; 90 m_nodeUnderMouse = nullptr;
89 m_mousePressNode = nullptr; 91 m_mousePressNode = nullptr;
90 m_mouseDownMayStartAutoscroll = false; 92 m_mouseDownMayStartAutoscroll = false;
91 m_mouseDownMayStartDrag = false; 93 m_mouseDownMayStartDrag = false;
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 990
989 void MouseEventManager::setClickCount(int clickCount) { 991 void MouseEventManager::setClickCount(int clickCount) {
990 m_clickCount = clickCount; 992 m_clickCount = clickCount;
991 } 993 }
992 994
993 bool MouseEventManager::mouseDownMayStartDrag() { 995 bool MouseEventManager::mouseDownMayStartDrag() {
994 return m_mouseDownMayStartDrag; 996 return m_mouseDownMayStartDrag;
995 } 997 }
996 998
997 } // namespace blink 999 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/MouseEventManager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698