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.
a=edburns
r=drapeau
This checkin creates a dependency on the mozilla java dom module.
Please see mozilla\java\dom\README to build the java dom.
Note that you can just run make in mozilla\java and everything
should be built correctly.
A webclient/classes_spec/org/mozilla/webclient/test/DOMAccessPanel.java
A webclient/classes_spec/org/mozilla/webclient/test/DOMCellRenderer.java
A webclient/classes_spec/org/mozilla/webclient/test/DOMTreeDumper.java
A webclient/classes_spec/org/mozilla/webclient/test/DOMTreeModel.java
A webclient/classes_spec/org/mozilla/webclient/test/DOMTreeNotifier.java
A webclient/classes_spec/org/mozilla/webclient/test/DOMViewerFrame.java
M Makefile.win
M README
M webclient/classes_spec/Makefile.unix
M webclient/classes_spec/Makefile.win
M webclient/classes_spec/org/mozilla/webclient/CurrentPage.java
M webclient/classes_spec/org/mozilla/webclient/test/EMWindow.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/CurrentPageImpl.java
M webclient/src_moz/CurrentPageImpl.cpp
M webclient/src_moz/DocumentLoaderObserverImpl.cpp
M webclient/src_moz/Makefile.win
M webclient/src_moz/WindowControlImpl.cpp
M webclient/src_moz/jni_util.h
author=edburns
bug=41492
This change adds the following methods:
public static native void org.mozilla.dom.DOMAccessor.initialize();
The implementation of this method is:
JNIEXPORT void JNICALL Java_org_mozilla_dom_DOMAccessor_initialize
(JNIEnv *env, jclass)
{
if (!JavaDOMGlobals::log) {
JavaDOMGlobals::Initialize(env);
}
}
This method is necessary for external clients that want to use JavaDOM,
but don't want to use the nsIDocumentLoaderObserver instance provided by
JavaDOM.
Please see http://bugzilla.mozilla.org/show_bug.cgi?id=41497 for an
additional bug for which there is a workaround.
Ed