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

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

Issue 2833733002: Avoid firing load events on style elements if there is no listeners for that (Closed)
Patch Set: fix style Created 3 years, 8 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 590efffb3498db22221d9fab21dcdcc65cbe154d..8ab97caba8d63e42d27c33ffa69334f74f9b90dc 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -1867,7 +1867,7 @@ void Node::DidMoveToNewDocument(Document& old_document) {
event_target_data->event_listener_map;
if (!listener_map.IsEmpty()) {
for (const auto& type : listener_map.EventTypes())
- GetDocument().AddListenerTypeIfNeeded(type);
+ GetDocument().AddListenerTypeIfNeeded(type, *this);
}
}
@@ -1894,7 +1894,7 @@ void Node::DidMoveToNewDocument(Document& old_document) {
void Node::AddedEventListener(const AtomicString& event_type,
RegisteredEventListener& registered_listener) {
EventTarget::AddedEventListener(event_type, registered_listener);
- GetDocument().AddListenerTypeIfNeeded(event_type);
+ GetDocument().AddListenerTypeIfNeeded(event_type, *this);
if (Page* page = GetDocument().GetPage())
page->GetEventHandlerRegistry().DidAddEventHandler(
*this, event_type, registered_listener.Options());

Powered by Google App Engine
This is Rietveld 408576698