diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-03-05 19:48:17 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-03-05 19:48:17 +0800 |
commit | e84ae1938ab8d79442a7f82580e3f965f78f461a (patch) | |
tree | 4af79fc8732a8b7827f219868c200e70d3a35528 | |
parent | efbcfccc35fffe945d517716db426730b7da3c6b (diff) | |
download | gsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.tar gsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.tar.gz gsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.tar.bz2 gsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.tar.lz gsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.tar.xz gsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.tar.zst gsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.zip |
Don't return an error when a DOM document isn't a HTML document, it's ok
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).
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 3 |
2 files changed, 9 insertions, 1 deletions
@@ -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)); |