Index: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp |
index c1b513711c3747b6df2204199d5be67d57f4eaf1..adf6b0ad4f5aa0e14e6b3fc75f6714a7d745c723 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp |
@@ -1103,27 +1103,6 @@ int HTMLSelectElement::listToOptionIndex(int listIndex) const |
return optionIndex; |
} |
-void HTMLSelectElement::dispatchFocusEvent(Element* oldFocusedElement, WebFocusType type, InputDeviceCapabilities* sourceCapabilities) |
-{ |
- // Save the selection so it can be compared to the new selection when |
- // dispatching change events during blur event dispatch. |
- if (usesMenuList()) |
- saveLastSelection(); |
- HTMLFormControlElementWithState::dispatchFocusEvent(oldFocusedElement, type, sourceCapabilities); |
-} |
- |
-void HTMLSelectElement::dispatchBlurEvent(Element* newFocusedElement, WebFocusType type, InputDeviceCapabilities* sourceCapabilities) |
-{ |
- m_typeAhead.resetSession(); |
- // We only need to fire change events here for menu lists, because we fire |
- // change events for list boxes whenever the selection change is actually |
- // made. This matches other browsers' behavior. |
- if (usesMenuList()) |
- dispatchInputAndChangeEventForMenuList(); |
- m_lastOnChangeSelection.clear(); |
- HTMLFormControlElementWithState::dispatchBlurEvent(newFocusedElement, type, sourceCapabilities); |
-} |
- |
void HTMLSelectElement::deselectItemsWithoutValidation(HTMLElement* excludeElement) |
{ |
for (auto& element : listItems()) { |
@@ -1989,4 +1968,25 @@ void HTMLSelectElement::resetTypeAheadSessionForTesting() |
m_typeAhead.resetSession(); |
} |
+void HTMLSelectElement::dispatchFocusEvent(Element* oldFocusedElement, WebFocusType type, InputDeviceCapabilities* sourceCapabilities) |
+{ |
+ // Save the selection so it can be compared to the new selection when |
+ // dispatching change events during blur event dispatch. |
+ if (usesMenuList()) |
+ saveLastSelection(); |
+ HTMLFormControlElementWithState::dispatchFocusEvent(oldFocusedElement, type, sourceCapabilities); |
+} |
+ |
+void HTMLSelectElement::dispatchBlurEvent(Element* newFocusedElement, WebFocusType type, InputDeviceCapabilities* sourceCapabilities) |
+{ |
+ m_typeAhead.resetSession(); |
+ // We only need to fire change events here for menu lists, because we fire |
+ // change events for list boxes whenever the selection change is actually |
+ // made. This matches other browsers' behavior. |
+ if (usesMenuList()) |
+ dispatchInputAndChangeEventForMenuList(); |
+ m_lastOnChangeSelection.clear(); |
+ HTMLFormControlElementWithState::dispatchBlurEvent(newFocusedElement, type, sourceCapabilities); |
+} |
+ |
} // namespace blink |