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

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

Issue 1955963002: [Autofill] Send events to fields being autofilled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/HTMLTextFormControlElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
index b589dc52d771fec8f3f2d1de028c5bf3d666afd5..14e9e9c5cd2cc596709fcb32b382e79390c728f9 100644
--- a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
@@ -80,22 +80,6 @@ Node::InsertionNotificationRequest HTMLTextFormControlElement::insertedInto(Cont
return InsertionDone;
}
-void HTMLTextFormControlElement::dispatchFocusEvent(Element* oldFocusedElement, WebFocusType type, InputDeviceCapabilities* sourceCapabilities)
-{
- if (supportsPlaceholder())
- updatePlaceholderVisibility();
- handleFocusEvent(oldFocusedElement, type);
- HTMLFormControlElementWithState::dispatchFocusEvent(oldFocusedElement, type, sourceCapabilities);
-}
-
-void HTMLTextFormControlElement::dispatchBlurEvent(Element* newFocusedElement, WebFocusType type, InputDeviceCapabilities* sourceCapabilities)
-{
- if (supportsPlaceholder())
- updatePlaceholderVisibility();
- handleBlurEvent();
- HTMLFormControlElementWithState::dispatchBlurEvent(newFocusedElement, type, sourceCapabilities);
-}
-
void HTMLTextFormControlElement::defaultEventHandler(Event* event)
{
if (event->type() == EventTypeNames::webkitEditableContentChanged && layoutObject() && layoutObject()->isTextControl()) {
@@ -208,6 +192,22 @@ void HTMLTextFormControlElement::dispatchFormControlChangeEvent()
setChangedSinceLastFormControlChangeEvent(false);
}
+void HTMLTextFormControlElement::dispatchFocusEvent(Element* oldFocusedElement, WebFocusType type, InputDeviceCapabilities* sourceCapabilities)
+{
+ if (supportsPlaceholder())
+ updatePlaceholderVisibility();
+ handleFocusEvent(oldFocusedElement, type);
+ HTMLFormControlElementWithState::dispatchFocusEvent(oldFocusedElement, type, sourceCapabilities);
+}
+
+void HTMLTextFormControlElement::dispatchBlurEvent(Element* newFocusedElement, WebFocusType type, InputDeviceCapabilities* sourceCapabilities)
+{
+ if (supportsPlaceholder())
+ updatePlaceholderVisibility();
+ handleBlurEvent();
+ HTMLFormControlElementWithState::dispatchBlurEvent(newFocusedElement, type, sourceCapabilities);
+}
+
void HTMLTextFormControlElement::setRangeText(const String& replacement, ExceptionState& exceptionState)
{
setRangeText(replacement, selectionStart(), selectionEnd(), "preserve", exceptionState);

Powered by Google App Engine
This is Rietveld 408576698