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

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

Issue 2491233002: Make UA DOMActivate events composed events (Closed)
Patch Set: wip Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/events/Event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ff6ea84d894d79898f1a2c7d1a6ffe44d7530c17..8e03757a7b383d7a29d0d3369f96b5f2325b8017 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -2095,14 +2095,15 @@ void Node::dispatchSubtreeModifiedEvent() {
}
DispatchEventResult Node::dispatchDOMActivateEvent(int detail,
- Event* underlyingEvent) {
+ Event& underlyingEvent) {
#if DCHECK_IS_ON()
DCHECK(!EventDispatchForbiddenScope::isEventDispatchForbidden());
#endif
UIEvent* event = UIEvent::create();
event->initUIEvent(EventTypeNames::DOMActivate, true, true,
document().domWindow(), detail);
- event->setUnderlyingEvent(underlyingEvent);
+ event->setUnderlyingEvent(&underlyingEvent);
+ event->setComposed(underlyingEvent.composed());
dispatchScopedEvent(event);
// TODO(dtapuska): Dispatching scoped events shouldn't check the return
@@ -2146,7 +2147,7 @@ void Node::defaultEventHandler(Event* event) {
} else if (eventType == EventTypeNames::click) {
int detail =
event->isUIEvent() ? static_cast<UIEvent*>(event)->detail() : 0;
- if (dispatchDOMActivateEvent(detail, event) !=
+ if (dispatchDOMActivateEvent(detail, *event) !=
DispatchEventResult::NotCanceled)
event->setDefaultHandled();
} else if (eventType == EventTypeNames::contextmenu) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/events/Event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698