From d12bc3fbd3a34b8bcf8a6d7c23815f5a79dec49d Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Wed, 23 Jun 2004 14:47:18 +0000 Subject: Move check for javascript after the http[s] checks. 2004-06-23 Christian Persch * embed/mozilla/GlobalHistory.cpp: Move check for javascript after the http[s] checks. --- ChangeLog | 6 ++++++ embed/mozilla/GlobalHistory.cpp | 13 +++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0fc533de2..1d59116e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-06-23 Christian Persch + + * embed/mozilla/GlobalHistory.cpp: + + Move check for javascript after the http[s] checks. + 2004-06-23 Marco Pesenti Gritti * 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; } -- cgit v1.2.3