816 Commits

Author SHA1 Message Date
edburns%acm.org
fbd0e42fb9 This change-bundle fixes memory allocation in streams. Next step is to
make a final pass to make sure we are not leaking memory.  After that, I
want to clean up the build system, and the samples.

M build.xml

- Call make export in mozilla directory

- Fix clean target

M mozilla/Makefile.in

- Added export target
M classes/org/mozilla/pluglet/PlugletLoader.java

- avoid ambiguity by casting

+	    CodeSource codesource = new CodeSource(url,(java.security.cert.Certificate []) null);

M examples/MediaPlayer/JMPlayer.java

- remove debug printfs

M mozilla/npAPInsIInputStreamShim.cpp
M mozilla/npAPInsIInputStreamShim.h

- remove debug printfs

- fix buffer allocation, refactor into its own method.

- Use NPN_Mem* methods for memory allocation.

- isolate lock access to private methods.  Avoids locking when we
  already own the lock, which would cause an assertion.

M mozilla/nppluglet.cpp

- in dtor, check for null mScriptablePeer ivar before accessing it.

M mozilla/nsScriptablePeer.cpp

- whitespace

M src/Pluglet.cpp

- get the plugletEngine from do_GetService().

M src/PlugletEngine.cpp
M src/PlugletFactory.cpp
M src/PlugletLoader.cpp

- remove debug printfs

M test/test.java

- added test finalize.


build.xml classes/org/mozilla/pluglet/PlugletLoader.java examples/MediaPlayer/JMPlayer.java mozilla/Makefile.in mozilla/npAPInsIInputStreamShim.cpp mozilla/npAPInsIInputStreamShim.h mozilla/nppluglet.cpp mozilla/nsScriptablePeer.cpp src/Pluglet.cpp src/PlugletEngine.cpp src/PlugletFactory.cpp src/PlugletLoader.cpp test/test.java


git-svn-id: svn://10.0.0.236/trunk@214609 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-02 18:55:50 +00:00
timeless%mozdev.org
c6467de559 Bug 106386 Correct misspellings in source code
r=glennrp@gmail.com, bclary@bclary.com rs=brendan


git-svn-id: svn://10.0.0.236/trunk@214560 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-01 23:02:18 +00:00
edburns%acm.org
b81470eb5b checkpoint
git-svn-id: svn://10.0.0.236/trunk@214162 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-26 13:46:57 +00:00
edburns%acm.org
cd61788d87 A mozilla/npAPInsIInputStreamShim.cpp
A mozilla/npAPInsIInputStreamShim.h

- Shim to allow the np4xplugin API to call pass stream data to pluglet

M mozilla/Makefile.in

- Add the shim to the source files

M mozilla/nppluglet.cpp

- implement the layer that calls the shim

M test/test.html

- Pass the plugin a src of its .java file.

M test/test.java

- additional debug printout inf

mozilla/npAPInsIInputStreamShim.cpp mozilla/npAPInsIInputStreamShim.h mozilla/Makefile.in mozilla/nppluglet.cpp test/test.html test/test.java


git-svn-id: svn://10.0.0.236/trunk@214151 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-26 04:19:00 +00:00
edburns%acm.org
e144e050f9 ? build
? simple
? examples/MediaPlayer/build
? examples/MediaPlayer/build.properties
? examples/MediaPlayer/build.properties.sample
? test/build
M examples/MediaPlayer/JMPlayer.java
M examples/MediaPlayer/build.xml
M examples/MediaPlayer/samples/test.html
M mozilla/nppluglet.cpp
M mozilla/nppluglet.h


git-svn-id: svn://10.0.0.236/trunk@213989 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-23 05:18:19 +00:00
edburns%acm.org
8c3dc031c9 simple_pluglet_works
git-svn-id: svn://10.0.0.236/trunk@213702 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-16 13:53:26 +00:00
edburns%acm.org
0ad64df91a M mozilla/Makefile.in
- add nspr to libs

M mozilla/nppluglet.cpp

- make sure to store instance pointer for return to browser, this enables
  shutdown to work properly

- When HasPlugletForMimeType is called multiple times, actually check
  the mime type.

M mozilla/nsISimplePlugin.idl

- Fix this so it's callable from JavaScript

M src/PlugletsDir.cpp

- Fix bug for multiple plugin instances

Index: mozilla/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/java/plugins/mozilla/Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 Makefile.in
--- mozilla/Makefile.in	7 Oct 2006 23:31:52 -0000	1.1
+++ mozilla/Makefile.in	14 Oct 2006 12:26:06 -0000
@@ -59,7 +59,7 @@

 XPIDLSRCS = nsISimplePlugin.idl

-SHARED_LIBRARY_LIBS = $(PLUGIN_SDK)/samples/common/$(LIB_PREFIX)plugingate_s.$(LIB_SUFFIX) ../src/$(LIB_PREFIX)pluglet_s.$(LIB_SUFFIX)
+SHARED_LIBRARY_LIBS = $(PLUGIN_SDK)/samples/common/$(LIB_PREFIX)plugingate_s.$(LIB_SUFFIX) ../src/$(LIB_PREFIX)pluglet.$(LIB_SUFFIX) $(XPCOM_LIBS) $(NSPR_LIBS)

 ifeq ($(OS_ARCH),WINNT)
 DEFFILE = $(win_srcdir)/nppluglet.def
Index: mozilla/nppluglet.cpp
===================================================================
RCS file: /cvsroot/mozilla/java/plugins/mozilla/nppluglet.cpp,v
retrieving revision 1.3
diff -u -r1.3 nppluglet.cpp
--- mozilla/nppluglet.cpp	13 Oct 2006 14:45:14 -0000	1.3
+++ mozilla/nppluglet.cpp	14 Oct 2006 12:26:07 -0000
@@ -47,6 +47,8 @@

 #include "nsServiceManagerUtils.h"

+#include "plstr.h"
+
 // service manager which will give the access to all public browser services
 // we will use memory service as an illustration
 nsIServiceManager * gServiceManager = NULL;
@@ -153,17 +155,21 @@
 // nsPluginInstance class implementation
 //
 nsPluginInstance::nsPluginInstance(nsPluginCreateData * aCreateDataStruct) : nsPluginInstanceBase(),
-  mInstance(aCreateDataStruct->instance),
   mInitialized(PR_FALSE),
   mScriptablePeer(nsnull),
   mPluglet(nsnull)
 {
+  mInstance = aCreateDataStruct->instance;
+
   mCreateDataStruct.instance = aCreateDataStruct->instance;
   mCreateDataStruct.type = aCreateDataStruct->type;
   mCreateDataStruct.mode = aCreateDataStruct->mode;
   mCreateDataStruct.argc = aCreateDataStruct->argc;
   mCreateDataStruct.argn = aCreateDataStruct->argn;
   mCreateDataStruct.saved = aCreateDataStruct->saved;
+
+  mCreateDataStruct.instance->pdata = this;
+  mInstance->pdata = this;
   mString[0] = '\0';
 }

@@ -256,19 +262,27 @@
                                                       PRBool *outResult)
 {
     nsresult rv = NS_ERROR_FAILURE;
-
-    nsCOMPtr<nsIPlugin> plugletEngine =
-	do_GetService(PLUGLETENGINE_ContractID, &rv);
     *outResult = PR_FALSE;
+    nsCOMPtr<nsIPlugin> plugletEngine = nsnull;
     nsIID scriptableIID = NS_ISIMPLEPLUGIN_IID;
+
+    if (!mPluglet) {
+        plugletEngine = do_GetService(PLUGLETENGINE_ContractID, &rv);

-    if (NS_SUCCEEDED(rv)) {
-        rv = plugletEngine->CreatePluginInstance(nsnull, scriptableIID,
-                                                 aMimeType,
-                                                 getter_AddRefs(mPluglet));
-        if (NS_SUCCEEDED(rv) && mPluglet) {
+        if (NS_SUCCEEDED(rv)) {
+            rv = plugletEngine->CreatePluginInstance(nsnull, scriptableIID,
+                                                     aMimeType,
+                                                     getter_AddRefs(mPluglet));
+            if (NS_SUCCEEDED(rv) && mPluglet) {
+                *outResult = PR_TRUE;
+            }
+        }
+    }
+    else {
+        if (0 == PL_strcmp(aMimeType, mCreateDataStruct.type)) {
             *outResult = PR_TRUE;
         }
+		rv = NS_OK;
     }

     return rv;
Index: mozilla/nsISimplePlugin.idl
===================================================================
RCS file: /cvsroot/mozilla/java/plugins/mozilla/nsISimplePlugin.idl,v
retrieving revision 1.2
diff -u -r1.2 nsISimplePlugin.idl
--- mozilla/nsISimplePlugin.idl	12 Oct 2006 21:22:47 -0000	1.2
+++ mozilla/nsISimplePlugin.idl	14 Oct 2006 12:26:07 -0000
@@ -40,5 +40,5 @@

 [scriptable, uuid(482e1890-1fe5-11d5-9cf8-0060b0fbd8ac)]
 interface nsISimplePlugin : nsISupports {
-  void hasPlugletForMimeType(in string aMimeType, out boolean isSupported);
+  boolean hasPlugletForMimeType(in string aMimeType);
 };
Index: src/PlugletsDir.cpp
===================================================================
RCS file: /cvsroot/mozilla/java/plugins/src/PlugletsDir.cpp,v
retrieving revision 1.10
diff -u -r1.10 PlugletsDir.cpp
--- src/PlugletsDir.cpp	12 Oct 2006 21:22:47 -0000	1.10
+++ src/PlugletsDir.cpp	14 Oct 2006 12:26:07 -0000
@@ -124,6 +124,9 @@
     if(!mMimeTypeToPlugletFacoryHash) {
 	res = LoadPluglets();
     }
+    else {
+	res = NS_OK;
+    }
     if (NS_SUCCEEDED(res) && mMimeTypeToPlugletFacoryHash) {
 	*plugletFactory = (PlugletFactory *)
 	    PL_HashTableLookup(mMimeTypeToPlugletFacoryHash,


git-svn-id: svn://10.0.0.236/trunk@213638 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-14 12:28:15 +00:00
edburns%acm.org
53efe6b0fd M mozilla/nppluglet.cpp
M mozilla/nppluglet.h
M src/Pluglet.cpp
M src/Pluglet.h
M src/PlugletEngine.cpp

SetWindow works.  Next step is to try hook up scriptability.


git-svn-id: svn://10.0.0.236/trunk@213586 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-13 14:45:14 +00:00
edburns%acm.org
bf79c9482d checkpoint
git-svn-id: svn://10.0.0.236/trunk@213561 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-12 21:22:47 +00:00
bugzilla%standard8.demon.co.uk
9d56ba413c Bug 351921 Remove xpcom/obsolete/nsSpecialSystemDirectory.{h,cpp} r=darin,edburns
git-svn-id: svn://10.0.0.236/trunk@213549 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-12 16:44:32 +00:00
edburns%acm.org
d85e65a92d src
git-svn-id: svn://10.0.0.236/trunk@213300 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-07 23:31:52 +00:00
timeless%mozdev.org
46444dd782 Bug 106386 Correct misspellings in source code
r=bernd rs=brendan


git-svn-id: svn://10.0.0.236/trunk@208659 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-28 20:12:37 +00:00
edburns%acm.org
908f89a2bf I now have the pluglet.dll XPCOM module loading. The reason it was not
loading: it depends on jvm.dll, which was not on my path.  I had to add
%JDKHOME%\jre\bin\client to my path and now it loaded. Thanks to shaver
and plasticmillion on #developers for the tip to use depends.exe, the
Dependency Walker.  What a nice tool.

Of course, there is now a crash after it loads, which will be my next
step after this checkin.

A plugins/src/iPlugletEngine.idl
A plugins/src/iPlugletManager.idl

- make IDL files for our external interfaces.

M plugins/src/Makefile.in

- move PlugletEngine.cpp to the top of the list.

M plugins/src/PlugletEngine.cpp
M plugins/src/PlugletEngine.h

- big changes here.  Make this a proper generic XPCOM component.

- use the iPlugletManager interface, and the nsICategoryManager
  to make sure we get called at startup.

M plugins/src/Pluglet.cpp
M plugins/src/Pluglet.h
M plugins/src/PlugletFactory.cpp
M plugins/src/PlugletFactory.h
M plugins/src/PlugletInputStream.cpp
M plugins/src/PlugletInputStream.h
M plugins/src/PlugletLoader.cpp
M plugins/src/PlugletManager.cpp
M plugins/src/PlugletPeer.cpp
M plugins/src/PlugletStreamInfo.cpp
M plugins/src/PlugletStreamListener.cpp
M plugins/src/PlugletViewWindows.cpp
M plugins/src/PlugletsDir.cpp
M plugins/src/Registry.cpp

- remove static method PlugletEngine::GetJNIEnv, in favor of instance
  method and use of nsIServiceManager.


git-svn-id: svn://10.0.0.236/trunk@200339 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-19 18:50:01 +00:00
edburns%acm.org
a17ae4d03d update
git-svn-id: svn://10.0.0.236/trunk@200262 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-19 10:05:42 +00:00
edburns%acm.org
2a694a98ee pluglet_build
git-svn-id: svn://10.0.0.236/trunk@193013 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-26 16:36:55 +00:00
edburns%acm.org
6387d571d0 pluglets_build
git-svn-id: svn://10.0.0.236/trunk@192925 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-24 18:34:53 +00:00
edburns%acm.org
62d191460c Make plugletjni.lib and .dll build.
M makefiles

- remove plugins/Makefile, this'll be replaced by ant

- add jni Makefile

R plugins/makefile.win
R plugins/jni/makefile.win
R plugins/src/makefile.win

- obsolete.

M plugins/jni/Makefile.in

- new includes and such

M plugins/jni/org_mozilla_pluglet_mozilla_PlugletOutputStream.cpp

- cast to const char *.


git-svn-id: svn://10.0.0.236/trunk@192921 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-24 17:57:24 +00:00
edburns%acm.org
a046234a53 pluglet.dll_now_builds
git-svn-id: svn://10.0.0.236/trunk@192920 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-24 17:41:16 +00:00
edburns%acm.org
4cf929cbd3 This change-bundle starts the process of re-activating pluglets.
Next step is to figure out the best way to fix these unresolved symbols
at link time when building pluglet.dll

/cygdrive/d/Projects/mozilla/MOZILLA_NIH/FIREFOX_1_5_0_1/mozilla/./build/cygwin-wrapper link -NOLOGO -DLL -OUT:pluglet.dll -PDB:pluglet.pdb -SUBSYSTEM:WINDOWS  List.obj Pluglet.obj PlugletEngine.obj PlugletFactory.obj PlugletInputStream.obj PlugletLoader.obj PlugletManager.obj PlugletPeer.obj PlugletStreamInfo.obj PlugletStreamListener.obj PlugletsDir.obj Registry.obj PlugletViewFactory.obj   ./module.res   -DEBUG -DEBUGTYPE:CV         kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib D:\Files_2k\j2sdk1.4.2_03/lib/jvm.lib ../../../dist/lib/xpcom.lib ../../../dist/lib/xpcom_core.lib ../../../dist/lib/nspr4.lib ../../../dist/lib/plc4.lib ../../../dist/lib/plds4.lib
   Creating library pluglet.lib and object pluglet.exp
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall nsFileSpec::~nsFileSpec(void)" (__imp_??1nsFileSpec@@UAE@XZ)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall nsDirectoryIterator::~nsDirectoryIterator(void)" (__imp_??1nsDirectoryIterator@@UAE@XZ)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class nsDirectoryIterator & __thiscall nsDirectoryIterator::operator++(void)" (__imp_??EnsDirectoryIterator@@QAEAAV0@XZ)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall nsDirectoryIterator::nsDirectoryIterator(class nsFileSpec const &,int)" (__imp_??0nsDirectoryIterator@@QAE@ABVnsFileSpec@@H@Z)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall nsFileSpec::nsFileSpec(char const *,int)" (__imp_??0nsFileSpec@@QAE@PBDH@Z)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall nsSpecialSystemDirectory::~nsSpecialSystemDirectory(void)" (__imp_??1nsSpecialSystemDirectory@@UAE@XZ)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall nsFileSpec::operator+=(char const *)" (__imp_??YnsFileSpec@@QAEXPBD@Z)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall nsSpecialSystemDirectory::nsSpecialSystemDirectory(enum nsSpecialSystemDirectory::SystemDirectories)" (__imp_??0nsSpecialSystemDirectory@@QAE@W4SystemDirectories@0@@Z)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: char const * __thiscall nsFileSpec::GetCString(void)const " (__imp_?GetCString@nsFileSpec@@QBEPBDXZ)
PlugletViewFactory.obj : error LNK2001: unresolved external symbol "public: __thiscall PlugletViewWindows::PlugletViewWindows(void)" (??0PlugletViewWindows@@QAE@XZ)
pluglet.dll : fatal error LNK1120: 10 unresolved externals

M makefiles

+java/plugins/Makefile
+java/plugins/src/Makefile

Add generation of these Makefiles

M plugins/src/Makefile.in

- copy some content from webclient

M plugins/src/Pluglet.cpp
M plugins/src/PlugletEngine.cpp
M plugins/src/PlugletStreamListener.cpp

- Changes from John Sublet.


git-svn-id: svn://10.0.0.236/trunk@192678 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-21 03:25:34 +00:00
edburns%acm.org
d2864ebc3a remove_checked_in_makefiles
git-svn-id: svn://10.0.0.236/trunk@192674 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-21 02:28:54 +00:00
edburns%acm.org
2d1659379e make_this_test_run
git-svn-id: svn://10.0.0.236/trunk@192505 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-17 00:26:02 +00:00
edburns%acm.org
b1054b5e5f This checkin gets webclient and sorta running with Firefox 1.5.0.1
Next step is to fix this:

D:\Projects\mozilla\MOZILLA_NIH\FIREFOX_1_5_0_1\mozilla\java\webclient\build-tests.xml:152: Test org.mozilla.webclient.DocumentLoadListenerTest failed

M build.properties.sample

- Add hint for msdev arguments.

M dom/build.xml
M util/build.xml
M webclient/build.xml

- compile.source to 1.3

M dom/jni/Makefile.in
M webclient/src_ie/Makefile.in
M webclient/src_moz/Makefile.in
M webclient/src_moz/gtk/Makefile.in
M webclient/src_share/Makefile.in

- +DEFINES += -DMOZILLA_INTERNAL_API

M dom/jni/nativeDOMProxyListener.cpp
M dom/src/nsJavaDOMImpl.cpp

- remove cast to (void **) in AttachCurrentThread

M dom/src/Makefile.in

- depend on layout

- +DEFINES += -DMOZILLA_INTERNAL_API

M webclient/build-tests.xml

- comment out ProfileManagerTest

- compile with compile.source

M webclient/src_moz/NativeBrowserControl.cpp

- nsIFocusController,nsIChromeEventHandler,nsIDomWindowInternal no
  longer needs nsCOMPtr

M webclient/src_moz/NativeEventThread.cpp

- remove IID defs for webShell, sHistory.

M webclient/src_moz/NavigationActionEvents.cpp

- remove nsIPresContext include

M webclient/src_moz/NavigationImpl.cpp

-#include "nsIServiceManagerUtils.h" // PENDING(edburns): when moving
-                                    // past 1.7, this changes to
-                                    // nsServiceManagerUtils.h
+#include "nsServiceManagerUtils.h"

M webclient/src_moz/ProfileManagerImpl.cpp

- This is currently totally broken.  Next step is to fix it.

M webclient/src_moz/WrapperFactoryImpl.cpp

- comment out profileManager accesses

M webclient/src_moz/ns_globals.h
M webclient/src_moz/ns_util.h

- take out nsIWebShell

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

- comment out goldenFile assertion until ProfileManager works.


git-svn-id: svn://10.0.0.236/trunk@191790 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-05 03:53:26 +00:00
timeless%mozdev.org
af51e73d0e Bug 106386 Correct misspellings in source code
r=bernd rs=brendan


git-svn-id: svn://10.0.0.236/trunk@191013 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-23 09:36:43 +00:00
cbiesinger%web.de
4b0b228457 bug 183156 remove *UCS2* functions, replacing them with *UTF16* ones
r+sr=darin


git-svn-id: svn://10.0.0.236/trunk@188845 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-03 14:32:22 +00:00
timeless%mozdev.org
4bddf6ff1d Bug 106386 Correct misspellings in source code
patch by philippuryear@gmail.com r=timeless rs=brendan


git-svn-id: svn://10.0.0.236/trunk@187469 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-12 07:57:31 +00:00
edburns%acm.org
42555bbd2b update
git-svn-id: svn://10.0.0.236/trunk@185559 18797224-902f-48f8-a5cc-f745e15eee43
2005-12-02 03:19:22 +00:00
timeless%mozdev.org
dae7b0629a Bug 106386 Correct misspellings in source code
patch by unknown@simplemachines.org r=timeless rs=brendan


git-svn-id: svn://10.0.0.236/trunk@185282 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-25 21:57:13 +00:00
timeless%mozdev.org
f9bdb44b34 Bug 106386 Correct misspellings in source code
patch by unknown@simplemachines.org r=timeless rs=brendan


git-svn-id: svn://10.0.0.236/trunk@185269 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-25 08:16:51 +00:00
edburns%acm.org
f70ddae346 up_version_to_a5
git-svn-id: svn://10.0.0.236/trunk@178529 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-21 01:23:11 +00:00
edburns%acm.org
265d33606d Next step is to figure out why real dom listeners don't work.
M webclient/test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java

- Modify mouseOver to output some dom information to the status bar.


git-svn-id: svn://10.0.0.236/trunk@178526 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-21 00:53:09 +00:00
edburns%acm.org
7be42f1a22 Expose the dom Node to the standard java key and mouse
listeners, using test driven development techniques of course.

Next step is to update the test browser to use this feature.

SECTION:

A webclient/classes_spec/org/mozilla/webclient/WCKeyEvent.java

- KeyEvent subclass to expose WebclientEvent, and allow access to the
  Source property, which is a dom Node

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

- change to handle WCKeyEvent

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

- new test content

M webclient/test/automated/src/test/KeyListenerTest1.html

- add id attribute


git-svn-id: svn://10.0.0.236/trunk@178517 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-20 19:25:52 +00:00
edburns%acm.org
e064d69906 This change-bundle solves the dom problem in a different way: by
allowing the standard java key and mouse event listeners to get access
to the dom Node that corresponds to that event.  I have the Node
propagated out to the webclient level, but I need to push it all the way
out so the client can access it.

Next step is to expose the dom Node to the standard java key and mouse
listeners, using test driven development techniques of course.

SECTION: Changes

M dom/classes/org/mozilla/dom/DOMAccessor.java

- make getNodeByHandle(long p) public so I can get the dom node for a
  key or mouse event.

M dom/classes/org/mozilla/dom/NodeImpl.java

- added commented out methods for the Node in Java SE 5.0

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

- Extract the dom Node that corresponds to a key or mouse event.

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

- Don't use keyword enum, for Java SE 5.0

M webclient/src_moz/EmbedEventListener.cpp

- store the long into the properties.

M webclient/src_share/jni_util.cpp
M webclient/src_share/jni_util.h

- new constant, NodeLong.


git-svn-id: svn://10.0.0.236/trunk@178227 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-19 05:26:07 +00:00
edburns%acm.org
e3f6bd8d73 Next step is to resume hunting down the DOM bug.
M dom/src/Makefile.in

- conditional builds to work properly XP

M webclient/build-tests.xml

- pass MOZ_SRC to test environment to enable absolute pathing to golden
  files

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

- Leverage MOZ_SRC to get absolute pathing to golden files


git-svn-id: svn://10.0.0.236/trunk@177408 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-09 04:43:00 +00:00
bzbarsky%mit.edu
6b2d4870c3 More uses of EmptyC?String(). Bug 232691, patch by Charles Fenwick
<clf03f@garnet.acns.fsu.edu>, r+sr=bzbarsky, a=bsmedberg


git-svn-id: svn://10.0.0.236/trunk@176154 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-15 21:41:47 +00:00
edburns%acm.org
9ddd30d483 generic_native_drawing_works_but_not_for_mozilla
git-svn-id: svn://10.0.0.236/trunk@173697 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-23 01:10:22 +00:00
edburns%acm.org
0a89a34a27 Remove debugging printfs.
Have browser window visible, but no content pane.


git-svn-id: svn://10.0.0.236/trunk@173508 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-17 13:12:45 +00:00
edburns%acm.org
79fb88819e cocoa-seems-to-work
git-svn-id: svn://10.0.0.236/trunk@173503 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-17 04:38:38 +00:00
edburns%acm.org
db0d2ab21e Turns out the problem with the CocoaBrowserControlCanvas
was that I was incorrectly interpreting the return value from
Lock().

This works.  Next step is to solve the nsWindow.cpp problem.


git-svn-id: svn://10.0.0.236/trunk@173469 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-16 13:39:22 +00:00
edburns%acm.org
ba350c1664 Checkpoint for mac os x reactivation.
Having trouble with the implementation of getHandleToPeer.

Current problem is that JAWT_DrawingSurface->Lock() is failing.

Why would that be?


git-svn-id: svn://10.0.0.236/trunk@173357 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-13 06:40:12 +00:00
edburns%acm.org
30b1cc73be All I had time for today was some javadoc updates. Next step is still to
work on the dom viewer in the TestBrowser.

M webclient/classes_spec/org/mozilla/webclient/EventRegistration.java
M webclient/classes_spec/org/mozilla/webclient/EventRegistration2.java

- add javadocs.


git-svn-id: svn://10.0.0.236/trunk@172432 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-19 13:00:40 +00:00
edburns%acm.org
7cd6437c44 This checkin enables CurrentPage.getSource() to return the actual source
bytes, including whitespace, that is being shown in the BrowserControl.
The source actually comes from the browser's cache, and is not
re-fetched over the network unless the browser doesn't have an entry in
the cache.

Next step is to fix up the TestBrowser to show off this feature.

A src_moz/LoadCompleteProgressListener.cpp
A src_moz/LoadCompleteProgressListener.h

 * Simple nsIWebProgressListener that offers a "loadComplete" property
 * that can be queried to determine if the load has completed.

A test/manual/src/classes/org/mozilla/webclient/test/DOMAccessPanel.java
A test/manual/src/classes/org/mozilla/webclient/test/DOMCellRenderer.java
A test/manual/src/classes/org/mozilla/webclient/test/DOMTreeDumper.java
A test/manual/src/classes/org/mozilla/webclient/test/DOMTreeModel.java
A test/manual/src/classes/org/mozilla/webclient/test/DOMTreeNotifier.java
A test/manual/src/classes/org/mozilla/webclient/test/DOMViewerFrame.java

- move over from Old test browser.  Produces some thread issues.

M src_moz/CurrentPageImpl.cpp

- Leverage LoadCompleteProgressListener to discover when it's safe to
  call "selectAll" on the window.

M src_moz/Makefile.in

- add LoadCompleteProgressListener

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

- re-enable GetSource test

M test/automated/src/test/ViewSourceTest.html

- re-edit for ease of comparison in CurrentPageTest

M test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java

- Hack: viewSource button.  A menu would be better.


git-svn-id: svn://10.0.0.236/trunk@172378 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-17 20:19:46 +00:00
edburns%acm.org
b740cc9e1a CheckPoint. Exact bytes of viewSource doesn't work yet. I think the
problem is that selectAll isn't working due to the window not being
realized.  We'll see.  Next step is to get it working!

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

- rewrite getSource() to call native code, instead of using the DOM.

M src_moz/CurrentPageImpl.cpp

- re-enable nativeGetSource().

M src_moz/EmbedWindow.cpp
M src_moz/EmbedWindow.h

- fill out dtor

- add InitNoChrome.


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

- comment out test

classes_spec/org/mozilla/webclient/impl/wrapper_native/CurrentPageImpl.java src_moz/CurrentPageImpl.cpp src_moz/EmbedWindow.cpp src_moz/EmbedWindow.h test/automated/src/classes/org/mozilla/webclient/CurrentPageTest.java


git-svn-id: svn://10.0.0.236/trunk@171314 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-29 05:03:12 +00:00
edburns%acm.org
b211943729 This checkin re-implements CurrentPage.getSource(). It doesn't preserve
the whitespace formatting of the current page, which is a big problem.
Next step is to get the DOMViewer working with the TestBrowser.

M build.xml

- exclude test from the default build

A classes_spec/org/mozilla/webclient/impl/DOMTreeDumper.java

- Copy this over from test.

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

- leverage DOMTreeDumper to print the current source.

M test/automated/src/classes/org/mozilla/webclient/CurrentPageTest.java
A test/automated/src/test/ViewSourceTest.html

- exercise new methods.


git-svn-id: svn://10.0.0.236/trunk@170983 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-22 15:58:51 +00:00
edburns%acm.org
3ffcb6c7ff [11-StateSavingWindowId]
This change-bundle implements the FULL proposal for this, as well as
covering some corner-cases not in the initial proposal.

I have yet to get the last stamp of approval from the EG, but I'm
confident we'll get it, so I'm checking it in now.

r=visvan.

SECTION: API Changes

M jsf-api/src/javax/faces/application/StateManager.java

- reword the class description for readability

- saveSerializedView

  Deprecate this.  Make it no-longer abstract.  Provide default impl
  that returns null.

- saveView

  new method.  Replaces saveSerializedView.  Provide default impl that
  calls through to saveSerializedView().


- writeState that takes Object

  new method.  Provide default impl:

+     * <p>For backwards compatability with existing
+     * <code>StateManager</code> implementations, the default
+     * implementation of this method checks if the argument is an
+     * instance of <code>Object []</code> of length greater than or
+     * equal to two.  If so, it creates a <code>SerializedView</code>
+     * instance with the tree structure coming frome element zero and
+     * the component state coming from element one and calls through to
+     * {@link
+     * #writeState(javax.faces.context.FacesContext,javax.faces.application.StateManager.SerializedView}.
+     * If not, does nothing.</p>

- getTreeStructureToSave
- getComponentStateToSave
- restoreTreeStructure
- restoreComponentState

  Deprecate these.  Provide default impl that returns null or no-ops.

- SerializedView

  Deprecate this.

M jsf-api/src/javax/faces/application/StateManagerWrapper.java

- add new methods.

M jsf-api/src/javax/faces/render/ResponseStateManager.java

- writeState that takes Object

  new method.

+     * <p>For backwards compatability with existing
+     * <code>ResponseStateManager</code> implementations, the default
+     * implementation of this method checks if the argument is an
+     * instance of <code>SerializedView</code>.  If so, it calls through
+     * to {@link
+     * #writeState(javax.faces.context.FacesContext,javax.faces.application.StateManager.SerializedView}.
+     * If not, does nothing.</p>

- writeState that takes SerializedView

+     * @deprecated This method has been replaced by {@link
+     * #writeState(javax.faces.context.FacesContext,java.lang.Object)}.
+     * The default implementation of this method does nothing.
+     *

- getState

  new method.

- getTreeStructureToRestore
- getComponentStateToRestore

  Deprecate these.  Provide default impl that returns null or no-ops.

SECTION: RI Changes

M jsf-ri/src/com/sun/faces/application/StateManagerImpl.java

  Provide implementations for deprecated methods that will be called by
  the default implementations of the new methods in StateManager.

  - saveSerializedView(): no functional change since last version

M jsf-ri/src/com/sun/faces/application/ViewHandlerImpl.java

- move the responsibility for doing the redirect to createView() from
  renderView(), since it was only designed to catch the initial request.

M jsf-ri/src/com/sun/faces/lifecycle/RestoreViewPhase.java

- introduce private isPostback() method.

+     * @return true if the request method is POST or PUT, or the method
+     * is GET but there are query parameters, or the request is not an
+     * instance of HttpServletRequest.

  Only call restoreView() if isPostback(), otherwise call createView().

M jsf-ri/src/com/sun/faces/renderkit/ResponseStateManagerImpl.java

- modify getTreeStructureToRestore() so it knows the value of the hidden
  field is only a string, not a base64 encoded object tree, if the
  stateSavingMethod is server.

- modify writeState() to not encode the view if we're saving state in
  the server, just write out the id.

- remove unused replaceMarkers method.

M jsf-ri/src/com/sun/faces/taglib/jsf_core/ViewTag.java

- leverage new APIs and rely on impl to delegate to deprecated APIs for
  backwards compatability.

M jsf-ri/systest/build-tests.xml
M jsf-ri/systest/src/com/sun/faces/htmlunit/AbstractTestCase.java
M jsf-ri/systest/src/com/sun/faces/jsptest/JspIntegrationTestCase.java
M jsf-ri/test/com/sun/faces/FacesTestCaseService.java
M jsf-ri/test/com/sun/faces/lifecycle/TestApplyRequestValuesPhase.java
M jsf-ri/test/com/sun/faces/lifecycle/TestLifecycleImpl_initial.java
M jsf-ri/test/com/sun/faces/lifecycle/TestPhase.java
M jsf-ri/test/com/sun/faces/lifecycle/TestProcessValidationsPhase.java
M jsf-ri/test/com/sun/faces/lifecycle/TestRestoreViewPhase.java
M jsf-ri/web/test/RenderResponse_correct
M jsf-ri/web/test/TestLifecycleImpl_initial_correct
M jsf-ri/web/test/TestViewHandlerImpl_correct

- Oof, mondo changes here.


git-svn-id: svn://10.0.0.236/trunk@170818 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-17 01:56:55 +00:00
edburns%acm.org
36351d715a This checkin starts updating the javadocs. Wow. Some of these docs
haven't been touched since 1998!

A dom/classes/org/mozilla/dom/package.html
A dom/classes/org/mozilla/dom/util/package.html
A util/classes/org/mozilla/util/package.html
A webclient/classes_spec/org/mozilla/webclient/overview.html
A webclient/classes_spec/org/mozilla/webclient/package.html
M dist/build.xml
M util/classes/org/mozilla/util/Debug.java
M util/classes/org/mozilla/util/Log.java
M util/classes/org/mozilla/util/Range.java
M util/classes/org/mozilla/util/Utilities.java
M webclient/classes_spec/org/mozilla/webclient/BrowserControl.java
M webclient/classes_spec/org/mozilla/webclient/BrowserControlFactory.java
M webclient/classes_spec/org/mozilla/webclient/ImplObject.java
M webclient/classes_spec/org/mozilla/webclient/Navigation2.java
M webclient/classes_spec/org/mozilla/webclient/WebclientFactory.java
M dom/classes/org/mozilla/dom/events/MouseEventImpl.java

- Changes to allow generation of javadocs from full tree.


git-svn-id: svn://10.0.0.236/trunk@170683 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-15 03:14:16 +00:00
edburns%acm.org
33e259872d This checkin starts updating the javadocs. Wow. Some of these docs
haven't been touched since 1998!

A dom/classes/org/mozilla/dom/package.html
A dom/classes/org/mozilla/dom/util/package.html
A util/classes/org/mozilla/util/package.html
A webclient/classes_spec/org/mozilla/webclient/overview.html
A webclient/classes_spec/org/mozilla/webclient/package.html
M dist/build.xml
M util/classes/org/mozilla/util/Debug.java
M util/classes/org/mozilla/util/Log.java
M util/classes/org/mozilla/util/Range.java
M util/classes/org/mozilla/util/Utilities.java
M webclient/classes_spec/org/mozilla/webclient/BrowserControl.java
M webclient/classes_spec/org/mozilla/webclient/BrowserControlFactory.java
M webclient/classes_spec/org/mozilla/webclient/ImplObject.java
M webclient/classes_spec/org/mozilla/webclient/Navigation2.java
M webclient/classes_spec/org/mozilla/webclient/WebclientFactory.java

- Start refresh of javadocs


git-svn-id: svn://10.0.0.236/trunk@170679 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-15 02:49:16 +00:00
edburns%acm.org
46882a013a *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@170620 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-14 00:37:55 +00:00
edburns%acm.org
9b782a05a8 This checkin enables obtaining an InputStream to read the POST body from
a request on the END_URL_LOAD event.  Please see
<http://lxr.mozilla.org/mozilla/source/java/webclient/test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerTest.java#138>
for an example.

Next step is to clean up the javadocs.

A webclient/test/automated/src/test/DocumentLoadListenerTest0.html
M webclient/src_moz/EmbedProgress.cpp
M webclient/test/automated/src/classes/org/mozilla/util/THTTPD.java
M webclient/test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerTest.java


git-svn-id: svn://10.0.0.236/trunk@170610 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-13 17:56:16 +00:00
edburns%acm.org
73ac2e27c7 Checkpoint. Still waiting for advice on how to get POST inspection working.
M src_moz/EmbedProgress.cpp

- remove PageInfoListener meta-data from END_DOCUMENT_LOAD.  Didn't
  belong there.

M test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java

- print out the request method and response code.


git-svn-id: svn://10.0.0.236/trunk@170053 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-01 20:39:23 +00:00
edburns%acm.org
0b06910537 Thanks to Craig March for catching these extraneous semicolons.
git-svn-id: svn://10.0.0.236/trunk@169992 18797224-902f-48f8-a5cc-f745e15eee43
2005-02-28 17:20:26 +00:00