void KeyboardEvent::initKeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, const String &keyIdentifier, unsigned keyLocation, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey) { if (dispatched()) return; initUIEvent(type, canBubble, cancelable, view, 0); m_keyIdentifier = keyIdentifier; m_keyLocation = keyLocation; m_ctrlKey = ctrlKey; m_shiftKey = shiftKey; m_altKey = altKey; m_metaKey = metaKey; m_altGraphKey = altGraphKey; }
void GestureEvent::initGestureEvent(const AtomicString& type, PassRefPtr<AbstractView> view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, float deltaX, float deltaY) { if (dispatched()) return; initUIEvent(type, true, true, view, 0); m_screenLocation = IntPoint(screenX, screenY); m_ctrlKey = ctrlKey; m_altKey = altKey; m_shiftKey = shiftKey; m_metaKey = metaKey; m_deltaX = deltaX; m_deltaY = deltaY; initCoordinates(IntPoint(clientX, clientY)); }
void TouchEvent::initTouchEvent(TouchList* touches, TouchList* targetTouches, TouchList* changedTouches, const AtomicString& type, PassRefPtr<AbstractView> view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) { if (dispatched()) return; initUIEvent(type, true, true, view, 0); m_screenX = screenX; m_screenY = screenY; m_ctrlKey = ctrlKey; m_altKey = altKey; m_shiftKey = shiftKey; m_metaKey = metaKey; initCoordinates(clientX, clientY); }
void KeyboardEvent::initKeyboardEvent(ScriptState* scriptState, const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, const String& keyIdentifier, unsigned location, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) { if (dispatched()) return; if (scriptState->world().isIsolatedWorld()) UIEventWithKeyState::didCreateEventInIsolatedWorld(ctrlKey, altKey, shiftKey, metaKey); initUIEvent(type, canBubble, cancelable, view, 0); m_keyIdentifier = keyIdentifier; m_location = location; m_ctrlKey = ctrlKey; m_shiftKey = shiftKey; m_altKey = altKey; m_metaKey = metaKey; }
void WheelEvent::initWheelEvent(int wheelDeltaX, int wheelDeltaY, PassRefPtr<AbstractView> view, int screenX, int screenY, int pageX, int pageY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) { if (dispatched()) return; initUIEvent(eventNames().mousewheelEvent, true, true, view, 0); m_screenX = screenX; m_screenY = screenY; m_ctrlKey = ctrlKey; m_altKey = altKey; m_shiftKey = shiftKey; m_metaKey = metaKey; m_wheelDeltaX = wheelDeltaX; m_wheelDeltaY = wheelDeltaY; initCoordinates(pageX, pageY); }
void TouchEvent::initTouchEvent(TouchList* touches, TouchList* targetTouches, TouchList* changedTouches, const AtomicString& type, DOMWindow* view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) { if (dispatched()) return; initUIEvent(type, true, true, view, 0); m_touches = touches; m_targetTouches = targetTouches; m_changedTouches = changedTouches; m_screenLocation = IntPoint(screenX, screenY); m_ctrlKey = ctrlKey; m_altKey = altKey; m_shiftKey = shiftKey; m_metaKey = metaKey; initCoordinates(IntPoint(clientX, clientY)); }
void WheelEvent::initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<AbstractView> view, int screenX, int screenY, int pageX, int pageY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) { if (dispatched()) return; initUIEvent(eventNames().wheelEvent, true, true, view, 0); m_screenLocation = IntPoint(screenX, screenY); m_ctrlKey = ctrlKey; m_altKey = altKey; m_shiftKey = shiftKey; m_metaKey = metaKey; // Normalize to 120 multiple for compatibility with IE. m_wheelDelta = IntPoint(rawDeltaX * TickMultiplier, rawDeltaY * TickMultiplier); m_deltaX = -rawDeltaX; m_deltaY = -rawDeltaY; m_deltaMode = DOM_DELTA_PIXEL; initCoordinates(IntPoint(pageX, pageY)); }
void WheelEvent::initWheelEvent(int rawDeltaX, int rawDeltaY, DOMWindow* view, int screenX, int screenY, int pageX, int pageY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) { if (dispatched()) return; initUIEvent(eventNames().wheelEvent, true, true, view, 0); m_screenLocation = { screenX, screenY }; m_ctrlKey = ctrlKey; m_altKey = altKey; m_shiftKey = shiftKey; m_metaKey = metaKey; // Normalize to 120 multiple for compatibility with IE. m_wheelDelta = { rawDeltaX * TickMultiplier, rawDeltaY * TickMultiplier }; m_deltaX = -rawDeltaX; m_deltaY = -rawDeltaY; m_deltaMode = DOM_DELTA_PIXEL; initCoordinates({ pageX, pageY }); }
void WheelEvent::initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<AbstractView> view, int screenX, int screenY, int pageX, int pageY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) { if (dispatched()) return; initUIEvent(eventNames().wheelEvent, true, true, view, 0); m_screenLocation = IntPoint(screenX, screenY); m_ctrlKey = ctrlKey; m_altKey = altKey; m_shiftKey = shiftKey; m_metaKey = metaKey; m_wheelDelta = IntPoint(rawDeltaX * TickMultiplier, rawDeltaY * TickMultiplier); m_deltaX = -rawDeltaX; m_deltaY = -rawDeltaY; m_deltaMode = DOM_DELTA_PIXEL; m_directionInvertedFromDevice = false; initCoordinates(IntPoint(pageX, pageY)); }
void TouchEvent::initTouchEvent(TouchList* touches, TouchList* targetTouches, TouchList* changedTouches, const AtomicString& type, PassRefPtrWillBeRawPtr<AbstractView> view, int, int, int, int, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) { if (dispatched()) return; bool cancelable = true; if (type == EventTypeNames::touchcancel) cancelable = false; initUIEvent(type, true, cancelable, view, 0); m_touches = touches; m_targetTouches = targetTouches; m_changedTouches = changedTouches; m_ctrlKey = ctrlKey; m_altKey = altKey; m_shiftKey = shiftKey; m_metaKey = metaKey; }
void WheelEvent::initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<AbstractView> view, int screenX, int screenY, int pageX, int pageY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) { if (dispatched()) return; initUIEvent(eventNames().mousewheelEvent, true, true, view, 0); m_screenLocation = IntPoint(screenX, screenY); m_ctrlKey = ctrlKey; m_altKey = altKey; m_shiftKey = shiftKey; m_metaKey = metaKey; // Normalize to the Windows 120 multiple m_wheelDelta = IntPoint(rawDeltaX * 120, rawDeltaY * 120); m_rawDelta = IntPoint(rawDeltaX, rawDeltaY); m_granularity = Pixel; initCoordinates(IntPoint(pageX, pageY)); }
void MouseEvent::initMouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView> view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, PassRefPtr<EventTarget> relatedTarget) { if (dispatched()) return; initUIEvent(type, canBubble, cancelable, view, detail); m_screenLocation = IntPoint(screenX, screenY); m_ctrlKey = ctrlKey; m_altKey = altKey; m_shiftKey = shiftKey; m_metaKey = metaKey; m_button = button == (unsigned short)-1 ? 0 : button; m_buttonDown = button != (unsigned short)-1; m_relatedTarget = relatedTarget; initCoordinates(IntPoint(clientX, clientY)); // FIXME: m_isSimulated is not set to false here. // FIXME: m_clipboard is not set to 0 here. }
void KeyboardEventImp::initKeyboardEvent(const std::u16string& typeArg, bool canBubbleArg, bool cancelableArg, html::Window viewArg, const std::u16string& charArg, const std::u16string& keyArg, unsigned int locationArg, const std::u16string& modifiersListArg, bool repeat, const std::u16string& localeArg) { // TODO: implement me! initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, 0); }