Chromium Code Reviews| 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 #ifndef MouseEventManager_h | 5 #ifndef MouseEventManager_h |
| 6 #define MouseEventManager_h | 6 #define MouseEventManager_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/dom/SynchronousMutationObserver.h" | 9 #include "core/dom/SynchronousMutationObserver.h" |
| 10 #include "core/input/BoundaryEventDispatcher.h" | 10 #include "core/input/BoundaryEventDispatcher.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 | 119 |
| 120 // Returns whether pan is handled and resets the state on release. | 120 // Returns whether pan is handled and resets the state on release. |
| 121 bool HandleSvgPanIfNeeded(bool is_release_event); | 121 bool HandleSvgPanIfNeeded(bool is_release_event); |
| 122 | 122 |
| 123 void InvalidateClick(); | 123 void InvalidateClick(); |
| 124 | 124 |
| 125 // TODO: These functions ideally should be private but the code needs more | 125 // TODO: These functions ideally should be private but the code needs more |
| 126 // refactoring to be able to remove the dependency from EventHandler. | 126 // refactoring to be able to remove the dependency from EventHandler. |
| 127 Node* GetNodeUnderMouse(); | 127 Node* GetNodeUnderMouse(); |
| 128 bool IsMousePositionUnknown(); | 128 bool IsMousePositionUnknown(); |
| 129 IntPoint LastKnownMousePosition(); | 129 IntPoint LastKnownMousePosition(); |
|
bokan
2017/06/15 17:40:13
Should this eventually become a FloatPoint as well
aelias_OOO_until_Jul13
2017/06/15 22:19:54
Yes. I added a TODO.
| |
| 130 FloatPoint LastKnownMousePositionGlobal(); | |
| 130 | 131 |
| 131 bool MousePressed(); | 132 bool MousePressed(); |
| 132 void SetMousePressed(bool); | 133 void SetMousePressed(bool); |
| 133 | 134 |
| 134 bool CapturesDragging() const; | 135 bool CapturesDragging() const; |
| 135 void SetCapturesDragging(bool); | 136 void SetCapturesDragging(bool); |
| 136 | 137 |
| 137 void SetMouseDownMayStartAutoscroll() { | 138 void SetMouseDownMayStartAutoscroll() { |
| 138 mouse_down_may_start_autoscroll_ = true; | 139 mouse_down_may_start_autoscroll_ = true; |
| 139 } | 140 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 204 const Member<LocalFrame> frame_; | 205 const Member<LocalFrame> frame_; |
| 205 Member<ScrollManager> scroll_manager_; | 206 Member<ScrollManager> scroll_manager_; |
| 206 | 207 |
| 207 // The effective position of the mouse pointer. | 208 // The effective position of the mouse pointer. |
| 208 // See | 209 // See |
| 209 // https://w3c.github.io/pointerevents/#dfn-tracking-the-effective-position-of -the-legacy-mouse-pointer. | 210 // https://w3c.github.io/pointerevents/#dfn-tracking-the-effective-position-of -the-legacy-mouse-pointer. |
| 210 Member<Node> node_under_mouse_; | 211 Member<Node> node_under_mouse_; |
| 211 | 212 |
| 212 // The last mouse movement position this frame has seen in root frame | 213 // The last mouse movement position this frame has seen in root frame |
| 213 // coordinates. | 214 // coordinates. |
| 214 IntPoint last_known_mouse_position_; | 215 FloatPoint last_known_mouse_position_; |
| 215 IntPoint last_known_mouse_global_position_; | 216 FloatPoint last_known_mouse_global_position_; |
| 216 | 217 |
| 217 unsigned is_mouse_position_unknown_ : 1; | 218 unsigned is_mouse_position_unknown_ : 1; |
| 218 // Current button-press state for mouse/mouse-like-stylus. | 219 // Current button-press state for mouse/mouse-like-stylus. |
| 219 // TODO(crbug.com/563676): Buggy for chorded buttons. | 220 // TODO(crbug.com/563676): Buggy for chorded buttons. |
| 220 unsigned mouse_pressed_ : 1; | 221 unsigned mouse_pressed_ : 1; |
| 221 | 222 |
| 222 unsigned mouse_down_may_start_autoscroll_ : 1; | 223 unsigned mouse_down_may_start_autoscroll_ : 1; |
| 223 unsigned svg_pan_ : 1; | 224 unsigned svg_pan_ : 1; |
| 224 unsigned captures_dragging_ : 1; | 225 unsigned captures_dragging_ : 1; |
| 225 unsigned mouse_down_may_start_drag_ : 1; | 226 unsigned mouse_down_may_start_drag_ : 1; |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 238 WebMouseEvent mouse_down_; | 239 WebMouseEvent mouse_down_; |
| 239 | 240 |
| 240 LayoutPoint drag_start_pos_; | 241 LayoutPoint drag_start_pos_; |
| 241 | 242 |
| 242 TaskRunnerTimer<MouseEventManager> fake_mouse_move_event_timer_; | 243 TaskRunnerTimer<MouseEventManager> fake_mouse_move_event_timer_; |
| 243 }; | 244 }; |
| 244 | 245 |
| 245 } // namespace blink | 246 } // namespace blink |
| 246 | 247 |
| 247 #endif // MouseEventManager_h | 248 #endif // MouseEventManager_h |
| OLD | NEW |