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

Unified Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2001993002: [Editing][CSS] Drag from a -webkit-user-select:none element should not start selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/selection/mouse/drag_user_select_none.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index b6a7a56d31ed645f6b99c6b0f2a1318f155af947..0f3aba21711281ff91244caa1b85821f4d50c18a 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -973,9 +973,10 @@ bool Node::canStartSelection() const
if (layoutObject()) {
const ComputedStyle& style = layoutObject()->styleRef();
- // We allow selections to begin within an element that has -webkit-user-select: none set,
- // but if the element is draggable then dragging should take priority over selection.
- if (style.userDrag() == DRAG_ELEMENT && style.userSelect() == SELECT_NONE)
+ // We don't allow selections to begin within an element that has
+ // -webkit-user-select: none set,
+ // https://drafts.csswg.org/css-ui-4/#valdef-user-select-none
+ if (style.userSelect() == SELECT_NONE)
return false;
}
ContainerNode* parent = FlatTreeTraversal::parent(*this);
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/selection/mouse/drag_user_select_none.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698