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

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

Issue 2536083002: SelectionAutoscroll should not happen in user-select:none. (Closed)
Patch Set: Add test. Created 4 years 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/LayoutTests/fast/events/autoscroll-disabled-user-select-none.html ('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"
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 return WebInputEventResult::NotHandled; 726 return WebInputEventResult::NotHandled;
727 727
728 layoutObject = parent->layoutObject(); 728 layoutObject = parent->layoutObject();
729 if (!layoutObject || !layoutObject->isListBox()) 729 if (!layoutObject || !layoutObject->isListBox())
730 return WebInputEventResult::NotHandled; 730 return WebInputEventResult::NotHandled;
731 } 731 }
732 732
733 m_mouseDownMayStartDrag = false; 733 m_mouseDownMayStartDrag = false;
734 734
735 if (m_mouseDownMayStartAutoscroll && 735 if (m_mouseDownMayStartAutoscroll &&
736 !m_scrollManager->middleClickAutoscrollInProgress()) { 736 !m_scrollManager->middleClickAutoscrollInProgress() &&
737 layoutObject->isSelectable()) {
bokan 2016/12/02 17:32:38 Selection is created/added by the call below to ha
sunyunjia 2016/12/04 22:46:43 Done.
737 if (AutoscrollController* controller = 738 if (AutoscrollController* controller =
738 m_scrollManager->autoscrollController()) { 739 m_scrollManager->autoscrollController()) {
739 controller->startAutoscrollForSelection(layoutObject); 740 controller->startAutoscrollForSelection(layoutObject);
740 m_mouseDownMayStartAutoscroll = false; 741 m_mouseDownMayStartAutoscroll = false;
741 } 742 }
742 } 743 }
743 744
744 m_frame->eventHandler().selectionController().handleMouseDraggedEvent( 745 m_frame->eventHandler().selectionController().handleMouseDraggedEvent(
745 event, m_mouseDownPos, m_dragStartPos, m_mousePressNode.get(), 746 event, m_mouseDownPos, m_dragStartPos, m_mousePressNode.get(),
746 m_lastKnownMousePosition); 747 m_lastKnownMousePosition);
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 992
992 void MouseEventManager::setClickCount(int clickCount) { 993 void MouseEventManager::setClickCount(int clickCount) {
993 m_clickCount = clickCount; 994 m_clickCount = clickCount;
994 } 995 }
995 996
996 bool MouseEventManager::mouseDownMayStartDrag() { 997 bool MouseEventManager::mouseDownMayStartDrag() {
997 return m_mouseDownMayStartDrag; 998 return m_mouseDownMayStartDrag;
998 } 999 }
999 1000
1000 } // namespace blink 1001 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/autoscroll-disabled-user-select-none.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698