KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, DOMWindow* view) : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()) , true, true, key.timestamp(), view, 0, key.ctrlKey(), key.altKey(), key.shiftKey() , key.metaKey(), false, key.modifiers().contains(PlatformEvent::Modifier::CapsLockKey)) , m_keyEvent(std::make_unique<PlatformKeyboardEvent>(key)) #if ENABLE(KEYBOARD_KEY_ATTRIBUTE) , m_key(key.key()) #endif #if ENABLE(KEYBOARD_CODE_ATTRIBUTE) , m_code(key.code()) #endif , m_keyIdentifier(key.keyIdentifier()) , m_location(keyLocationCode(key)) , m_repeat(key.isAutoRepeat()) , m_isComposing(view && view->frame() && view->frame()->editor().hasComposition()) #if PLATFORM(COCOA) #if USE(APPKIT) , m_handledByInputMethod(key.handledByInputMethod()) , m_keypressCommands(key.commands()) #else , m_handledByInputMethod(false) #endif #endif { }
KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* view) : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), true, true, view, 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey()) , m_keyEvent(adoptPtr(new PlatformKeyboardEvent(key))) , m_keyIdentifier(key.keyIdentifier()) , m_keyLocation(key.isKeypad() ? DOM_KEY_LOCATION_NUMPAD : DOM_KEY_LOCATION_STANDARD) // FIXME: differentiate right/left, too , m_altGraphKey(false) { }
KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* view) : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), true, true, view, 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey()) , m_keyEvent(adoptPtr(new PlatformKeyboardEvent(key))) , m_keyIdentifier(key.keyIdentifier()) , m_location(keyLocationCode(key)) , m_altGraphKey(false) , m_isAutoRepeat(key.isAutoRepeat()) { ScriptWrappable::init(this); }
KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* view) : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), true, true, key.timestamp(), view, 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey()) , m_keyEvent(std::make_unique<PlatformKeyboardEvent>(key)) , m_keyIdentifier(key.keyIdentifier()) , m_location(keyLocationCode(key)) , m_altGraphKey(false) #if PLATFORM(COCOA) #if USE(APPKIT) , m_handledByInputMethod(key.handledByInputMethod()) , m_keypressCommands(key.commands()) #else , m_handledByInputMethod(false) #endif #endif { }
KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* view) : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), true, true, view, 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey(), InputDevice::doesntFireTouchEventsInputDevice()) , m_keyEvent(adoptPtr(new PlatformKeyboardEvent(key))) , m_keyIdentifier(key.keyIdentifier()) , m_code(key.code()) , m_key(key.key()) , m_location(keyLocationCode(key)) , m_isAutoRepeat(key.isAutoRepeat()) , m_bbIsNumLock(key.bbIsNumLock()) { setUICreateTime(key.timestamp()); }