a=edburns This checkin mainly does two things: 1. Correctly populates the java.awt.event.MouseEvent subclass with the correct modifiers, x, y, and clickCount for the mozilla mouse event. 2. Adds a performance optimization: previously, every mouse event was causing a new instance of java.util.Properties to be created. Now, only one Properties instance is created per-page, and it is cleared on each mouse event. Also, I made the DOMMouseListenerImpl constructor initialize the refCount to 0. This allows the object to be correctly deleted. M classes_spec/org/mozilla/webclient/test/EMWindow.java M classes_spec/org/mozilla/webclient/wrapper_native/WCMouseListenerImpl.java M src_moz/DOMMouseListenerImpl.cpp M src_moz/DOMMouseListenerImpl.h M src_moz/WindowControlImpl.cpp M src_moz/jni_util.cpp M src_moz/jni_util.h M src_moz/jni_util_export.cpp M src_moz/jni_util_export.h M classes_spec/org/mozilla/webclient/test/EMWindow.java * Added test code for MouseListener properties: buttons, modifiers, etc. M classes_spec/org/mozilla/webclient/wrapper_native/WCMouseListenerImpl.java * Added support for mouse modifiers. Pull values out of the hash table, put them in the MouseEvent constructor. M src_moz/DOMMouseListenerImpl.cpp * Modified constructors so they initialize all ivars. * changed usage model of properties object to share the lifetime of the DOMMouseListenerImpl instance. Needed to make use of the new function util_ClearPropertiesObject() to do this. Now we have only one call to util_DestroyPropertiesObject(), in the DOMMouseListenerImpl destructor. M src_moz/DOMMouseListenerImpl.h > virtual ~DOMMouseListenerImpl(); > 98a101 > protected: 100a104,105 > > void JNICALL addMouseEventDataToProperties(nsIDOMEvent *aMouseEvent); M src_moz/WindowControlImpl.cpp * Initialize new WebShellInitConext member propertiesClass to nsnull M src_moz/jni_util.cpp * Added util_ClearPropertiesObject() an optimization. * Store the jclass for java/util/Properties in an element in WebShellInitContext. This prevents us from having to do FindClass each time a mouse event occurs. * Added a parameter to util_StoreIntoPropertiesObject. M src_moz/jni_util.h * Added propertiesClass to WebShellInitContext * Added new method ClearPropertiesObject * Added new last argument to DestroyPropertiesObject M src_moz/jni_util_export.cpp M src_moz/jni_util_export.h * Added function pointer for util_ClearPropertiesObject. git-svn-id: svn://10.0.0.236/trunk@71756 18797224-902f-48f8-a5cc-f745e15eee43
Here lies the code that comprises the java enhancers to mozilla. Authors: see the README files for each individual subdirectory Requirements: * JDK1.2 or greater (may work with lower versions, haven't checked). * Successfully built MOZ_DEBUG=1 Mozilla M13 tree. * Perl 5 perl.exe must be in your path How To Build: * make it so the directory in which this file resides is a child of your top level Mozilla M13 directory * make sure the environment var JDKHOME is set to your jdk installation directory, ie SET JDKHOME=C:\jdk1.2.2 * type "nmake /f makefile.win all" and hope for the best * this should compile the clasess into %MOZ_SRC%\dist\classes Problems: * clobber_all doesn't remove the .class files from dist\classes. You have to do this manually. * post to netscape.public.mozilla.java newsgroup General notes: * Please update the ChangeLog (changelo) files in the subdirectories when you make changes.