aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-01-23 03:48:21 +0800
committerChristian Persch <chpe@src.gnome.org>2004-01-23 03:48:21 +0800
commit75e8fb3168db840673091b4b1e315f635949cd89 (patch)
tree61b24d7f9a5a3c4b25610b7cd74840003365af30 /embed
parent8205e18cb651de99de58b7ea5779bc3fbaea69b5 (diff)
downloadgsoc2013-epiphany-75e8fb3168db840673091b4b1e315f635949cd89.tar
gsoc2013-epiphany-75e8fb3168db840673091b4b1e315f635949cd89.tar.gz
gsoc2013-epiphany-75e8fb3168db840673091b4b1e315f635949cd89.tar.bz2
gsoc2013-epiphany-75e8fb3168db840673091b4b1e315f635949cd89.tar.lz
gsoc2013-epiphany-75e8fb3168db840673091b4b1e315f635949cd89.tar.xz
gsoc2013-epiphany-75e8fb3168db840673091b4b1e315f635949cd89.tar.zst
gsoc2013-epiphany-75e8fb3168db840673091b4b1e315f635949cd89.zip
Work around a bug in mozilla where 0xa0 (NBSP) are converted to spaces, so
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).
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/EphyBrowser.cpp10
1 files changed, 8 insertions, 2 deletions
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)++;