| 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 c064d720b68cff946929e817ea6c295611267688..d2ebd7fef9aa6ceb974f99a36bb4382d4a82b69d 100644
|
| --- a/third_party/WebKit/Source/core/events/Event.cpp
|
| +++ b/third_party/WebKit/Source/core/events/Event.cpp
|
| @@ -327,10 +327,14 @@ HeapVector<Member<EventTarget>> Event::pathInternal(ScriptState* scriptState,
|
| NOTREACHED();
|
| }
|
|
|
| - // Returns [window] for events that are directly dispatched to the window object;
|
| - // e.g., window.load, pageshow, etc.
|
| - if (LocalDOMWindow* window = m_currentTarget->toLocalDOMWindow())
|
| + if (LocalDOMWindow* window = m_currentTarget->toLocalDOMWindow()) {
|
| + if (m_eventPath && !m_eventPath->isEmpty()) {
|
| + return m_eventPath->topNodeEventContext()
|
| + .treeScopeEventContext()
|
| + .ensureEventPath(*m_eventPath);
|
| + }
|
| return HeapVector<Member<EventTarget>>(1, window);
|
| + }
|
|
|
| return HeapVector<Member<EventTarget>>();
|
| }
|
|
|