aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2007-09-13 04:33:52 +0800
committerChristian Persch <chpe@src.gnome.org>2007-09-13 04:33:52 +0800
commit8d53d634f2e2a96495b05657e278a2e8d47efec4 (patch)
treede6a76d8495b50328262464910e2a5f83ef24506 /embed
parent6db24e97b7e87d4ea7cff0c99f80338ce51eea6f (diff)
downloadgsoc2013-epiphany-8d53d634f2e2a96495b05657e278a2e8d47efec4.tar
gsoc2013-epiphany-8d53d634f2e2a96495b05657e278a2e8d47efec4.tar.gz
gsoc2013-epiphany-8d53d634f2e2a96495b05657e278a2e8d47efec4.tar.bz2
gsoc2013-epiphany-8d53d634f2e2a96495b05657e278a2e8d47efec4.tar.lz
gsoc2013-epiphany-8d53d634f2e2a96495b05657e278a2e8d47efec4.tar.xz
gsoc2013-epiphany-8d53d634f2e2a96495b05657e278a2e8d47efec4.tar.zst
gsoc2013-epiphany-8d53d634f2e2a96495b05657e278a2e8d47efec4.zip
We know we do have gecko 1.9, so remove all HAVE_GECKO_* defines.
svn path=/trunk/; revision=7405
Diffstat (limited to 'embed')
-rw-r--r--embed/xulrunner/embed/AutoWindowModalState.cpp18
-rw-r--r--embed/xulrunner/embed/EphyAboutModule.cpp2
-rw-r--r--embed/xulrunner/embed/EphyBrowser.cpp2
-rw-r--r--embed/xulrunner/embed/EphyFind.cpp39
-rw-r--r--embed/xulrunner/embed/EphySidebar.cpp4
-rw-r--r--embed/xulrunner/embed/EphySingle.cpp2
-rw-r--r--embed/xulrunner/embed/EphyUtils.cpp19
-rw-r--r--embed/xulrunner/embed/GeckoPrintService.cpp46
-rw-r--r--embed/xulrunner/embed/GeckoSpellCheckEngine.cpp5
-rw-r--r--embed/xulrunner/embed/GlobalHistory.cpp6
-rw-r--r--embed/xulrunner/embed/MozDownload.cpp2
-rw-r--r--embed/xulrunner/embed/mozilla-embed-single.cpp2
-rw-r--r--embed/xulrunner/embed/mozilla-embed.cpp2
-rw-r--r--embed/xulrunner/src/AutoWindowModalState.cpp4
14 files changed, 9 insertions, 144 deletions
diff --git a/embed/xulrunner/embed/AutoWindowModalState.cpp b/embed/xulrunner/embed/AutoWindowModalState.cpp
index 0ff11e4ab..ca25834b0 100644
--- a/embed/xulrunner/embed/AutoWindowModalState.cpp
+++ b/embed/xulrunner/embed/AutoWindowModalState.cpp
@@ -25,37 +25,19 @@
AutoWindowModalState::AutoWindowModalState (nsIDOMWindow *aWindow)
{
-#ifdef HAVE_GECKO_1_8_1
if (aWindow) {
mWindow = do_QueryInterface (aWindow);
NS_ASSERTION (mWindow, "Should have a window here!");
}
if (mWindow) {
-#ifdef HAVE_GECKO_1_9
mWindow->EnterModalState ();
-#else
- nsCOMPtr<nsPIDOMWindow_MOZILLA_1_8_BRANCH> window (do_QueryInterface (mWindow));
- NS_ENSURE_TRUE (window, );
-
- window->EnterModalState ();
-#endif /* HAVE_GECKO_1_9 */
}
-#endif /* HAVE_GECKO_1_8_1 */
}
AutoWindowModalState::~AutoWindowModalState()
{
-#ifdef HAVE_GECKO_1_8_1
if (mWindow) {
-#ifdef HAVE_GECKO_1_9
mWindow->LeaveModalState ();
-#else
- nsCOMPtr<nsPIDOMWindow_MOZILLA_1_8_BRANCH> window (do_QueryInterface (mWindow));
- NS_ENSURE_TRUE (window, );
-
- window->LeaveModalState ();
-#endif /* HAVE_GECKO_1_9 */
}
-#endif /* HAVE_GECKO_1_8_1 */
}
diff --git a/embed/xulrunner/embed/EphyAboutModule.cpp b/embed/xulrunner/embed/EphyAboutModule.cpp
index 6fb6a5849..e27608e83 100644
--- a/embed/xulrunner/embed/EphyAboutModule.cpp
+++ b/embed/xulrunner/embed/EphyAboutModule.cpp
@@ -94,7 +94,6 @@ EphyAboutModule::NewChannel(nsIURI *aURI,
return NS_ERROR_ILLEGAL_VALUE;
}
-#ifdef HAVE_GECKO_1_9
/* unsigned long getURIFlags(in nsIURI aURI); */
NS_IMETHODIMP
EphyAboutModule::GetURIFlags (nsIURI *aURI,
@@ -103,7 +102,6 @@ EphyAboutModule::GetURIFlags (nsIURI *aURI,
*_result = 0;
return NS_OK;
}
-#endif
/* private functions */
diff --git a/embed/xulrunner/embed/EphyBrowser.cpp b/embed/xulrunner/embed/EphyBrowser.cpp
index f80aeb59a..4c9991a0d 100644
--- a/embed/xulrunner/embed/EphyBrowser.cpp
+++ b/embed/xulrunner/embed/EphyBrowser.cpp
@@ -386,7 +386,6 @@ EphyPopupBlockEventListener::HandleEvent (nsIDOMEvent * aDOMEvent)
popupWindowFeaturesString);
nsCString popupWindowNameString;
-#ifdef HAVE_GECKO_1_9
nsString popupWindowName;
rv = popupEvent->GetPopupWindowName (popupWindowName);
NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
@@ -394,7 +393,6 @@ EphyPopupBlockEventListener::HandleEvent (nsIDOMEvent * aDOMEvent)
NS_UTF16ToCString (popupWindowName,
NS_CSTRING_ENCODING_UTF8,
popupWindowNameString);
-#endif
g_signal_emit_by_name(mOwner->mEmbed, "ge-popup-blocked",
popupWindowURI == NULL ? NULL : popupWindowURIString.get(),
diff --git a/embed/xulrunner/embed/EphyFind.cpp b/embed/xulrunner/embed/EphyFind.cpp
index fa5ebfe94..e6d7cdb04 100644
--- a/embed/xulrunner/embed/EphyFind.cpp
+++ b/embed/xulrunner/embed/EphyFind.cpp
@@ -47,11 +47,6 @@
#include <nsIWebBrowser.h>
#include <nsServiceManagerUtils.h>
-#ifndef HAVE_GECKO_1_9
-#include <nsIDocShellTreeItem.h>
-#include <nsISimpleEnumerator.h>
-#endif
-
#include "gecko-embed-private.h"
#include "ephy-debug.h"
@@ -99,10 +94,8 @@ EphyFind::SetEmbed (EphyEmbed *aEmbed)
NS_ENSURE_SUCCESS (rv, rv);
rv = mFinder->Init (docShell);
-#ifdef HAVE_GECKO_1_9
+#if 0 // FIXME def HAVE_GECKO_1_9
// mFinder->SetSelectionModeAndRepaint (nsISelectionController::SELECTION_ON);
-#else
-// mFinder->SetFocusLinks (PR_TRUE);
#endif
} else {
rv = mFinder->SetDocShell (docShell);
@@ -138,39 +131,9 @@ EphyFind::SetSelectionAttention (PRBool aAttention)
display = nsISelectionController::SELECTION_ON;
}
-#ifdef HAVE_GECKO_1_9
if (mFinder) {
mFinder->SetSelectionModeAndRepaint (display);
}
-#else
- nsresult rv;
- nsCOMPtr<nsIDocShell> shell (do_GetInterface (mWebBrowser, &rv));
- /* It's okay for this to fail, if the tab is closing, or if
- * we weren't attached to any tab yet
- */
- if (NS_FAILED (rv) || !shell) return;
-
- nsCOMPtr<nsISimpleEnumerator> enumerator;
- rv = shell->GetDocShellEnumerator (nsIDocShellTreeItem::typeContent,
- nsIDocShell::ENUMERATE_FORWARDS,
- getter_AddRefs (enumerator));
- NS_ENSURE_SUCCESS (rv, );
-
- PRBool hasMore = PR_FALSE;
- while (NS_SUCCEEDED (enumerator->HasMoreElements (&hasMore)) && hasMore) {
- nsCOMPtr<nsISupports> element;
- enumerator->GetNext (getter_AddRefs (element));
- if (!element) continue;
-
- nsCOMPtr<nsISelectionDisplay> sd (do_GetInterface (element));
- if (!sd) continue;
-
- nsCOMPtr<nsISelectionController> controller (do_QueryInterface (sd));
- if (!controller) continue;
-
- controller->SetDisplaySelection (display);
- }
-#endif /* HAVE_GECKO_1_9 */
}
EphyEmbedFindResult
diff --git a/embed/xulrunner/embed/EphySidebar.cpp b/embed/xulrunner/embed/EphySidebar.cpp
index 92e0823c2..1f02453d7 100644
--- a/embed/xulrunner/embed/EphySidebar.cpp
+++ b/embed/xulrunner/embed/EphySidebar.cpp
@@ -113,8 +113,6 @@ EphySidebar::AddSearchEngine (const char *aEngineURL,
return NS_OK;
}
-#ifdef HAVE_GECKO_1_9
-
/* void addMicrosummaryGenerator (in string generatorURL); */
NS_IMETHODIMP
EphySidebar::AddMicrosummaryGenerator (const char *generatorURL)
@@ -122,8 +120,6 @@ EphySidebar::AddMicrosummaryGenerator (const char *generatorURL)
return NS_ERROR_NOT_IMPLEMENTED;
}
-#endif /* HAVE_GECKO_1_9 */
-
/* static */ NS_METHOD
EphySidebar::Register (nsIComponentManager* aComponentManager,
nsIFile* aPath,
diff --git a/embed/xulrunner/embed/EphySingle.cpp b/embed/xulrunner/embed/EphySingle.cpp
index 74eaf21d6..b8abe7585 100644
--- a/embed/xulrunner/embed/EphySingle.cpp
+++ b/embed/xulrunner/embed/EphySingle.cpp
@@ -348,11 +348,9 @@ mozilla_cookie_to_ephy_cookie (nsICookie *cookie)
info->real_expires = expiry;
}
-#ifdef HAVE_GECKO_1_9
PRBool isHttpOnly = PR_FALSE;
cookie2->GetIsHttpOnly (&isHttpOnly);
info->is_http_only = isHttpOnly != PR_FALSE;
-#endif
return info;
}
diff --git a/embed/xulrunner/embed/EphyUtils.cpp b/embed/xulrunner/embed/EphyUtils.cpp
index 3f1b23687..816651b55 100644
--- a/embed/xulrunner/embed/EphyUtils.cpp
+++ b/embed/xulrunner/embed/EphyUtils.cpp
@@ -23,27 +23,23 @@
#include <nsStringAPI.h>
-#include <gtkmozembed.h>
#include <nsCOMPtr.h>
+#include <nsDOMJSUtils.h> /* for GetScriptContextFromJSContext */
#include <nsIDOMWindow.h>
#include <nsIEmbeddingSiteWindow.h>
#include <nsIFile.h>
#include <nsIIOService.h>
+#include <nsIScriptContext.h>
+#include <nsIScriptGlobalObject.h>
#include <nsIServiceManager.h>
#include <nsIURI.h>
#include <nsIWebBrowserChrome.h>
#include <nsIWindowWatcher.h>
#include <nsIXPConnect.h>
+#include <nsPIDOMWindow.h>
#include <nsServiceManagerUtils.h>
#include <nsXPCOM.h>
-#ifdef HAVE_GECKO_1_9
-#include <nsPIDOMWindow.h>
-#include <nsDOMJSUtils.h> /* for GetScriptContextFromJSContext */
-#include <nsIScriptContext.h>
-#include <nsIScriptGlobalObject.h>
-#endif
-
#include "ephy-embed-shell.h"
#include "ephy-embed-single.h"
#include "ephy-file-helpers.h"
@@ -186,10 +182,6 @@ EphyJSUtils::IsCalledFromScript ()
nsIDOMWindow *
EphyJSUtils::GetDOMWindowFromCallContext ()
{
- /* TODO: We can do this on 1.8 too, but we'd need to use headers which include private string API
- * so we'll have to move this to MozillaPrivate
- */
-#ifdef HAVE_GECKO_1_9
nsresult rv;
nsCOMPtr<nsIXPConnect> xpc (do_GetService(nsIXPConnect::GetCID(), &rv));
NS_ENSURE_SUCCESS (rv, nsnull);
@@ -212,7 +204,4 @@ EphyJSUtils::GetDOMWindowFromCallContext ()
if (!piWindow) return nsnull;
return piWindow->GetOuterWindow ();
-#else
- return nsnull;
-#endif
}
diff --git a/embed/xulrunner/embed/GeckoPrintService.cpp b/embed/xulrunner/embed/GeckoPrintService.cpp
index e0d589ef8..8a8b67d5a 100644
--- a/embed/xulrunner/embed/GeckoPrintService.cpp
+++ b/embed/xulrunner/embed/GeckoPrintService.cpp
@@ -179,10 +179,8 @@ GeckoPrintService::ShowPrintDialog (nsIDOMWindow *aParent,
GTK_PRINT_CAPABILITY_COLLATE |
GTK_PRINT_CAPABILITY_REVERSE |
GTK_PRINT_CAPABILITY_SCALE |
- GTK_PRINT_CAPABILITY_GENERATE_PS);
-#if 0 //def HAVE_GECKO_1_9
- capabilities = GtkPrintCapabilities (capabilities | GTK_PRINT_CAPABILITY_GENERATE_PDF);
-#endif
+ GTK_PRINT_CAPABILITY_GENERATE_PS |
+ GTK_PRINT_CAPABILITY_GENERATE_PDF);
gtk_print_unix_dialog_set_manual_capabilities (print_dialog, capabilities);
gtk_print_unix_dialog_set_page_setup (print_dialog,
@@ -569,7 +567,6 @@ GeckoPrintService::TranslateSettings (GtkPrintSettings *aGtkSettings,
aSettings->SetPrintPageDelay (50);
if (aIsForPrinting) {
-#if 0 //def HAVE_GECKO_1_9
NS_ENSURE_TRUE (aPrinter, NS_ERROR_FAILURE);
const char *format = gtk_print_settings_get (aGtkSettings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT);
@@ -587,7 +584,6 @@ GeckoPrintService::TranslateSettings (GtkPrintSettings *aGtkSettings,
format, gtk_printer_get_name (aPrinter));
return NS_ERROR_FAILURE;
}
-#endif
int n_copies = gtk_print_settings_get_n_copies (aGtkSettings);
if (n_copies <= 0)
@@ -673,45 +669,7 @@ GeckoPrintService::TranslateSettings (GtkPrintSettings *aGtkSettings,
aSettings->SetPaperSizeType (nsIPrintSettings::kPaperSizeDefined);
aSettings->SetPaperWidth (gtk_paper_size_get_width (paperSize, GTK_UNIT_MM));
aSettings->SetPaperHeight (gtk_paper_size_get_height (paperSize, GTK_UNIT_MM));
-
-#ifdef HAVE_GECKO_1_9
aSettings->SetPaperName (NS_ConvertUTF8toUTF16 (gtk_paper_size_get_name (paperSize)).get ());
-#else
-{
- /* Mozilla bug https://bugzilla.mozilla.org/show_bug.cgi?id=307404
- * means that we cannot actually use any paper sizes except mozilla's
- * builtin list, and we must refer to them *by name*!
- */
- static const struct {
- const char gtkPaperName[13];
- const char mozPaperName[10];
- } paperTable [] = {
- { GTK_PAPER_NAME_A5, "A5" },
- { GTK_PAPER_NAME_A4, "A4" },
- { GTK_PAPER_NAME_A3, "A3" },
- { GTK_PAPER_NAME_LETTER, "Letter" },
- { GTK_PAPER_NAME_LEGAL, "Legal" },
- { GTK_PAPER_NAME_EXECUTIVE, "Executive" },
- };
-
- const char *paperName = gtk_paper_size_get_name (paperSize);
-
- PRUint32 i;
- for (i = 0; i < G_N_ELEMENTS (paperTable); i++) {
- if (g_ascii_strcasecmp (paperTable[i].gtkPaperName, paperName) == 0) {
- paperName = paperTable[i].mozPaperName;
- break;
- }
- }
- if (i == G_N_ELEMENTS (paperTable)) {
- /* Not in table, fall back to A4 */
- g_warning ("Unknown paper name '%s', falling back to A4", gtk_paper_size_get_name (paperSize));
- paperName = paperTable[1].mozPaperName;
- }
-
- aSettings->SetPaperName (NS_ConvertUTF8toUTF16 (paperName).get ());
-}
-#endif /* !HAVE_GECKO_1_9 */
/* Sucky mozilla wants margins in inch! */
aSettings->SetMarginTop (gtk_page_setup_get_top_margin (aPageSetup, GTK_UNIT_INCH));
diff --git a/embed/xulrunner/embed/GeckoSpellCheckEngine.cpp b/embed/xulrunner/embed/GeckoSpellCheckEngine.cpp
index 59ab5df2d..3f8de02fa 100644
--- a/embed/xulrunner/embed/GeckoSpellCheckEngine.cpp
+++ b/embed/xulrunner/embed/GeckoSpellCheckEngine.cpp
@@ -21,7 +21,6 @@
#include "mozilla-config.h"
#include "config.h"
-//#include <bonobo.h>
#include <stdio.h>
#include <stdlib.h>
@@ -34,10 +33,6 @@
#include "GeckoSpellCheckEngine.h"
-#ifndef HAVE_GECKO_1_9
-#define ToNewUnicode NS_StringCloneData
-#endif
-
GeckoSpellCheckEngine::GeckoSpellCheckEngine ()
{
LOG ("GeckoSpellCheckEngine ctor [%p]", (void*) this);
diff --git a/embed/xulrunner/embed/GlobalHistory.cpp b/embed/xulrunner/embed/GlobalHistory.cpp
index efcda79f9..84c2d475b 100644
--- a/embed/xulrunner/embed/GlobalHistory.cpp
+++ b/embed/xulrunner/embed/GlobalHistory.cpp
@@ -155,8 +155,6 @@ NS_IMETHODIMP MozGlobalHistory::SetPageTitle(nsIURI *aURI,
#ifdef HAVE_NSIGLOBALHISTORY3_H
-#ifdef HAVE_GECKO_1_9
-
/* unsigned long getURIGeckoFlags(in nsIURI aURI); */
NS_IMETHODIMP
MozGlobalHistory::GetURIGeckoFlags(nsIURI *aURI,
@@ -206,9 +204,7 @@ MozGlobalHistory::SetURIGeckoFlags(nsIURI *aURI,
return NS_ERROR_FAILURE;
}
-#endif /* HAVE_GECKO_1_9 */
-
-/* void addDocumentRedirect (in nsIChannel
+/* void addDocumentRedirect (in nsIChannel
aOldChannel,
in nsIChannel aNewChannel,
in PRInt32 aFlags,
diff --git a/embed/xulrunner/embed/MozDownload.cpp b/embed/xulrunner/embed/MozDownload.cpp
index 0853d60e3..e6ec318a7 100644
--- a/embed/xulrunner/embed/MozDownload.cpp
+++ b/embed/xulrunner/embed/MozDownload.cpp
@@ -467,7 +467,6 @@ MozDownload::OnProgressChange64 (nsIWebProgress *aWebProgress,
return NS_OK;
}
-#ifdef HAVE_GECKO_1_9
/* boolean onRefreshAttempted (in nsIWebProgress aWebProgress, in nsIURI aRefreshURI, in long aDelay, in boolean aSameURI); */
NS_IMETHODIMP
MozDownload::OnRefreshAttempted(nsIWebProgress *aWebProgress,
@@ -479,7 +478,6 @@ MozDownload::OnRefreshAttempted(nsIWebProgress *aWebProgress,
*allowRefresh = PR_TRUE;
return NS_OK;
}
-#endif
NS_IMETHODIMP
MozDownload::OnLocationChange (nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *location)
diff --git a/embed/xulrunner/embed/mozilla-embed-single.cpp b/embed/xulrunner/embed/mozilla-embed-single.cpp
index 9c97b7d3b..70abb6dd0 100644
--- a/embed/xulrunner/embed/mozilla-embed-single.cpp
+++ b/embed/xulrunner/embed/mozilla-embed-single.cpp
@@ -1034,7 +1034,7 @@ static void
impl_add_password (EphyPasswordManager *manager,
EphyPasswordInfo *info)
{
-#ifndef HAVE_GECKO_1_9
+#if 0 // FIXME ndef HAVE_GECKO_1_9
nsCOMPtr<nsIPasswordManager> pm =
do_GetService (NS_PASSWORDMANAGER_CONTRACTID);
if (!pm) return;
diff --git a/embed/xulrunner/embed/mozilla-embed.cpp b/embed/xulrunner/embed/mozilla-embed.cpp
index 854299c46..c14a549b3 100644
--- a/embed/xulrunner/embed/mozilla-embed.cpp
+++ b/embed/xulrunner/embed/mozilla-embed.cpp
@@ -351,13 +351,11 @@ impl_load (EphyEmbed *embed,
}
}
-#ifdef HAVE_GECKO_1_8_1
if (flags & EPHY_EMBED_LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP)
{
browser->LoadURI (url, nsIWebNavigation::LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP, uri);
}
else
-#endif /* HAVE_GECKO_1_8_1 */
{
browser->LoadURI (url, nsIWebNavigation::LOAD_FLAGS_NONE, uri);
}
diff --git a/embed/xulrunner/src/AutoWindowModalState.cpp b/embed/xulrunner/src/AutoWindowModalState.cpp
index ca7596b38..f64790214 100644
--- a/embed/xulrunner/src/AutoWindowModalState.cpp
+++ b/embed/xulrunner/src/AutoWindowModalState.cpp
@@ -25,19 +25,15 @@
AutoWindowModalState::AutoWindowModalState (nsIDOMWindow *aWindow)
{
-#ifdef HAVE_GECKO_1_9
mWindow = do_QueryInterface (aWindow);
if (mWindow) {
mWindow->EnterModalState ();
}
-#endif
}
AutoWindowModalState::~AutoWindowModalState()
{
-#ifdef HAVE_GECKO_1_9
if (mWindow) {
mWindow->LeaveModalState ();
}
-#endif
}