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

Unified Diff: Source/core/html/HTMLLabelElement.cpp

Issue 722143002: Labels with user-select: none should pass events to control element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed Layout tests Created 6 years, 1 month 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 | « LayoutTests/fast/forms/label/selection-disabled-label-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLLabelElement.cpp
diff --git a/Source/core/html/HTMLLabelElement.cpp b/Source/core/html/HTMLLabelElement.cpp
index 04255f4ca9724d69b05aea06fc57f269ae7d39d9..a316aa94c2435b55167921096df5b8e846903f49 100644
--- a/Source/core/html/HTMLLabelElement.cpp
+++ b/Source/core/html/HTMLLabelElement.cpp
@@ -160,7 +160,7 @@ void HTMLLabelElement::defaultEventHandler(Event* evt)
if (LocalFrame* frame = document().frame()) {
// Check if there is a selection and click is not on the
// selection.
- if (frame->selection().isRange() && !frame->eventHandler().mouseDownWasSingleClickInSelection())
+ if (!Position::nodeIsUserSelectNone(this) && frame->selection().isRange() && !frame->eventHandler().mouseDownWasSingleClickInSelection())
isLabelTextSelected = true;
// If selection is there and is single click i.e. text is
// selected by dragging over label text, then return.
« no previous file with comments | « LayoutTests/fast/forms/label/selection-disabled-label-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698