aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--embed/mozilla/EphyBrowser.cpp3
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d602ce0d..1c4f10fe3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2004-03-05 Christian Persch <chpe@cvs.gnome.org>
+ * embed/mozilla/EphyBrowser.cpp:
+
+ Don't return an error when a DOM document isn't a HTML document, it's ok
+ not to be one (happens for XUL docs, like about:config).
+
+2004-03-05 Christian Persch <chpe@cvs.gnome.org>
+
* lib/ephy-file-helpers.c: (ephy_file_downloads_dir):
Don't assume Desktop directory location, check the gconf key if it's
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index 1fea9d6fc..018293bfb 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -865,7 +865,8 @@ nsresult EphyBrowser::GetCommandState (const char *command, PRBool *enabled)
nsresult EphyBrowser::GetDocumentHasModifiedForms (nsIDOMDocument *aDomDoc, PRUint32 *aNumTextFields, PRBool *aHasTextArea)
{
nsCOMPtr<nsIDOMHTMLDocument> htmlDoc = do_QueryInterface(aDomDoc);
- NS_ENSURE_TRUE (htmlDoc, NS_ERROR_FAILURE);
+ /* it's okay not to be a HTML doc (happens for XUL documents, like about:config) */
+ if (!htmlDoc) return NS_OK;
nsCOMPtr<nsIDOMHTMLCollection> forms;
htmlDoc->GetForms (getter_AddRefs (forms));