summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webwidget_impl.cc
diff options
context:
space:
mode:
authorxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 18:04:38 +0000
committerxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 18:04:38 +0000
commit2e63183c36ee22e7c3c470cfcf49c9266016dc21 (patch)
treed9a901ba07dd0563e2e4b48c72aa02e85eabcd4a /webkit/glue/webwidget_impl.cc
parent88bf664eb388730acafedfc27e80726ed4789515 (diff)
downloadchromium_src-2e63183c36ee22e7c3c470cfcf49c9266016dc21.zip
chromium_src-2e63183c36ee22e7c3c470cfcf49c9266016dc21.tar.gz
chromium_src-2e63183c36ee22e7c3c470cfcf49c9266016dc21.tar.bz2
This CL fixes issue 8052 - Keyboard selection in Hebrew select element doesn't work
The fix consists of 2 parts: The 1st part is in WebKit/WebCore/platform/chromium/PopupMenuChromimu.cpp. The patch is in https://bugs.webkit.org/show_bug.cgi?id=25899. The 2nd part is in webkit/glue/webwidget_impl.cc: Adding WebInputEvent::Char event type handling in WebWidgetImpl::HandleInputEvent(). The comment should be self-explained. BUG=http://crbug.com/8052 TEST=In a HTML containing <select> tag and Hebrew character options, open the Hebrew select element, type a Hebrew letter which is the first letter of one option, that option should be selected. Review URL: http://codereview.chromium.org/113712 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16752 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webwidget_impl.cc')
-rw-r--r--webkit/glue/webwidget_impl.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/webkit/glue/webwidget_impl.cc b/webkit/glue/webwidget_impl.cc
index 8418617..f08e95d 100644
--- a/webkit/glue/webwidget_impl.cc
+++ b/webkit/glue/webwidget_impl.cc
@@ -189,9 +189,18 @@ bool WebWidgetImpl::HandleInputEvent(const WebInputEvent* input_event) {
MouseUp(*static_cast<const WebMouseEvent*>(input_event));
return true;
+ // In Windows, RawKeyDown only has information about the physical key, but
+ // for "selection", we need the information about the character the key
+ // translated into. For English, the physical key value and the character
+ // value are the same, hence, "selection" works for English. But for other
+ // languages, such as Hebrew, the character value is different from the
+ // physical key value. Thus, without accepting Char event type which
+ // contains the key's character value, the "selection" won't work for
+ // non-English languages, such as Hebrew.
case WebInputEvent::RawKeyDown:
case WebInputEvent::KeyDown:
case WebInputEvent::KeyUp:
+ case WebInputEvent::Char:
return KeyEvent(*static_cast<const WebKeyboardEvent*>(input_event));
default: