Beispiel #1
0
MouseEvent::MouseEvent(const AtomicString& eventType,
                       const MouseEventInit& initializer)
    : MouseRelatedEvent(eventType, initializer),
      m_button(initializer.button()),
      m_buttons(initializer.buttons()),
      m_relatedTarget(initializer.relatedTarget()),
      m_syntheticEventType(PlatformMouseEvent::RealOrIndistinguishable),
      m_region(initializer.region()) {}
Beispiel #2
0
MouseEvent::MouseEvent(const AtomicString& eventType, const MouseEventInit& initializer)
    : MouseRelatedEvent(eventType, initializer.bubbles(), initializer.cancelable(), initializer.view(), initializer.detail(), IntPoint(initializer.screenX(), initializer.screenY()),
        IntPoint(0 /* pageX */, 0 /* pageY */),
        IntPoint(0 /* movementX */, 0 /* movementY */),
        initializer.ctrlKey(), initializer.altKey(), initializer.shiftKey(), initializer.metaKey(), false /* isSimulated */)
    , m_button(initializer.button() == (unsigned short)-1 ? 0 : initializer.button())
    , m_buttons(initializer.buttons())
    , m_buttonDown(initializer.button() != (unsigned short)-1)
    , m_relatedTarget(initializer.relatedTarget())
    , m_dataTransfer(nullptr)
    , m_syntheticEventType(PlatformMouseEvent::RealOrIndistinguishable)
{
    initCoordinates(IntPoint(initializer.clientX(), initializer.clientY()));
}