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

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

Issue 2807123002: Fix the wrong non-element node handling in EventHanlder and MouseEventManager (Closed)
Patch Set: Addressed Created 3 years, 8 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
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 #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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 bool check_for_listener = false); 51 bool check_for_listener = false);
52 52
53 WebInputEventResult SetMousePositionAndDispatchMouseEvent( 53 WebInputEventResult SetMousePositionAndDispatchMouseEvent(
54 Node* target_node, 54 Node* target_node,
55 const String& canvas_region_id, 55 const String& canvas_region_id,
56 const AtomicString& event_type, 56 const AtomicString& event_type,
57 const WebMouseEvent&); 57 const WebMouseEvent&);
58 58
59 WebInputEventResult DispatchMouseClickIfNeeded( 59 WebInputEventResult DispatchMouseClickIfNeeded(
60 const MouseEventWithHitTestResults&, 60 const MouseEventWithHitTestResults&,
61 Node* release_node); 61 Element& mouse_release_target);
62 62
63 WebInputEventResult DispatchDragSrcEvent(const AtomicString& event_type, 63 WebInputEventResult DispatchDragSrcEvent(const AtomicString& event_type,
64 const WebMouseEvent&); 64 const WebMouseEvent&);
65 WebInputEventResult DispatchDragEvent(const AtomicString& event_type, 65 WebInputEventResult DispatchDragEvent(const AtomicString& event_type,
66 Node* target, 66 Node* target,
67 const WebMouseEvent&, 67 const WebMouseEvent&,
68 DataTransfer*); 68 DataTransfer*);
69 69
70 // Resets the internal state of this object. 70 // Resets the internal state of this object.
71 void Clear(); 71 void Clear();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 bool CapturesDragging() const; 132 bool CapturesDragging() const;
133 void SetCapturesDragging(bool); 133 void SetCapturesDragging(bool);
134 134
135 void SetMouseDownMayStartAutoscroll() { 135 void SetMouseDownMayStartAutoscroll() {
136 mouse_down_may_start_autoscroll_ = true; 136 mouse_down_may_start_autoscroll_ = true;
137 } 137 }
138 138
139 Node* MousePressNode(); 139 Node* MousePressNode();
140 void SetMousePressNode(Node*); 140 void SetMousePressNode(Node*);
141 141
142 void SetClickNode(Node*); 142 void SetClickElement(Element*);
143 void SetClickCount(int); 143 void SetClickCount(int);
144 144
145 bool MouseDownMayStartDrag(); 145 bool MouseDownMayStartDrag();
146 146
147 private: 147 private:
148 class MouseEventBoundaryEventDispatcher : public BoundaryEventDispatcher { 148 class MouseEventBoundaryEventDispatcher : public BoundaryEventDispatcher {
149 WTF_MAKE_NONCOPYABLE(MouseEventBoundaryEventDispatcher); 149 WTF_MAKE_NONCOPYABLE(MouseEventBoundaryEventDispatcher);
150 150
151 public: 151 public:
152 MouseEventBoundaryEventDispatcher(MouseEventManager*, 152 MouseEventBoundaryEventDispatcher(MouseEventManager*,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 unsigned mouse_pressed_ : 1; 218 unsigned mouse_pressed_ : 1;
219 219
220 unsigned mouse_down_may_start_autoscroll_ : 1; 220 unsigned mouse_down_may_start_autoscroll_ : 1;
221 unsigned svg_pan_ : 1; 221 unsigned svg_pan_ : 1;
222 unsigned captures_dragging_ : 1; 222 unsigned captures_dragging_ : 1;
223 unsigned mouse_down_may_start_drag_ : 1; 223 unsigned mouse_down_may_start_drag_ : 1;
224 224
225 Member<Node> mouse_press_node_; 225 Member<Node> mouse_press_node_;
226 226
227 int click_count_; 227 int click_count_;
228 Member<Node> click_node_; 228 Member<Element> click_element_;
229 229
230 IntPoint mouse_down_pos_; // In our view's coords. 230 IntPoint mouse_down_pos_; // In our view's coords.
231 TimeTicks mouse_down_timestamp_; 231 TimeTicks mouse_down_timestamp_;
232 WebMouseEvent mouse_down_; 232 WebMouseEvent mouse_down_;
233 233
234 LayoutPoint drag_start_pos_; 234 LayoutPoint drag_start_pos_;
235 235
236 TaskRunnerTimer<MouseEventManager> fake_mouse_move_event_timer_; 236 TaskRunnerTimer<MouseEventManager> fake_mouse_move_event_timer_;
237 }; 237 };
238 238
239 } // namespace blink 239 } // namespace blink
240 240
241 #endif // MouseEventManager_h 241 #endif // MouseEventManager_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698