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

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

Issue 2678683002: Delay instantiating InputDeviceCapabilities until accessed. (Closed)
Patch Set: rebased Created 3 years, 10 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
Index: third_party/WebKit/Source/core/html/HTMLLabelElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp b/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp
index 191e9c178e957426f41061892417ab03a85f7cd1..46a757fe7ea9df2e137560fd6846edd4cc22d1b6 100644
--- a/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp
@@ -189,9 +189,11 @@ void HTMLLabelElement::defaultEventHandler(Event* evt) {
// selection of label, only then focus the control element.
// In case of double click or triple click, selection will be there,
// so do not focus the control element.
- if (!isLabelTextSelected)
+ if (!isLabelTextSelected) {
element->focus(FocusParams(SelectionBehaviorOnFocus::Restore,
- WebFocusTypeMouse, nullptr));
+ WebFocusTypeMouse,
+ InputDeviceCapabilities::Null));
+ }
}
// Click the corresponding control.
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLInputElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698