void MouseOrFocusEventContext::handleLocalEvents(Event* event) const { ASSERT(event->isMouseEvent() || event->isFocusEvent()); if (m_relatedTarget.get() && event->isMouseEvent()) toMouseEvent(event)->setRelatedTarget(m_relatedTarget.get()); else if (m_relatedTarget.get() && event->isFocusEvent()) toFocusEvent(event)->setRelatedTarget(m_relatedTarget.get()); EventContext::handleLocalEvents(event); }
void MouseOrFocusEventContext::handleLocalEvents(Event& event) const { ASSERT(event.isMouseEvent() || event.isFocusEvent()); if (m_relatedTarget) { if (event.isMouseEvent()) toMouseEvent(event).setRelatedTarget(m_relatedTarget.get()); else if (event.isFocusEvent()) toFocusEvent(event).setRelatedTarget(m_relatedTarget.get()); } EventContext::handleLocalEvents(event); }
void EventContext::handleLocalEvents(Event* event) const { if (m_touchEventContext) { m_touchEventContext->handleLocalEvents(event); } else if (m_relatedTarget && event->isMouseEvent()) { toMouseEvent(event)->setRelatedTarget(m_relatedTarget.get()); } else if (m_relatedTarget && event->isFocusEvent()) { toFocusEvent(event)->setRelatedTarget(m_relatedTarget.get()); } event->setTarget(m_target); event->setCurrentTarget(m_currentTarget.get()); m_node->handleLocalEvents(event); }