Commit Graph

20 Commits

Author SHA1 Message Date
edburns%acm.org
88d380dc4c Any ActionEvent that calls java must be posted synchronously.
git-svn-id: svn://10.0.0.236/branches/JAVADEV_RTM_20001102@89144 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-09 20:07:17 +00:00
edburns%acm.org
d186cf20f9 comments
git-svn-id: svn://10.0.0.236/branches/JAVADEV_RTM_20001102@88410 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-02 23:05:01 +00:00
edburns%acm.org
fb9eb2800c bug=49797
r=ashuk

The following files are in the fix for this bug:

M CBrowserContainer.cpp
M CurrentPageImpl.cpp
M HistoryImpl.cpp
M NavigationImpl.cpp

Here is the reason for the bug:

User presses "Refresh" button.  This causes the following code to be executed:

public void refresh(long loadFlags)
{
    ParameterCheck.noLessThan(loadFlags, 0);
    myFactory.throwExceptionIfNotInitialized();
    Assert.assert(-1 != nativeWebShell);

    synchronized(myBrowserControl) {
        nativeRefresh(nativeWebShell, loadFlags);
    }
}

In the process of refresh, on another thread, the user's
eventDispatched() method is called, which calls history.canBack():

public boolean canBack()
{
    myFactory.throwExceptionIfNotInitialized();
    Assert.assert(-1 != nativeWebShell);
    boolean result = false;

    synchronized(myBrowserControl) {
        result = nativeCanBack(nativeWebShell);
    }
    return result;
}

This call blocks on trying to acquire the lock for myBrowserControl, and
the load can't proceed until canBack() returns.  DEADLOCK.

-------------

The fix is to use PostEvent instead of PostSynchronous event.  This
causes the call to nativeRefresh to return immediately.


git-svn-id: svn://10.0.0.236/branches/JAVADEV_RTM_20001102@86938 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-13 22:19:12 +00:00
edburns%acm.org
1a0eda9d5f // PENDING(edburns): HACK workaround for bug 59530. This
// workaround forces the nsBookmarksService to leak so that it
        // never gets destructed, thus the timer never gets canceled and
        // thus the fact that the static nsCOMPtr instance has gone away
        // doesn't matter.

The following files are in this fix:

M src_moz/CBrowserContainer.cpp
M src_moz/CBrowserContainer.h
M src_moz/WindowControlActionEvents.cpp
M src_moz/rdf_util.cpp
M src_moz/wcIBrowserContainer.h
author=edburns
r=ashuk


git-svn-id: svn://10.0.0.236/branches/JAVADEV_RTM_20001102@86242 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-05 19:04:05 +00:00
edburns%acm.org
cb23e73389 This fix is a necessary pre-condition to the fix for 64332. In addition, this fix
contains a workaround to this bug: disable hotspot and disable JIT.

This fix removes the JNIEnv * parameter from util_InitStringConstants().


git-svn-id: svn://10.0.0.236/branches/JAVADEV_RTM_20001102@86126 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-02 23:57:24 +00:00
edburns%acm.org
05ddc0641c bug=62853
r=ashuk

This fix implements getPrefs() and adds a new method,

  public void registerPrefChangedCallback(PrefChangedCallback cb,
                                          String prefName, Object closure);

to preferences.

The following files are in this fix:

A classes_spec/org/mozilla/webclient/PrefChangedCallback.java
M classes_spec/org/mozilla/webclient/Preferences.java
M classes_spec/org/mozilla/webclient/test/EMWindow.java
M classes_spec/org/mozilla/webclient/wrapper_native/PreferencesImpl.java
M src_moz/CBrowserContainer.cpp
M src_moz/PreferencesImpl.cpp
M src_moz/ns_util.h
M src_moz/motif/NativeLoaderStub.cpp


git-svn-id: svn://10.0.0.236/branches/JAVADEV_RTM_20001102@83664 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-14 22:47:43 +00:00
edburns%acm.org
179a3a4d78 Part 2
How to test this bug.

1. Remove your .mozilla directory, or equivalent

1.5 Set up the proxy preferences so you can get to bugzilla.mozilla.org.

2. Start mozilla and go to Edit-Preferences->Advanced->Cookies.

3. Remove all Cookies

4. Accept all cookies, and warn me before accepting cookes

5. Stop mozilla.

Start webclient and visit
<http://bugzilla.mozilla.org/enter_bug.cgi?product=Browser>, then enter
your bugzilla userid and password.  A Confirm dialog should come up.
Make sure that the dialog does the right thing, that is, if you accept
the cookie, exit webclient, start up mozilla, and use the cookie viewer
to see that the cookie is there.  Please note that you see the Enter a
bug page whether you accept the cookie or not.


git-svn-id: svn://10.0.0.236/branches/JAVADEV_RTM_20001102@83508 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-12 01:11:22 +00:00
edburns%acm.org
a014aefe38 This fix adds basic authentication capability to webclient.
public interface Prompt

 * The custom app must implement this interface in order to supply the
 * underlying browser with basic authentication behavior.  The custom
 * app must tell webclient about its Prompt implementation by calling
 * Navigation.setPrompt().  This must be done FOR EACH BrowserControl
 * instance!

public void setPrompt(Prompt yourPrompt);

 * Gives this Navigation instance the ability to call back the custom
 * app when a site with basic authentication is encountered.  The custom
 * app can choose to put up appropriate modal UI.

Please note that due to bug
http://bugzilla.mozilla.org/show_bug.cgi?id=61669 you must disable the
cache to have this work.  Put these lines in your prefs file:

user_pref("browser.cache.disk_cache_size", 0);
user_pref("browser.cache.enabled", false);

The following files are in this fix:

M classes_spec/org/mozilla/webclient/Navigation.java
M classes_spec/org/mozilla/webclient/test/EMWindow.java
A classes_spec/org/mozilla/webclient/test/PasswordDialog.java
M classes_spec/org/mozilla/webclient/wrapper_native/NavigationImpl.java
M src_moz/CBrowserContainer.cpp
M src_moz/CBrowserContainer.h
M src_moz/NavigationImpl.cpp
M src_moz/wcIBrowserContainer.h
M src_moz/motif/NativeLoaderStub.cpp
M src_share/jni_util.cpp
M src_share/jni_util.h
M src_share/jni_util_export.cpp
M src_share/jni_util_export.h
A classes_spec/org/mozilla/webclient/Prompt.java


git-svn-id: svn://10.0.0.236/branches/JAVADEV_RTM_20001102@83172 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-01 01:33:52 +00:00
ashuk%eng.sun.com
4a6f37d5be author=ashuk
r=a=edburns
Bug=58791


git-svn-id: svn://10.0.0.236/trunk@82253 18797224-902f-48f8-a5cc-f745e15eee43
2000-11-03 01:28:27 +00:00
edburns%acm.org
825bc96e67 bug=52883
author=ashuk
r,a=edburns

Make webclient work with the tip.


git-svn-id: svn://10.0.0.236/trunk@80080 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-28 21:37:25 +00:00
edburns%acm.org
ffa897dd6d These changes make it so webclient compiles with the tip as of 20
September 2000.  It will run, but without bookmarks.

The changes consist of the following kinds of changes:

Changes to method signatures for methods implemented by webclient.

Changes to string functions.

Changes to account for the demise of PROGIDS in favor of ContractIDs

Modified files:

M classes_spec/org/mozilla/webclient/test/EMWindow.java
M src_moz/CBrowserContainer.cpp
M src_moz/CurrentPageImpl.cpp
M src_moz/Makefile.win
M src_moz/NativeEventThread.cpp
M src_moz/RDFEnumeration.cpp
M src_moz/RDFTreeNode.cpp
M src_moz/ns_util_export.cpp
M src_moz/rdf_util.cpp


git-svn-id: svn://10.0.0.236/trunk@79658 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-20 21:53:05 +00:00
edburns%acm.org
0898232dc5 This fix was contributed by
*      Jason Mawdsley <jason@macadamian.com>
 *      Louis-Philippe Gagnon <louisphilippe@macadamian.com>

It enables webclient to be built and run under JDK1.1.x.  Note that JavaDOM
does not work under jdk1.1.x.

The fix consists of two elements:

On the Java side, replace all JDK1.2 specific calls with JDK1.1.x
equivalents.  On the native side use pre-processer macro for
JNI_VERSION, like this:

#ifdef JNI_VERSION_1_2

#ifndef JNI_VERSION
#define JNI_VERSION JNI_VERSION_1_2
#endif

#else

#ifndef JNI_VERSION_1_1
#define JNI_VERSION_1_1 0x00010001
#endif

#ifndef JNI_VERSION
#define JNI_VERSION JNI_VERSION_1_1
#endif

#endif // END: JNI_VERSION_1_2

This fix has been tested on win32, solaris, and linux.

The following files are in this fix:

M webclient/classes_spec/org/mozilla/webclient/test/DOMTreeModel.java
M webclient/classes_spec/org/mozilla/webclient/test/DOMViewerFrame.java
M webclient/classes_spec/org/mozilla/webclient/test/EMWindow.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/BookmarksImpl.java
M webclient/classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java
M webclient/src_moz/CBrowserContainer.cpp
M webclient/src_moz/nsActions.cpp
M webclient/src_share/jni_util.cpp
M webclient/src_share/jni_util.h
M webclient/src_share/jni_util_export.cpp


git-svn-id: svn://10.0.0.236/trunk@79490 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-19 00:18:18 +00:00
edburns%acm.org
ec836104c1 r=ashuk
bug=47357
a=edburns
Files in this checkin

M src_moz/CBrowserContainer.cpp
M src_moz/CBrowserContainer.h
M src_moz/ns_util.cpp
M src_moz/ns_util.h
M src_share/jni_util.cpp
M src_share/jni_util.h

cvs diff -u src_moz/CBrowserContainer.cpp src_moz/CBrowserContainer.h src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

This change moves out listener constants and other support data from
src_moz into src_share to enable it to be used in src_ie.

tar -cvf 47357.tar src_moz/CBrowserContainer.cpp src_moz/CBrowserContainer.h src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h


git-svn-id: svn://10.0.0.236/trunk@76567 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 19:52:15 +00:00
edburns%acm.org
1968a5ae56 bug=47357
a=edburns
r=edburns
author=avm

This fix adds a length parameter to the loading of URLs.  It also adds a new util function util_getStringLength().


git-svn-id: svn://10.0.0.236/trunk@76157 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 21:58:56 +00:00
edburns%acm.org
1f01dae006 a=edburns
r=ashuk
bug=47357
M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java
M src_moz/CBrowserContainer.cpp
M src_moz/NativeEventThread.cpp
M src_moz/ns_util.cpp
M src_moz/ns_util.h
M src_share/jni_util.cpp
M src_share/jni_util.h

tar -cvf 47357.2.tar classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java src_moz/CBrowserContainer.cpp src_moz/NativeEventThread.cpp src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

cvs diff -u classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java src_moz/CBrowserContainer.cpp src_moz/NativeEventThread.cpp src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

This change modifes what one has to do on the native side to add a
listener.

 * How to create a new listener type on the native side: <P>

 * 1. add an entry in the gSupportedListenerInterfaces array defined in
 * ns_util.cpp <P>

 * 2. add a corresponding entry in the LISTENER_CLASSES enum in
 * ns_util.h <P>

 * 3. add a jstring to the string constant list in
 * CBrowserContainer.cpp, below.

 * 4. Initialize this jstring constant in CBrowserContainer.cpp
 * initStringConstants() <P>

 * 5. add an entry to the switch statement in NativeEventThread.cpp
 * native{add,remove}Listener <P>

You have to clobber_all in webclient after this change.


git-svn-id: svn://10.0.0.236/trunk@76019 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 21:38:52 +00:00
edburns%acm.org
af2702d036 bug=47357
a=edburns
r=ashuk

This change creates a new directory, java/webclient/src_share, that
contains the code that will be used in both src_moz and src_ie, and any
other native browser wrapping implementations.

Here are the steps I followed to implement this change.

1. Create a new directory java/webclient/src_share

2. Move all jni_util*.* files from src_moz into src_share

3. Make it so src_share compiles into a new .lib

   src_share has no netscape dependencies.  Any functionality that
   depended on ns dependencies was kept in src_moz.  In this case, we
   have a function prototype only in src_share, with the implementation
   in src_moz.  We did this for nsHashtable.  The other trick was for
   things in WebShellInitContext that had nothing to do with Netscape.
   This case was accomodated by creating a new struct, ShareInitContext,
   that contains all WebShellInitContext members that have nothing to do
   with Netscape.  Currently this is just jobject propertiesClass.  I
   modified the WebShellInitContext struct to contain a ShareContext
   struct as its last member.  There are two new methods in jni_util.h
   that allow for the initialization and deallocation of the members of
   the ShareContext struct.

4. Make it so src_moz uses the new .lib to provide the jni_util behavior

  a. Create ns_util* files that include ../src_share/jni_util* files
  appropriately.

  The only tricky part was for things in jni_util.h that

Here's the list of files in this change.

cvs -z3 -n update (in directory D:\Projects\mozilla\java\webclient)
cvs server: Updating .
M Makefile.win // added src_share to DIRS
M src_moz/BookmarksImpl.cpp             // include ns_util instead of jni_util
M src_moz/CBrowserContainer.cpp         // include ns_util instead of jni_util
M src_moz/CBrowserContainer.h           // include ns_util instead of jni_util
M src_moz/CurrentPageImpl.cpp           // include ns_util instead of jni_util
M src_moz/HistoryImpl.cpp               // include ns_util instead of jni_util
M src_moz/Makefile.win                  // include ns_util instead of jni_util
M src_moz/NativeEventThread.cpp         // include ns_util instead of jni_util
M src_moz/NavigationImpl.cpp            // include ns_util instead of jni_util
M src_moz/RDFEnumeration.cpp            // include ns_util instead of jni_util
M src_moz/RDFTreeNode.cpp               // include ns_util instead of jni_util
M src_moz/WindowControlImpl.cpp         // include ns_util instead of jni_util
                                        // also use new util_InitShareContext
                                        // function
M src_moz/WrapperFactoryImpl.cpp        // include ns_util instead of jni_util
R src_moz/jni_util.cpp                  // moved to ../src_share
R src_moz/jni_util.h                    // moved to ../src_share
R src_moz/jni_util_export.cpp           // moved to ../src_share
R src_moz/jni_util_export.h             // moved to ../src_share
M src_moz/nsActions.cpp                 // include ns_util instead of jni_util
                                        // also use new
util_DeallocateShareContext
M src_moz/nsActions.h                   // include ns_util instead of jni_util
A src_moz/ns_util.cpp                   // include jni_util.h
A src_moz/ns_util.h                     // include jni_util.h, changes to
                                        // WebshellInitContext struct
A src_moz/ns_util_export.cpp            // provide impls for methods in
                                        // jni_util_export.h

A src_share/Makefile.win
A src_share/bal_util.cpp
A src_share/bal_util.h
A src_share/jni_util.cpp
A src_share/jni_util.h
A src_share/jni_util_export.cpp
A src_share/jni_util_export.h

*****CVS exited normally with code 0*****


git-svn-id: svn://10.0.0.236/trunk@75504 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 21:32:54 +00:00
ashuk%eng.sun.com
b5f214c647 author = ashuk
r = edburns
a = edburns

Implements RemoveListener


git-svn-id: svn://10.0.0.236/trunk@74818 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 20:07:11 +00:00
edburns%acm.org
7d07b23bb4 bug=41871
a=edburns
r=ashuk

This checkin makes it so CBrowserContainer is properly released.  The
problem was that the CBrowserContainer was still registered to the
docShell as a listener.  The solution was to call
wcIBrowserContianer::RemoveAllListeners() in the WebShellInitContext
deallocator.


git-svn-id: svn://10.0.0.236/trunk@74788 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 01:03:25 +00:00
edburns%acm.org
64743fd04d compile_under_solaris
git-svn-id: svn://10.0.0.236/trunk@73718 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-06 00:39:53 +00:00
ashuk%eng.sun.com
ad8ed2e23e bug=44279
a=edburns
r=edburns
author=ashuk.

This code makes Webclient work with Mozilla M16.


git-svn-id: svn://10.0.0.236/trunk@73562 18797224-902f-48f8-a5cc-f745e15eee43
2000-06-30 00:01:58 +00:00