From c05ed5c9156eb0bede7b1ed088fdad8c28b2372a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Rameau?= Date: Thu, 2 Jun 2005 20:45:15 +0000 Subject: nsEmbedString doesn't support Equals method. So add some bits to test two MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2005-06-02 Jean-François Rameau * embed/mozilla/EphyUtils.h: * embed/mozilla/EphyUtils.cpp: nsEmbedString doesn't support Equals method. So add some bits to test two nsEmbedString. See https://bugzilla.mozilla.org/show_bug.cgi?id=296286 --- embed/mozilla/EphyUtils.cpp | 13 +++++++++++++ embed/mozilla/EphyUtils.h | 2 ++ 2 files changed, 15 insertions(+) (limited to 'embed') diff --git a/embed/mozilla/EphyUtils.cpp b/embed/mozilla/EphyUtils.cpp index fb3bfabca..3d43cf11e 100644 --- a/embed/mozilla/EphyUtils.cpp +++ b/embed/mozilla/EphyUtils.cpp @@ -219,3 +219,16 @@ EphyUtils::CollatePrintSettings (const EmbedPrintInfo *info, return NS_OK; } + +PRBool +EphyUtils::StringEquals (nsAString &s1, nsAString &s2) +{ + if (s1.Length() != s2.Length()) + { + return FALSE; + } + + return (memcmp (s1.BeginReading(), + s2.BeginReading(), + s2.Length() * sizeof (PRUnichar)) == 0); +} diff --git a/embed/mozilla/EphyUtils.h b/embed/mozilla/EphyUtils.h index 8cc6706ab..c518d4893 100644 --- a/embed/mozilla/EphyUtils.h +++ b/embed/mozilla/EphyUtils.h @@ -53,6 +53,8 @@ namespace EphyUtils nsresult CollatePrintSettings (const _EmbedPrintInfo *info, nsIPrintSettings *settings, gboolean preview); + PRBool StringEquals (nsAString &s1, + nsAString &s2); } #endif -- cgit v1.2.3