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

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

Issue 2911413002: Disable drag and drop when we use stylus on Windows (Closed)
Patch Set: Created 3 years, 6 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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 // the next mouse release event seen by the EventHandler. 748 // the next mouse release event seen by the EventHandler.
749 // 3. When pressing Esc key while dragging and the object is outside of the 749 // 3. When pressing Esc key while dragging and the object is outside of the
750 // we get a mouse leave event here 750 // we get a mouse leave event here
751 if (event.Event().button != WebPointerProperties::Button::kLeft || 751 if (event.Event().button != WebPointerProperties::Button::kLeft ||
752 event.Event().GetType() == WebInputEvent::kMouseLeave) 752 event.Event().GetType() == WebInputEvent::kMouseLeave)
753 mouse_pressed_ = false; 753 mouse_pressed_ = false;
754 754
755 if (!mouse_pressed_) 755 if (!mouse_pressed_)
756 return WebInputEventResult::kNotHandled; 756 return WebInputEventResult::kNotHandled;
757 757
758 if (event.Event().pointer_type ==
759 blink::WebPointerProperties::PointerType::kPen)
760 return WebInputEventResult::kNotHandled;
761
758 if (HandleDrag(event, DragInitiator::kMouse)) 762 if (HandleDrag(event, DragInitiator::kMouse))
759 return WebInputEventResult::kHandledSystem; 763 return WebInputEventResult::kHandledSystem;
760 764
761 Node* target_node = event.InnerNode(); 765 Node* target_node = event.InnerNode();
762 if (!target_node) 766 if (!target_node)
763 return WebInputEventResult::kNotHandled; 767 return WebInputEventResult::kNotHandled;
764 768
765 LayoutObject* layout_object = target_node->GetLayoutObject(); 769 LayoutObject* layout_object = target_node->GetLayoutObject();
766 if (!layout_object) { 770 if (!layout_object) {
767 Node* parent = FlatTreeTraversal::Parent(*target_node); 771 Node* parent = FlatTreeTraversal::Parent(*target_node);
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 1087
1084 void MouseEventManager::SetClickCount(int click_count) { 1088 void MouseEventManager::SetClickCount(int click_count) {
1085 click_count_ = click_count; 1089 click_count_ = click_count;
1086 } 1090 }
1087 1091
1088 bool MouseEventManager::MouseDownMayStartDrag() { 1092 bool MouseEventManager::MouseDownMayStartDrag() {
1089 return mouse_down_may_start_drag_; 1093 return mouse_down_may_start_drag_;
1090 } 1094 }
1091 1095
1092 } // namespace blink 1096 } // 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