Bug 1412775 - Implement Event.composedPath

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 07:30:43 -04:00 committed by Roy Tam
commit 2ee3ce62fc
24 changed files with 194 additions and 131 deletions

View file

@ -11,6 +11,7 @@
#include "mozilla/dom/ShadowRoot.h"
#include "mozilla/ContentEvents.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventStateManager.h"
#include "mozilla/InternalMutationEvent.h"
#include "mozilla/dom/Performance.h"
@ -298,6 +299,12 @@ Event::GetCurrentTarget() const
return mEvent->GetCurrentDOMEventTarget();
}
void
Event::ComposedPath(nsTArray<RefPtr<EventTarget>>& aPath)
{
EventDispatcher::GetComposedPathFor(mEvent, aPath);
}
NS_IMETHODIMP
Event::GetCurrentTarget(nsIDOMEventTarget** aCurrentTarget)
{