From 365a2dc852c4b86aa9d8cce729634821b0c0e231 Mon Sep 17 00:00:00 2001 From: Josselin Mouette Date: Thu, 27 Sep 2007 12:42:57 +0000 Subject: EphyContentPolicy::ShouldLoad: use the same content policy for http and https, allowing adblock to work on https. Patch reviewed by Christian Persch, fixes bug#471583. svn path=/trunk/; revision=7498 --- embed/mozilla/EphyContentPolicy.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'embed/mozilla/EphyContentPolicy.cpp') diff --git a/embed/mozilla/EphyContentPolicy.cpp b/embed/mozilla/EphyContentPolicy.cpp index fc367c2b1..f72f2f172 100644 --- a/embed/mozilla/EphyContentPolicy.cpp +++ b/embed/mozilla/EphyContentPolicy.cpp @@ -128,10 +128,6 @@ EphyContentPolicy::ShouldLoad(PRUint32 aContentType, aContentLocation->SchemeIs ("resource", &isResource); if (isChrome || isResource) return NS_OK; - PRBool isHttps = PR_FALSE; - aContentLocation->SchemeIs ("https", &isHttps); - if (isHttps) return NS_OK; - /* is this url allowed ? */ nsCString contentSpec; aContentLocation->GetSpec (contentSpec); @@ -170,6 +166,10 @@ EphyContentPolicy::ShouldLoad(PRUint32 aContentType, } } + PRBool isHttps = PR_FALSE; + aContentLocation->SchemeIs ("https", &isHttps); + if (isHttps) return NS_OK; + PRBool isHttp = PR_FALSE; aContentLocation->SchemeIs ("http", &isHttp); if (isHttp) return NS_OK; -- cgit v1.2.3