DescriptionGenerate focusin for input type=date/time when selected by tab
setFocusedElement fails to generate focusin event as the element in focus changes.
This patch creates new handler for focusin event, which gets generated from handleFocusInEvent.
* Source/core/dom/Document.cpp
* Source/core/dom/Element.h
* Source/core/dom/Element.cpp
* Souce/core/page/FocusController.cpp
dispatchFocusInEvent passes extra parameter FocusType, as handleFocusInEvent needs this.
* Source/core/html/HTMLInputElement.h
* Source/core/html/HTMLInputElement.cpp
dispatchFocusInEvent, calls handleFocusInEvent handler when event is DOMFocusIn. Name of the function is handlerFocusInEvent, just in case if DOMFocusIn is deprecated only event used before dispatching handleFocusInEvent needs to be changed.
* Source/core/html/forms/InputTypeView.h
* Source/core/html/forms/InputTypeView.cpp
handleFocusInEvent call pass to the form.
* Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.h
* Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
Removed handleFocusEvent and moved its code to handleFocusInEvent handler.
BUG=408107
R=tkent, keishi
TEST=Test covering date and time field when moved into by pressing tab, generates focusin event.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182023
Patch Set 1 #Patch Set 2 : Added handleFocusInEvent handler for handling focus event for date/time input type #
Total comments: 6
Patch Set 3 : Moved code out of HTMLTextFormControlElement to HTMLInputElement #Patch Set 4 : Moved code to HTMLInputElement #
Total comments: 6
Patch Set 5 : Updated tests and removed handleFocusInEvent handler #
Total comments: 14
Patch Set 6 : Updated to latest master and updated test #Messages
Total messages: 17 (3 generated)
|