aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-08-05 05:15:14 +0800
committerChristian Persch <chpe@src.gnome.org>2004-08-05 05:15:14 +0800
commit92472dc6a4b9f851eed9b40106d03e0e10ee06a0 (patch)
tree9d4d62c7cce3270fcda08126d50646c0ca7662a5 /embed/mozilla
parent8e29e18e7a936a07e78d47feb33213c46e80378d (diff)
downloadgsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.tar
gsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.tar.gz
gsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.tar.bz2
gsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.tar.lz
gsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.tar.xz
gsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.tar.zst
gsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.zip
Code cleanup.
2004-08-04 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/EphyBrowser.cpp: Code cleanup.
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/EphyBrowser.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index 690a5e24c..77ceadfb1 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -163,7 +163,6 @@ NS_IMETHODIMP
EphyFaviconEventListener::HandleEvent(nsIDOMEvent* aDOMEvent)
{
nsCOMPtr<nsIDOMEventTarget> eventTarget;
-
aDOMEvent->GetTarget(getter_AddRefs(eventTarget));
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(eventTarget);
@@ -177,19 +176,17 @@ EphyFaviconEventListener::HandleEvent(nsIDOMEvent* aDOMEvent)
NS_IMETHODIMP
EphyPopupBlockEventListener::HandleEvent (nsIDOMEvent * aDOMEvent)
{
- nsresult rv;
-
NS_ENSURE_TRUE (mOwner != NULL, NS_ERROR_FAILURE);
nsCOMPtr<nsIDOMPopupBlockedEvent> popupEvent =
- do_QueryInterface (aDOMEvent, &rv);
- NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
+ do_QueryInterface (aDOMEvent);
+ NS_ENSURE_TRUE (popupEvent, NS_ERROR_FAILURE);
nsCOMPtr<nsIURI> popupWindowURI;
- rv = popupEvent->GetPopupWindowURI (getter_AddRefs (popupWindowURI));
- NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
- NS_ENSURE_SUCCESS (popupWindowURI != NULL, NS_ERROR_FAILURE);
+ popupEvent->GetPopupWindowURI (getter_AddRefs (popupWindowURI));
+ NS_ENSURE_TRUE (popupWindowURI, NS_ERROR_FAILURE);
+ nsresult rv;
nsEmbedCString popupWindowURIString;
rv = popupWindowURI->GetSpec (popupWindowURIString);
NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
@@ -215,16 +212,16 @@ EphyBrowser::EphyBrowser ()
, mPopupBlockEventListener(nsnull)
, mInitialized(PR_FALSE)
{
+ LOG ("EphyBrowser ctor (%p)", this)
}
EphyBrowser::~EphyBrowser ()
{
+ LOG ("EphyBrowser dtor (%p)", this)
}
nsresult EphyBrowser::Init (GtkMozEmbed *mozembed)
{
- nsresult rv;
-
if (mInitialized) return NS_OK;
gtk_moz_embed_get_nsIWebBrowser (mozembed,
@@ -235,6 +232,7 @@ nsresult EphyBrowser::Init (GtkMozEmbed *mozembed)
NS_ENSURE_TRUE (mDOMWindow, NS_ERROR_FAILURE);
/* This will instantiate an about:blank doc if necessary */
+ nsresult rv;
nsCOMPtr<nsIDOMDocument> domDocument;
rv = mDOMWindow->GetDocument (getter_AddRefs (domDocument));
NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);