diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | embed/mozilla/GlobalHistory.cpp | 13 |
2 files changed, 11 insertions, 8 deletions
@@ -1,3 +1,9 @@ +2004-06-23 Christian Persch <chpe@cvs.gnome.org> + + * embed/mozilla/GlobalHistory.cpp: + + Move check for javascript after the http[s] checks. + 2004-06-23 Marco Pesenti Gritti <marco@gnome.org> * src/bookmarks/ephy-bookmarks-import.c: diff --git a/embed/mozilla/GlobalHistory.cpp b/embed/mozilla/GlobalHistory.cpp index 6be4c2a37..4e44a409f 100644 --- a/embed/mozilla/GlobalHistory.cpp +++ b/embed/mozilla/GlobalHistory.cpp @@ -48,11 +48,7 @@ NS_IMETHODIMP MozGlobalHistory::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aT NS_ENSURE_ARG (aURI); - PRBool isJavascript; - rv = aURI->SchemeIs("javascript", &isJavascript); - NS_ENSURE_SUCCESS(rv, rv); - - if (isJavascript || aRedirect || !aToplevel) + if (aRedirect || !aToplevel) { return NS_OK; } @@ -73,15 +69,16 @@ NS_IMETHODIMP MozGlobalHistory::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aT if (!isHTTP && !isHTTPS) { - PRBool isAbout, isViewSource, isChrome, isData; + PRBool isJavascript, isAbout, isViewSource, isChrome, isData; - rv = aURI->SchemeIs("about", &isAbout); + rv = aURI->SchemeIs("javascript", &isJavascript); + rv |= aURI->SchemeIs("about", &isAbout); rv |= aURI->SchemeIs("view-source", &isViewSource); rv |= aURI->SchemeIs("chrome", &isChrome); rv |= aURI->SchemeIs("data", &isData); NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); - if (isAbout || isViewSource || isChrome || isData) + if (isJavascript ||isAbout || isViewSource || isChrome || isData) { return NS_OK; } |