[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:16:29 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b9e41f0b59da6a6d7006365ab93eab1ab7f7aab0
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 6 03:58:10 2010 +0000
2010-10-05 Kyusun Kim <maniagoon at company100.net>
Reviewed by Kent Tamura.
[BREWMP] Translate key code in PlatformKeyboardEvent with IKeysMapping
https://bugs.webkit.org/show_bug.cgi?id=47234
Brew MP devices have a variey of key configurations and use modifiers to
input capital letters, symbols and special characters. Use IKeysMapping to translate key code.
* platform/brew/PlatformKeyboardEventBrew.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c6afca8..3cb175d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-05 Kyusun Kim <maniagoon at company100.net>
+
+ Reviewed by Kent Tamura.
+
+ [BREWMP] Translate key code in PlatformKeyboardEvent with IKeysMapping
+ https://bugs.webkit.org/show_bug.cgi?id=47234
+
+ Brew MP devices have a variey of key configurations and use modifiers to
+ input capital letters, symbols and special characters. Use IKeysMapping to translate key code.
+
+ * platform/brew/PlatformKeyboardEventBrew.cpp:
+ (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
+
2010-10-05 W. James MacLean <wjmaclean at chromium.org>
Reviewed by James Robinson.
diff --git a/WebCore/platform/brew/PlatformKeyboardEventBrew.cpp b/WebCore/platform/brew/PlatformKeyboardEventBrew.cpp
index 3384a4f..8166145 100644
--- a/WebCore/platform/brew/PlatformKeyboardEventBrew.cpp
+++ b/WebCore/platform/brew/PlatformKeyboardEventBrew.cpp
@@ -30,9 +30,14 @@
#include "WindowsKeyboardCodes.h"
#include <AEEEvent.h>
+#include <AEEIKeysMapping.h>
+#include <AEEKeysMapping.bid>
#include <AEEStdDef.h>
#include <AEEVCodes.h>
+#include <wtf/brew/RefPtrBrew.h>
+#include <wtf/brew/ShellBrew.h>
+
namespace WebCore {
static String keyIdentifierForBrewKeyCode(uint16 keyCode)
@@ -148,18 +153,25 @@ static inline String singleCharacterString(UChar c)
PlatformKeyboardEvent::PlatformKeyboardEvent(AEEEvent event, uint16 code, uint32 modifiers, Type type)
: m_type(type)
- , m_text((type == Char) ? singleCharacterString(code) : String())
- , m_unmodifiedText((type == Char) ? singleCharacterString(code) : String())
- , m_keyIdentifier((type == Char) ? String() : keyIdentifierForBrewKeyCode(code))
- , m_autoRepeat(modifiers & KB_AUTOREPEAT)
- , m_windowsVirtualKeyCode((type == RawKeyDown || type == KeyUp) ? windowsKeyCodeForKeyEvent(code) : 0)
- , m_nativeVirtualKeyCode(code)
, m_isKeypad(false)
- , m_shiftKey(modifiers & (KB_LSHIFT | KB_RSHIFT))
- , m_ctrlKey(modifiers & (KB_LCTRL | KB_RCTRL))
- , m_altKey(modifiers & (KB_LALT | KB_RALT))
, m_metaKey(false)
+ , m_windowsVirtualKeyCode((type == RawKeyDown || type == KeyUp) ? windowsKeyCodeForKeyEvent(code) : 0)
{
+ if ((m_type == Char) && modifiers) {
+ PlatformRefPtr<IKeysMapping> keysMapping = createRefPtrInstance<IKeysMapping>(AEECLSID_KeysMapping);
+ int result = IKeysMapping_GetMapping(keysMapping.get(), code, modifiers, reinterpret_cast<AECHAR*>(&code));
+ if (result == AEE_SUCCESS) // Reset the modifier when key code is successfully mapped.
+ modifiers = 0;
+ }
+
+ m_text = (type == Char) ? singleCharacterString(code) : String();
+ m_unmodifiedText = (type == Char) ? singleCharacterString(code) : String();
+ m_keyIdentifier = (type == Char) ? String() : keyIdentifierForBrewKeyCode(code);
+ m_nativeVirtualKeyCode = code;
+ m_autoRepeat = modifiers & KB_AUTOREPEAT;
+ m_shiftKey = modifiers & (KB_LSHIFT | KB_RSHIFT);
+ m_ctrlKey = modifiers & (KB_LCTRL | KB_RCTRL);
+ m_altKey = modifiers & (KB_LALT | KB_RALT);
}
void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list