aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-10-29 07:41:25 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-10-29 07:41:25 +0800
commitec20564f0a61b4f1dc58d9ec490d4b66a6543ae0 (patch)
tree51d6002792014467827015879614db0b1486be77 /embed/mozilla
parentb46894849a0793af0e19e860d4900ad7929fa1e9 (diff)
downloadgsoc2013-epiphany-ec20564f0a61b4f1dc58d9ec490d4b66a6543ae0.tar
gsoc2013-epiphany-ec20564f0a61b4f1dc58d9ec490d4b66a6543ae0.tar.gz
gsoc2013-epiphany-ec20564f0a61b4f1dc58d9ec490d4b66a6543ae0.tar.bz2
gsoc2013-epiphany-ec20564f0a61b4f1dc58d9ec490d4b66a6543ae0.tar.lz
gsoc2013-epiphany-ec20564f0a61b4f1dc58d9ec490d4b66a6543ae0.tar.xz
gsoc2013-epiphany-ec20564f0a61b4f1dc58d9ec490d4b66a6543ae0.tar.zst
gsoc2013-epiphany-ec20564f0a61b4f1dc58d9ec490d4b66a6543ae0.zip
Make some vars private, remove an unused one.
2003-10-29 Marco Pesenti Gritti <marco@gnome.org> * embed/mozilla/EphyBrowser.cpp: * embed/mozilla/EphyBrowser.h: Make some vars private, remove an unused one. * embed/mozilla/EventContext.cpp: Use the content dom document to determine is_framed_page.
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/EphyBrowser.cpp4
-rw-r--r--embed/mozilla/EphyBrowser.h7
-rw-r--r--embed/mozilla/EventContext.cpp6
3 files changed, 9 insertions, 8 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index 9dbafbbd7..7579d8712 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -91,8 +91,6 @@ nsresult EphyBrowser::Init (GtkMozEmbed *mozembed)
{
nsresult rv;
- mGtkMozEmbed = mozembed;
-
gtk_moz_embed_get_nsIWebBrowser (mozembed,
getter_AddRefs(mWebBrowser));
if (!mWebBrowser) return NS_ERROR_FAILURE;
@@ -106,7 +104,7 @@ nsresult EphyBrowser::Init (GtkMozEmbed *mozembed)
mEventListener = new EphyEventListener();
- rv = mEventListener->Init (EPHY_EMBED (mGtkMozEmbed));
+ rv = mEventListener->Init (EPHY_EMBED (mozembed));
if (NS_FAILED (rv)) return NS_ERROR_FAILURE;
rv = GetListener();
diff --git a/embed/mozilla/EphyBrowser.h b/embed/mozilla/EphyBrowser.h
index 4d4a11da6..6cd0b5d57 100644
--- a/embed/mozilla/EphyBrowser.h
+++ b/embed/mozilla/EphyBrowser.h
@@ -80,20 +80,20 @@ public:
nsresult PushTargetDocument (nsIDOMDocument *domDoc);
nsresult PopTargetDocument ();
+ nsresult GetContentViewer (nsIContentViewer **aViewer);
nsresult GetDocument (nsIDOMDocument **aDOMDocument);
nsresult GetTargetDocument (nsIDOMDocument **aDOMDocument);
nsresult GetDocumentUrl (nsCString &url);
nsresult GetTargetDocumentUrl (nsCString &url);
nsCOMPtr<nsIWebBrowser> mWebBrowser;
- nsCOMPtr<nsIDOMWindow> mDOMWindow;
- nsCOMPtr<nsIDOMDocument> mDOMDocument;
- GtkMozEmbed *mGtkMozEmbed;
private:
nsCOMPtr<nsIDOMDocument> mTargetDocument;
nsCOMPtr<nsIWebProgressListener> mProgress;
nsCOMPtr<nsIDOMEventReceiver> mEventReceiver;
+ nsCOMPtr<nsIDOMWindow> mDOMWindow;
+ nsCOMPtr<nsIDOMDocument> mDOMDocument;
EphyEventListener *mEventListener;
nsresult GetListener (void);
@@ -105,7 +105,6 @@ private:
nsresult GetSHistory (nsISHistory **aSHistory);
nsresult GetPIDOMWindow(nsPIDOMWindow **aPIWin);
nsresult GetWebNavigation(nsIWebNavigation **aWebNavigation);
- nsresult GetContentViewer (nsIContentViewer **aViewer);
};
#endif
diff --git a/embed/mozilla/EventContext.cpp b/embed/mozilla/EventContext.cpp
index 1ef9de9eb..dd497f533 100644
--- a/embed/mozilla/EventContext.cpp
+++ b/embed/mozilla/EventContext.cpp
@@ -23,6 +23,7 @@
#endif
#include "EventContext.h"
+#include "nsIContentViewer.h"
#include "nsIDOMEventTarget.h"
#include "nsIDocument.h"
#include "nsIDOMHTMLInputElement.h"
@@ -769,9 +770,12 @@ nsresult EventContext::GetKeyEventInfo (nsIDOMKeyEvent *aKeyEvent, EphyEmbedEven
nsresult EventContext::IsPageFramed (nsIDOMNode *node, PRBool *Framed)
{
nsresult result;
+
+ nsCOMPtr<nsIContentViewer> contentViewer;
+ result = mBrowser->GetContentViewer (getter_AddRefs(contentViewer));
nsCOMPtr<nsIDOMDocument> mainDocument;
- result = mBrowser->GetDocument (getter_AddRefs(mainDocument));
+ result = contentViewer->GetDOMDocument (getter_AddRefs(mainDocument));
if (NS_FAILED(result) || !mainDocument) return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMDocument> nodeDocument;