This source file includes following definitions.
- interfaceName
- isFocusEvent
- m_relatedTarget
- m_relatedTarget
- trace
- create
- dispatchEvent
- create
- dispatchEvent
- create
- dispatchEvent
- create
- dispatchEvent
#include "config.h"
#include "core/events/FocusEvent.h"
#include "core/events/Event.h"
#include "core/events/EventDispatcher.h"
namespace WebCore {
FocusEventInit::FocusEventInit()
: relatedTarget(nullptr)
{
}
const AtomicString& FocusEvent::interfaceName() const
{
return EventNames::FocusEvent;
}
bool FocusEvent::isFocusEvent() const
{
return true;
}
FocusEvent::FocusEvent()
{
ScriptWrappable::init(this);
}
FocusEvent::FocusEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView> view, int detail, EventTarget* relatedTarget)
: UIEvent(type, canBubble, cancelable, view, detail)
, m_relatedTarget(relatedTarget)
{
ScriptWrappable::init(this);
}
FocusEvent::FocusEvent(const AtomicString& type, const FocusEventInit& initializer)
: UIEvent(type, initializer)
, m_relatedTarget(initializer.relatedTarget)
{
ScriptWrappable::init(this);
}
void FocusEvent::trace(Visitor* visitor)
{
UIEvent::trace(visitor);
}
PassRefPtr<FocusEventDispatchMediator> FocusEventDispatchMediator::create(PassRefPtrWillBeRawPtr<FocusEvent> focusEvent)
{
return adoptRef(new FocusEventDispatchMediator(focusEvent));
}
FocusEventDispatchMediator::FocusEventDispatchMediator(PassRefPtrWillBeRawPtr<FocusEvent> focusEvent)
: EventDispatchMediator(focusEvent)
{
}
bool FocusEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
{
event()->eventPath().adjustForRelatedTarget(dispatcher->node(), event()->relatedTarget());
return EventDispatchMediator::dispatchEvent(dispatcher);
}
PassRefPtr<BlurEventDispatchMediator> BlurEventDispatchMediator::create(PassRefPtrWillBeRawPtr<FocusEvent> focusEvent)
{
return adoptRef(new BlurEventDispatchMediator(focusEvent));
}
BlurEventDispatchMediator::BlurEventDispatchMediator(PassRefPtrWillBeRawPtr<FocusEvent> focusEvent)
: EventDispatchMediator(focusEvent)
{
}
bool BlurEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
{
event()->eventPath().adjustForRelatedTarget(dispatcher->node(), event()->relatedTarget());
return EventDispatchMediator::dispatchEvent(dispatcher);
}
PassRefPtr<FocusInEventDispatchMediator> FocusInEventDispatchMediator::create(PassRefPtrWillBeRawPtr<FocusEvent> focusEvent)
{
return adoptRef(new FocusInEventDispatchMediator(focusEvent));
}
FocusInEventDispatchMediator::FocusInEventDispatchMediator(PassRefPtrWillBeRawPtr<FocusEvent> focusEvent)
: EventDispatchMediator(focusEvent)
{
}
bool FocusInEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
{
event()->eventPath().adjustForRelatedTarget(dispatcher->node(), event()->relatedTarget());
return EventDispatchMediator::dispatchEvent(dispatcher);
}
PassRefPtr<FocusOutEventDispatchMediator> FocusOutEventDispatchMediator::create(PassRefPtrWillBeRawPtr<FocusEvent> focusEvent)
{
return adoptRef(new FocusOutEventDispatchMediator(focusEvent));
}
FocusOutEventDispatchMediator::FocusOutEventDispatchMediator(PassRefPtrWillBeRawPtr<FocusEvent> focusEvent)
: EventDispatchMediator(focusEvent)
{
}
bool FocusOutEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
{
event()->eventPath().adjustForRelatedTarget(dispatcher->node(), event()->relatedTarget());
return EventDispatchMediator::dispatchEvent(dispatcher);
}
}