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

Unified Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2074423004: [InputEvent] Dispatch 'input' event for ContentEditable and typing on Input element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tkent's review Created 4 years, 6 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/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index a7f51f704a679c10db793f474762e3b0348a759a..67d63800116666258395b42aebaecc96ab17e67a 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -2110,13 +2110,8 @@ void Node::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEve
void Node::dispatchInputEvent()
{
- if (RuntimeEnabledFeatures::inputEventEnabled()) {
- InputEventInit eventInitDict;
- eventInitDict.setBubbles(true);
- dispatchScopedEvent(InputEvent::create(EventTypeNames::input, eventInitDict));
- } else {
- dispatchScopedEvent(Event::createBubble(EventTypeNames::input));
- }
+ // Legacy 'input' event for forms set value and checked.
+ dispatchScopedEvent(Event::createBubble(EventTypeNames::input));
}
void Node::defaultEventHandler(Event* event)
@@ -2165,7 +2160,10 @@ void Node::defaultEventHandler(Event* event)
}
#endif
} else if (event->type() == EventTypeNames::webkitEditableContentChanged) {
- dispatchInputEvent();
+ // TODO(chongz): Remove after shipped.
+ // New InputEvent are dispatched in Editor::appliedEditing, etc.
+ if (!RuntimeEnabledFeatures::inputEventEnabled())
+ dispatchInputEvent();
}
}

Powered by Google App Engine
This is Rietveld 408576698