diff options
author | Grant Gayed <ggayed> | 2007-03-16 19:18:07 +0000 |
---|---|---|
committer | Grant Gayed <ggayed> | 2007-03-16 19:18:07 +0000 |
commit | 39bae42440aa1f947e4e87e35b6aa5bae0660cf2 (patch) | |
tree | 0ce77609fd6ab06599a61833242cbe7c0939573c | |
parent | d557500322cbf73f481875d72096dade43f11e5b (diff) | |
download | eclipse.platform.swt-39bae42440aa1f947e4e87e35b6aa5bae0660cf2.tar.gz eclipse.platform.swt-39bae42440aa1f947e4e87e35b6aa5bae0660cf2.tar.xz eclipse.platform.swt-39bae42440aa1f947e4e87e35b6aa5bae0660cf2.zip |
don't fire a changed event for xulrunner's initial navigation to about:blank
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java index e5e9b35406..88f875dd8b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java @@ -1982,11 +1982,20 @@ int /*long*/ OnLocationChange (int /*long*/ aWebProgress, int /*long*/ aRequest, byte[] dest = new byte[length]; XPCOM.memmove (dest, buffer, length); XPCOM.nsEmbedCString_delete (aSpec); + String url = new String (dest); + + /* + * XULRunner feature. The first time that XULRunner is used to display a page, + * regardless of whether it's via Browser.setURL() or Browser.setText(), it + * navigates to about:blank and fires the corresponding events. Do not send + * this event on the user since it is not expected. + */ + if (IsXULRunner && aRequest == 0 && url.equals (ABOUT_BLANK)) return XPCOM.NS_OK; LocationEvent event = new LocationEvent (browser); event.display = browser.getDisplay (); event.widget = browser; - event.location = new String (dest); + event.location = url; if (event.location.equals (URI_FROMMEMORY)) { /* * If the URI indicates that the page is being rendered from memory |