[WPE] Use WPE key symbols and new API instead of xkbcommon and the key mapper
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Aug 2018 09:16:18 +0000 (09:16 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Aug 2018 09:16:18 +0000 (09:16 +0000)
commitf4a88dfcff6eddf4a9af6ca1da96b824c173c74b
treee3848dd49aefcfc995a9af23ca560d52024af612
parentbf3617bc9c28dcce15429078b16422bc5c675c3f
[WPE] Use WPE key symbols and new API instead of xkbcommon and the key mapper
https://bugs.webkit.org/show_bug.cgi?id=188093

Reviewed by Žan Doberšek.

Source/WebCore:

Add helper functions to get key code, hardware key code, key identifier and windows key code from a WPE key symbol.

* platform/PlatformKeyboardEvent.h:
* platform/wpe/PlatformKeyboardEventWPE.cpp:
(WebCore::PlatformKeyboardEvent::keyValueForWPEKeyCode):
(WebCore::PlatformKeyboardEvent::keyCodeForHardwareKeyCode):
(WebCore::PlatformKeyboardEvent::keyIdentifierForWPEKeyCode):
(WebCore::PlatformKeyboardEvent::windowsKeyCodeForWPEKeyCode):
(WebCore::PlatformKeyboardEvent::singleCharacterString):

Source/WebKit:

* Shared/WebEvent.h: Add WebKeyboardEvent constructor for WPE.
* Shared/WebKeyboardEvent.cpp:
(WebKit::WebKeyboardEvent::WebKeyboardEvent): WebKeyboardEvent constructor for WPE.
* Shared/wpe/WebEventFactory.cpp:
(WebKit::isWPEKeyCodeFromKeyPad): Helper tpo check if a key symbols is from key pad.
(WebKit::WebEventFactory::createWebKeyboardEvent): Use PlatformKeyboardEvent API to provide key code, hardware
key code, key identifier and windows key code to WebKeyboardEvent.
* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::m_backend): Use WPE key symbols.

Tools:

* MiniBrowser/wpe/main.cpp: Use WPE key symbols.
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
(WTR::wpeKeySymForKeyRef): Use WPE key symbols and wpe_unicode_to_key_code().
(WTR::EventSenderProxy::keyDown): Do not set unicode char to the event since it was removed.
* flatpak/org.webkit.WPE.yaml: Bump WPEBackend and WPEBackend-fdo versions.
* wpe/backends/WindowViewBackend.cpp:
(WPEToolingBackends::WindowViewBackend::handleKeyEvent): Do not set unicode char to the event since it was removed.
* wpe/jhbuild.modules: Bump WPEBackend and WPEBackend-fdo versions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/PlatformKeyboardEvent.h
Source/WebCore/platform/wpe/PlatformKeyboardEventWPE.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebEvent.h
Source/WebKit/Shared/WebKeyboardEvent.cpp
Source/WebKit/Shared/wpe/WebEventFactory.cpp
Source/WebKit/UIProcess/API/wpe/WPEView.cpp
Tools/ChangeLog
Tools/MiniBrowser/wpe/main.cpp
Tools/WebKitTestRunner/wpe/EventSenderProxyWPE.cpp
Tools/flatpak/org.webkit.WPE.yaml
Tools/wpe/backends/WindowViewBackend.cpp
Tools/wpe/jhbuild.modules