diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 16 |
2 files changed, 15 insertions, 8 deletions
@@ -2,6 +2,13 @@ * embed/mozilla/EphyBrowser.cpp: + Fix page cloning, I was query descriptors interface + on webBrowser instead of docshell. + +2003-10-27 Marco Pesenti Gritti <marco@gnome.org> + + * embed/mozilla/EphyBrowser.cpp: + We need to force the encoding to be able to unset it. diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index f01965381..102607e4e 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -497,11 +497,11 @@ nsresult EphyBrowser::LoadDocument(nsISupports *aPageDescriptor, g_return_val_if_fail (mWebBrowser, NS_ERROR_FAILURE); - nsCOMPtr<nsIWebNavigation> wn; - wn = do_QueryInterface (mWebBrowser); - if (!wn) return NS_ERROR_FAILURE; + nsCOMPtr<nsIDocShell> ds; + ds = do_GetInterface (mWebBrowser); + if (!ds) return NS_ERROR_FAILURE; - nsCOMPtr<nsIWebPageDescriptor> wpd = do_QueryInterface(wn, &rv); + nsCOMPtr<nsIWebPageDescriptor> wpd = do_QueryInterface(ds, &rv); if (!wpd || !NS_SUCCEEDED(rv)) return NS_ERROR_FAILURE; return wpd->LoadPage(aPageDescriptor, aDisplayType); @@ -513,11 +513,11 @@ nsresult EphyBrowser::GetPageDescriptor(nsISupports **aPageDescriptor) g_return_val_if_fail (mWebBrowser, NS_ERROR_FAILURE); - nsCOMPtr<nsIWebNavigation> wn; - wn = do_QueryInterface (mWebBrowser); - if (!wn) return NS_ERROR_FAILURE; + nsCOMPtr<nsIDocShell> ds; + ds = do_GetInterface (mWebBrowser); + if (!ds) return NS_ERROR_FAILURE; - nsCOMPtr<nsIWebPageDescriptor> wpd = do_QueryInterface(wn, &rv); + nsCOMPtr<nsIWebPageDescriptor> wpd = do_QueryInterface(ds, &rv); if (!wpd || !NS_SUCCEEDED(rv)) return NS_ERROR_FAILURE; return wpd->GetCurrentDescriptor(aPageDescriptor); |