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

Unified Diff: third_party/WebKit/Source/core/events/Event.cpp

Issue 1897953004: Report passive prevent defaulted event listeners correctly to the console. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/events/Event.cpp
diff --git a/third_party/WebKit/Source/core/events/Event.cpp b/third_party/WebKit/Source/core/events/Event.cpp
index 9177b507d1ed70182052d95199034ef7e5c4ebc5..99663663441a8692e69e4b8b0b9572ef623e8e0c 100644
--- a/third_party/WebKit/Source/core/events/Event.cpp
+++ b/third_party/WebKit/Source/core/events/Event.cpp
@@ -231,7 +231,7 @@ bool Event::isBeforeUnloadEvent() const
void Event::preventDefault()
{
if (m_handlingPassive) {
- const LocalDOMWindow* window = m_currentTarget ? m_currentTarget->toDOMWindow() : 0;
+ const LocalDOMWindow* window = m_eventPath ? m_eventPath->windowEventContext().window() : 0;
if (window)
window->printErrorMessage("Unable to preventDefault inside passive event listener invocation.");
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698