a=edburns
bug: pressing BACK hangs webclient Files touched File: DocumentLoadEvent.java Status: Locally Modified Made the constants final so they can be used in a switch statement File: EMWindow.java Status: Locally Modified Modified eventDispatched() so it doesn't call any webclient events. This was causing the hang. Took advantage of the newly implemented ability to pass a string from the mozilla event handler into java. File: DocumentLoaderObserverImpl.cpp Status: Locally Modified Create a jstring from the url in the OnStartDocumentLoad event. Pass it on to java. File: jni_util.cpp Status: Locally Modified Wrapped JNU_GetEnv in BAL stuff so it works from Star. File: WebclinetEventListener.java Status: Locally Modified Added comment to eventDispatched. git-svn-id: svn://10.0.0.236/trunk@66829 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -25,14 +25,14 @@ package org.mozilla.webclient;
|
||||
public class DocumentLoadEvent extends WebclientEvent
|
||||
{
|
||||
|
||||
public static long START_DOCUMENT_LOAD_EVENT_MASK = 1;
|
||||
public static long END_DOCUMENT_LOAD_EVENT_MASK = 1 << 2;
|
||||
public static long START_URL_LOAD_EVENT_MASK = 1 << 3;
|
||||
public static long END_URL_LOAD_EVENT_MASK = 1 << 4;
|
||||
public static long PROGRESS_URL_LOAD_EVENT_MASK = 1 << 5;
|
||||
public static long STATUS_URL_LOAD_EVENT_MASK = 1 << 6;
|
||||
public static long UNKNOWN_CONTENT_EVENT_MASK = 1 << 7;
|
||||
public static long FETCH_INTERRUPT_EVENT_MASK = 1 << 8;
|
||||
public static final long START_DOCUMENT_LOAD_EVENT_MASK = 1;
|
||||
public static final long END_DOCUMENT_LOAD_EVENT_MASK = 1 << 2;
|
||||
public static final long START_URL_LOAD_EVENT_MASK = 1 << 3;
|
||||
public static final long END_URL_LOAD_EVENT_MASK = 1 << 4;
|
||||
public static final long PROGRESS_URL_LOAD_EVENT_MASK = 1 << 5;
|
||||
public static final long STATUS_URL_LOAD_EVENT_MASK = 1 << 6;
|
||||
public static final long UNKNOWN_CONTENT_EVENT_MASK = 1 << 7;
|
||||
public static final long FETCH_INTERRUPT_EVENT_MASK = 1 << 8;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
|
||||
@@ -25,6 +25,13 @@ package org.mozilla.webclient;
|
||||
public interface WebclientEventListener
|
||||
{
|
||||
|
||||
/**
|
||||
|
||||
* Important: do not call any webclient methods during this callback.
|
||||
* It may caus your app to deadlock.
|
||||
|
||||
*/
|
||||
|
||||
public void eventDispatched(WebclientEvent event);
|
||||
|
||||
} // end of interface WebclientEventListener
|
||||
|
||||
@@ -50,7 +50,7 @@ import org.mozilla.util.Assert;
|
||||
* This is a test application for using the BrowserControl.
|
||||
|
||||
*
|
||||
* @version $Id: EMWindow.java,v 1.4 2000-04-20 03:16:15 ashuk%eng.sun.com Exp $
|
||||
* @version $Id: EMWindow.java,v 1.5 2000-04-22 02:00:57 edburns%acm.org Exp $
|
||||
*
|
||||
* @see org.mozilla.webclient.BrowserControlFactory
|
||||
|
||||
@@ -120,6 +120,8 @@ public class EMWindow extends Frame implements DialogClient, ActionListener, Doc
|
||||
// Create the URL field
|
||||
urlField = new TextField("", 30);
|
||||
urlField.addActionListener(this);
|
||||
urlField.setText(url);
|
||||
|
||||
|
||||
// Create the buttons sub panel
|
||||
buttonsPanel = new Panel();
|
||||
@@ -436,13 +438,24 @@ public void dialogCancelled(Dialog d) {
|
||||
// From DocumentLoadListener
|
||||
//
|
||||
|
||||
/**
|
||||
|
||||
* Important: do not call any webclient methods during this callback.
|
||||
* It may caus your app to deadlock.
|
||||
|
||||
*/
|
||||
|
||||
public void eventDispatched(WebclientEvent event)
|
||||
{
|
||||
if (event instanceof DocumentLoadEvent) {
|
||||
String currentURL = currentPage.getCurrentURL();
|
||||
System.out.println("debug: edburns: Currently Viewing: " +
|
||||
currentURL);
|
||||
urlField.setText(currentURL);
|
||||
switch ((int) event.getType()) {
|
||||
case ((int) DocumentLoadEvent.START_DOCUMENT_LOAD_EVENT_MASK):
|
||||
String currentURL = (String) event.getEventData();
|
||||
System.out.println("debug: edburns: Currently Viewing: " +
|
||||
currentURL);
|
||||
urlField.setText(currentURL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user