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 0268776b4023981f52e778710c3ce24c0467b644..c32e3b8dd48d25f33c35c4df5c3434074d646405 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp |
@@ -186,7 +186,7 @@ void HTMLLabelElement::defaultEventHandler(Event* evt) |
// In case of double click or triple click, selection will be there, |
// so do not focus the control element. |
if (!isLabelTextSelected) |
- element->focus(true, WebFocusTypeMouse); |
+ element->focus(FocusParams(SelectionBehaviorOnFocus::Restore, WebFocusTypeMouse, nullptr)); |
} |
// Click the corresponding control. |
@@ -208,13 +208,13 @@ bool HTMLLabelElement::willRespondToMouseClickEvents() |
return HTMLElement::willRespondToMouseClickEvents(); |
} |
-void HTMLLabelElement::focus(bool, WebFocusType type, InputDeviceCapabilities* sourceCapabilities) |
+void HTMLLabelElement::focus(const FocusParams& params) |
{ |
// to match other browsers, always restore previous selection |
if (HTMLElement* element = control()) |
- element->focus(true, type, sourceCapabilities); |
+ element->focus(FocusParams(SelectionBehaviorOnFocus::Restore, params.type, params.sourceCapabilities)); |
if (isFocusable()) |
- HTMLElement::focus(true, type, sourceCapabilities); |
+ HTMLElement::focus(params); |
} |
void HTMLLabelElement::accessKeyAction(bool sendMouseEvents) |