aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-05-04 03:07:06 +0800
committerChristian Persch <chpe@src.gnome.org>2004-05-04 03:07:06 +0800
commit76e5dcadabd2af62d5f139e65527031a641ba007 (patch)
treeb8233c20363db45b59e491b0f8fc3fac6ee658e0
parentf0e557d1b10b72cd221a0bc98a17e51689458fe5 (diff)
downloadgsoc2013-epiphany-76e5dcadabd2af62d5f139e65527031a641ba007.tar
gsoc2013-epiphany-76e5dcadabd2af62d5f139e65527031a641ba007.tar.gz
gsoc2013-epiphany-76e5dcadabd2af62d5f139e65527031a641ba007.tar.bz2
gsoc2013-epiphany-76e5dcadabd2af62d5f139e65527031a641ba007.tar.lz
gsoc2013-epiphany-76e5dcadabd2af62d5f139e65527031a641ba007.tar.xz
gsoc2013-epiphany-76e5dcadabd2af62d5f139e65527031a641ba007.tar.zst
gsoc2013-epiphany-76e5dcadabd2af62d5f139e65527031a641ba007.zip
Whenever we have one, pass the cache key to the persist object. That way
2004-05-03 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/mozilla-embed-persist.cpp: Whenever we have one, pass the cache key to the persist object. That way we don't re-fetch the page on save. Fixes bug #141652.
-rw-r--r--ChangeLog7
-rw-r--r--embed/mozilla/mozilla-embed-persist.cpp11
2 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index b41eb744a..7bb728ed6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-05-03 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/mozilla-embed-persist.cpp:
+
+ Whenever we have one, pass the cache key to the persist object.
+ That way we don't re-fetch the page on save. Fixes bug #141652.
+
2004-04-28 Piers Cornwell <piers@gnome.org>
* help/C/epiphany.xml:
diff --git a/embed/mozilla/mozilla-embed-persist.cpp b/embed/mozilla/mozilla-embed-persist.cpp
index b3620b3fc..5c475437f 100644
--- a/embed/mozilla/mozilla-embed-persist.cpp
+++ b/embed/mozilla/mozilla-embed-persist.cpp
@@ -226,12 +226,17 @@ impl_save (EphyEmbedPersist *persist)
/* Get the current page descriptor */
nsCOMPtr<nsISupports> pageDescriptor;
- if (flags & EMBED_PERSIST_COPY_PAGE)
+ if (browser)
{
browser->GetPageDescriptor(getter_AddRefs(pageDescriptor));
- NS_ENSURE_TRUE (pageDescriptor, FALSE);
}
+ /* if we have COPY_PAGE, we *need* to have a page descriptor, else we'll re-fetch
+ * the page, which will possibly give a different page than the original which we
+ * need for view source
+ */
+ NS_ENSURE_TRUE (!(flags & EMBED_PERSIST_COPY_PAGE) || pageDescriptor, FALSE);
+
if (filename == NULL)
{
/* Create an header sniffer and do the save */
@@ -245,7 +250,7 @@ impl_save (EphyEmbedPersist *persist)
if (!sniffer) return FALSE;
webPersist->SetProgressListener(sniffer);
- rv = webPersist->SaveURI(inURI, nsnull, nsnull, nsnull, nsnull, tmpFile);
+ rv = webPersist->SaveURI(inURI, pageDescriptor, nsnull, nsnull, nsnull, tmpFile);
if (NS_FAILED (rv)) return FALSE;
}
else