This correctly implements the keyListener logic. I had the mapping

between mozilla concepts and java concepts wrong before.  The correct
mapping is:

Mozilla concept       Java concept

KeyDown               keyPressed
KeyUp                 keyReleased
KeyPress              keyTyped

KeyCode               keyCode
CharCode              keyChar

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/EventRegistrationImpl.java

- Force the keyCode to be VK_UNDEFINED if this is a KEY_TYPED event.

- For security, log any exceptions thrown during ctor of KeyEvent.

M webclient/src_moz/EmbedEventListener.cpp

- remove unused automatic vars.

M webclient/src_moz/NavigationImpl.cpp

- roll back change done by Brian Ryner, since it doesn't make sense
  under mozilla 1.7.

M webclient/src_share/jni_util.cpp

- reverse mapping of CHAR_CODE and KEY_CODE to their java counterparts.

M webclient/test/automated/src/classes/org/mozilla/webclient/KeyListenerTest.java

- Add in some code to make it easier to run this testcase in a manual
  fashion.


git-svn-id: svn://10.0.0.236/trunk@166056 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2004-12-01 15:46:23 +00:00
parent 30d52ce0b4
commit 0f327ddba2
5 changed files with 47 additions and 10 deletions

View File

@@ -30,7 +30,9 @@
#include "org_mozilla_webclient_impl_wrapper_0005fnative_NavigationImpl.h"
#include "nsServiceManagerUtils.h"
#include "nsIServiceManagerUtils.h" // PENDING(edburns): when moving
// past 1.7, this changes to
// nsServiceManagerUtils.h
#include "nsIIOService.h"
#include "nsIURI.h"
#include "nsString.h"