diff options
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 8 | ||||
-rw-r--r-- | embed/mozilla/EphyBrowser.h | 7 | ||||
-rw-r--r-- | embed/mozilla/EventContext.cpp | 6 |
3 files changed, 5 insertions, 16 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index 7579d8712..8d1b3cdd0 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -99,7 +99,7 @@ nsresult EphyBrowser::Init (GtkMozEmbed *mozembed) /* This will instantiate an about:blank doc if necessary */ nsCOMPtr<nsIDOMDocument> domDocument; - rv = mDOMWindow->GetDocument (getter_AddRefs (mDOMDocument)); + rv = mDOMWindow->GetDocument (getter_AddRefs (domDocument)); if (NS_FAILED (rv)) return NS_ERROR_FAILURE; mEventListener = new EphyEventListener(); @@ -367,10 +367,8 @@ nsresult EphyBrowser::GetZoom (float *aZoom) nsresult EphyBrowser::GetDocument (nsIDOMDocument **aDOMDocument) { - NS_ENSURE_ARG_POINTER(aDOMDocument); - NS_IF_ADDREF(*aDOMDocument = mDOMDocument); - - return NS_OK; + nsCOMPtr<nsIDOMDocument> domDocument; + return mDOMWindow->GetDocument (aDOMDocument); } nsresult EphyBrowser::GetTargetDocument (nsIDOMDocument **aDOMDocument) diff --git a/embed/mozilla/EphyBrowser.h b/embed/mozilla/EphyBrowser.h index 6cd0b5d57..00d49cce2 100644 --- a/embed/mozilla/EphyBrowser.h +++ b/embed/mozilla/EphyBrowser.h @@ -80,7 +80,6 @@ public: nsresult PushTargetDocument (nsIDOMDocument *domDoc); nsresult PopTargetDocument (); - nsresult GetContentViewer (nsIContentViewer **aViewer); nsresult GetDocument (nsIDOMDocument **aDOMDocument); nsresult GetTargetDocument (nsIDOMDocument **aDOMDocument); nsresult GetDocumentUrl (nsCString &url); @@ -93,18 +92,14 @@ private: nsCOMPtr<nsIWebProgressListener> mProgress; nsCOMPtr<nsIDOMEventReceiver> mEventReceiver; nsCOMPtr<nsIDOMWindow> mDOMWindow; - nsCOMPtr<nsIDOMDocument> mDOMDocument; EphyEventListener *mEventListener; nsresult GetListener (void); nsresult AttachListeners (void); nsresult DetachListeners (void); nsresult SetZoomOnDocshell (float aZoom, nsIDocShell *DocShell); - nsresult GetDocShell (nsIDocShell **aDocShell); - nsresult GetCSSBackground (nsIDOMNode *node, nsAutoString& url); 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 dd497f533..b67cd7231 100644 --- a/embed/mozilla/EventContext.cpp +++ b/embed/mozilla/EventContext.cpp @@ -23,7 +23,6 @@ #endif #include "EventContext.h" -#include "nsIContentViewer.h" #include "nsIDOMEventTarget.h" #include "nsIDocument.h" #include "nsIDOMHTMLInputElement.h" @@ -771,11 +770,8 @@ nsresult EventContext::IsPageFramed (nsIDOMNode *node, PRBool *Framed) { nsresult result; - nsCOMPtr<nsIContentViewer> contentViewer; - result = mBrowser->GetContentViewer (getter_AddRefs(contentViewer)); - nsCOMPtr<nsIDOMDocument> mainDocument; - result = contentViewer->GetDOMDocument (getter_AddRefs(mainDocument)); + result = mBrowser->GetDocument (getter_AddRefs(mainDocument)); if (NS_FAILED(result) || !mainDocument) return NS_ERROR_FAILURE; nsCOMPtr<nsIDOMDocument> nodeDocument; |