Chromium Code Reviews| Index: Source/core/html/HTMLLabelElement.cpp |
| diff --git a/Source/core/html/HTMLLabelElement.cpp b/Source/core/html/HTMLLabelElement.cpp |
| index 8900abd58a74bd22187bfa7b0b5f4460410f3b96..9fb3d825d058c56821984725824f397b2aaceb4f 100644 |
| --- a/Source/core/html/HTMLLabelElement.cpp |
| +++ b/Source/core/html/HTMLLabelElement.cpp |
| @@ -29,6 +29,7 @@ |
| #include "core/dom/Document.h" |
| #include "core/dom/ElementTraversal.h" |
| #include "core/editing/FrameSelection.h" |
| +#include "core/editing/SelectionController.h" |
| #include "core/events/MouseEvent.h" |
| #include "core/frame/LocalFrame.h" |
| #include "core/html/FormAssociatedElement.h" |
| @@ -160,7 +161,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 (!Position::nodeIsUserSelectNone(this) && frame->selection().isRange() && !frame->eventHandler().mouseDownWasSingleClickInSelection()) |
| + if (!Position::nodeIsUserSelectNone(this) && frame->selection().isRange() && !frame->eventHandler().selectionController().singleClickInSelection()) |
|
yosin_UTC9
2015/05/20 02:27:37
We may want to re-factor this fragment in another
Miyoung Shin(g)
2015/05/20 15:53:40
Ok. I will check this code.
|
| isLabelTextSelected = true; |
| // If selection is there and is single click i.e. text is |
| // selected by dragging over label text, then return. |