From 6dadad9e910cee17e5a0b67c52ecab39b8c1bd0b Mon Sep 17 00:00:00 2001 From: "reed@reedloden.com" Date: Fri, 9 May 2008 00:25:29 -0700 Subject: [PATCH] Bug 398811 - "Remove MOZILLA_1_8_BRANCH ifdefs from toolkit on trunk" [p=mh+mozilla@glandium.org (Mike Hommey) r=gavin a1.9=damons] --- toolkit/components/places/src/nsFaviconService.cpp | 2 -- toolkit/components/places/src/nsFaviconService.h | 4 ++++ toolkit/components/places/src/nsMaybeWeakPtr.h | 4 ---- toolkit/components/places/src/nsNavHistory.cpp | 2 -- toolkit/components/places/src/nsNavHistoryQuery.h | 12 ------------ .../components/satchel/src/nsStorageFormHistory.h | 6 ------ .../url-classifier/src/nsUrlClassifierDBService.h | 4 ---- 7 files changed, 4 insertions(+), 30 deletions(-) diff --git a/toolkit/components/places/src/nsFaviconService.cpp b/toolkit/components/places/src/nsFaviconService.cpp index 48bd478233b6..059478e53e8a 100644 --- a/toolkit/components/places/src/nsFaviconService.cpp +++ b/toolkit/components/places/src/nsFaviconService.cpp @@ -960,9 +960,7 @@ FaviconLoadListener::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, NS_ENSURE_SUCCESS(rv, rv); sniffer->GetMIMETypeFromContent( -#ifndef MOZILLA_1_8_BRANCH aRequest, -#endif reinterpret_cast(const_cast(mData.get())), mData.Length(), mimeType); // ignore errors: mime type will be left empty and we'll try the next sniffer diff --git a/toolkit/components/places/src/nsFaviconService.h b/toolkit/components/places/src/nsFaviconService.h index 3e781c1f6358..1b1abd1e20ca 100644 --- a/toolkit/components/places/src/nsFaviconService.h +++ b/toolkit/components/places/src/nsFaviconService.h @@ -129,5 +129,9 @@ private: }; #define FAVICON_DEFAULT_URL "chrome://mozapps/skin/places/defaultFavicon.png" +#ifdef MOZ_WIDGET_GTK2 +#define FAVICON_ERRORPAGE_URL "moz-icon://stock/gtk-dialog-warning?size=menu" +#else #define FAVICON_ERRORPAGE_URL "chrome://global/skin/icons/warning-16.png" +#endif #define FAVICON_ANNOTATION_NAME "favicon" diff --git a/toolkit/components/places/src/nsMaybeWeakPtr.h b/toolkit/components/places/src/nsMaybeWeakPtr.h index 0e4134374b9a..0bcc2f5201d8 100644 --- a/toolkit/components/places/src/nsMaybeWeakPtr.h +++ b/toolkit/components/places/src/nsMaybeWeakPtr.h @@ -43,10 +43,6 @@ #include "nsWeakReference.h" #include "nsTArray.h" -#ifdef MOZILLA_1_8_BRANCH -#define NS_GET_TEMPLATE_IID NS_GET_IID -#endif - // nsMaybeWeakPtr is a helper object to hold a strong-or-weak reference // to the template class. It's pretty minimal, but sufficient. diff --git a/toolkit/components/places/src/nsNavHistory.cpp b/toolkit/components/places/src/nsNavHistory.cpp index 8b9976c316d6..7493086a2bea 100644 --- a/toolkit/components/places/src/nsNavHistory.cpp +++ b/toolkit/components/places/src/nsNavHistory.cpp @@ -4476,7 +4476,6 @@ nsNavHistory::GetPageTitle(nsIURI* aURI, nsAString& aTitle) } -#ifndef MOZILLA_1_8_BRANCH // nsNavHistory::GetURIGeckoFlags // // FIXME: should we try to use annotations for this stuff? @@ -4497,7 +4496,6 @@ nsNavHistory::SetURIGeckoFlags(nsIURI* aURI, PRUint32 aFlags) { return NS_ERROR_NOT_IMPLEMENTED; } -#endif // nsIGlobalHistory3 *********************************************************** diff --git a/toolkit/components/places/src/nsNavHistoryQuery.h b/toolkit/components/places/src/nsNavHistoryQuery.h index 7acec2dbef3d..a76fd5f1fe94 100644 --- a/toolkit/components/places/src/nsNavHistoryQuery.h +++ b/toolkit/components/places/src/nsNavHistoryQuery.h @@ -59,11 +59,7 @@ public: nsNavHistoryQuery(); // note: we use a copy constructor in Clone(), the default is good enough -#ifdef MOZILLA_1_8_BRANCH - NS_DEFINE_STATIC_IID_ACCESSOR(NS_NAVHISTORYQUERY_IID) -#else NS_DECLARE_STATIC_IID_ACCESSOR(NS_NAVHISTORYQUERY_IID) -#endif NS_DECL_ISUPPORTS NS_DECL_NSINAVHISTORYQUERY @@ -105,9 +101,7 @@ protected: nsTArray mFolders; }; -#ifndef MOZILLA_1_8_BRANCH NS_DEFINE_STATIC_IID_ACCESSOR(nsNavHistoryQuery, NS_NAVHISTORYQUERY_IID) -#endif // nsNavHistoryQueryOptions @@ -128,11 +122,7 @@ public: mQueryType(nsINavHistoryQueryOptions::QUERY_TYPE_HISTORY) { } -#ifdef MOZILLA_1_8_BRANCH - NS_DEFINE_STATIC_IID_ACCESSOR(NS_NAVHISTORYQUERYOPTIONS_IID) -#else NS_DECLARE_STATIC_IID_ACCESSOR(NS_NAVHISTORYQUERYOPTIONS_IID) -#endif NS_DECL_ISUPPORTS NS_DECL_NSINAVHISTORYQUERYOPTIONS @@ -173,9 +163,7 @@ private: PRUint16 mQueryType; }; -#ifndef MOZILLA_1_8_BRANCH NS_DEFINE_STATIC_IID_ACCESSOR(nsNavHistoryQueryOptions, NS_NAVHISTORYQUERYOPTIONS_IID) -#endif #endif // nsNavHistoryQuery_h_ diff --git a/toolkit/components/satchel/src/nsStorageFormHistory.h b/toolkit/components/satchel/src/nsStorageFormHistory.h index 2efa3f5c5a86..a516937b7815 100644 --- a/toolkit/components/satchel/src/nsStorageFormHistory.h +++ b/toolkit/components/satchel/src/nsStorageFormHistory.h @@ -68,11 +68,7 @@ template class nsTArray; class nsIFormHistoryPrivate : public nsISupports { public: -#ifdef MOZILLA_1_8_BRANCH - NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFORMHISTORYPRIVATE_IID) -#else NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFORMHISTORYPRIVATE_IID) -#endif mozIStorageConnection* GetStorageConnection() { return mDBConn; } @@ -80,9 +76,7 @@ class nsIFormHistoryPrivate : public nsISupports nsCOMPtr mDBConn; }; -#ifndef MOZILLA_1_8_BRANCH NS_DEFINE_STATIC_IID_ACCESSOR(nsIFormHistoryPrivate, NS_IFORMHISTORYPRIVATE_IID) -#endif class nsFormHistory : public nsIFormHistory2, public nsIFormHistoryPrivate, diff --git a/toolkit/components/url-classifier/src/nsUrlClassifierDBService.h b/toolkit/components/url-classifier/src/nsUrlClassifierDBService.h index d2f202281e29..f50a1ca9d573 100644 --- a/toolkit/components/url-classifier/src/nsUrlClassifierDBService.h +++ b/toolkit/components/url-classifier/src/nsUrlClassifierDBService.h @@ -75,11 +75,7 @@ public: static nsUrlClassifierDBService* GetInstance(nsresult *result); -#ifdef MOZILLA_1_8_BRANCH - NS_DEFINE_STATIC_IID_ACCESSOR(NS_URLCLASSIFIERDBSERVICE_CID) -#else NS_DECLARE_STATIC_IID_ACCESSOR(NS_URLCLASSIFIERDBSERVICE_CID) -#endif NS_DECL_ISUPPORTS NS_DECL_NSIURLCLASSIFIERDBSERVICE