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

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

Issue 1113323002: [Reland] Refactor the selection code in EventHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/SelectionController.cpp ('k') | Source/core/input/EventHandler.h » ('j') | 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 9ce04c8d5470991d0dcbec260154991a8beb3fef..90efefc4cf7d73f08efd4f757ee281f467901c47 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().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 | « Source/core/editing/SelectionController.cpp ('k') | Source/core/input/EventHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698