diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 10 |
2 files changed, 16 insertions, 2 deletions
@@ -1,3 +1,11 @@ +2004-01-22 Christian Persch <chpe@cvs.gnome.org> + + * embed/mozilla/EphyBrowser.cpp: + + Work around a bug in mozilla where 0xa0 (NBSP) are converted to spaces, + so we think that the element is modified when in fact it's not. + (Thanks to Crispin). + 2004-01-22 Christopher James Lahey <clahey@ximian.com> * lib/ephy-file-helpers.c, lib/ephy-file-helpers.h diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index 1581050bd..5f8657309 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -62,11 +62,9 @@ #include "nsIDocShellTreeItem.h" #include "nsIDocShellTreeNode.h" #include "nsIDocShellTreeOwner.h" -#include "nsIHTMLContentContainer.h" #include "nsICSSLoader.h" #include "nsICSSStyleSheet.h" #include "nsICSSLoaderObserver.h" -#include "nsIStyleSet.h" #include "nsIDocumentObserver.h" #include "nsCWebBrowser.h" #include "nsReadableUtils.h" @@ -898,6 +896,10 @@ nsresult EphyBrowser::GetDocumentHasModifiedForms (nsIDOMDocument *aDomDoc, PRUi nsAutoString default_text, user_text; areaElement->GetDefaultValue (default_text); areaElement->GetValue (user_text); + + /* Mozilla Bug 218277, 195946 and others */ + default_text.ReplaceChar(0xa0, ' '); + if (Compare (user_text, default_text) != 0) { *aHasTextArea = PR_TRUE; @@ -918,6 +920,10 @@ nsresult EphyBrowser::GetDocumentHasModifiedForms (nsIDOMDocument *aDomDoc, PRUi nsAutoString default_text, user_text; inputElement->GetDefaultValue (default_text); inputElement->GetValue (user_text); + + /* Mozilla Bug 218277, 195946 and others */ + default_text.ReplaceChar(0xa0, ' '); + if (Compare (user_text, default_text) != 0) { (*aNumTextFields)++; |