aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--embed/mozilla/EphyBrowser.cpp4
-rw-r--r--embed/mozilla/EphyBrowser.h7
-rw-r--r--embed/mozilla/EventContext.cpp6
4 files changed, 21 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index bdfc0407b..01e4d6478 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+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.
+
2003-10-29 Xan Lopez <xan@masilla.org>
* lib/ephy-prefs.h:
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;