aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/EphyWrapper.cpp')
-rw-r--r--embed/mozilla/EphyWrapper.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/embed/mozilla/EphyWrapper.cpp b/embed/mozilla/EphyWrapper.cpp
index 8bd7051d4..bd3fe3ab4 100644
--- a/embed/mozilla/EphyWrapper.cpp
+++ b/embed/mozilla/EphyWrapper.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000 Marco Pesenti Gritti
+ * Copyright (C) 2000-2003 Marco Pesenti Gritti
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -14,6 +14,8 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
*/
#include "EphyWrapper.h"
@@ -749,3 +751,17 @@ nsresult EphyWrapper::PopTargetDocument ()
return NS_OK;
}
+
+nsresult EphyWrapper::GetEncoding (nsCString &aEncoding)
+{
+ nsresult result;
+
+ nsCOMPtr<nsIDOMDocument> domDoc;
+ result = GetDOMDocument (getter_AddRefs(domDoc));
+ if (NS_FAILED (result) || !domDoc) return NS_ERROR_FAILURE;
+
+ nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc, &result);
+ if (NS_FAILED (result) || !doc) return NS_ERROR_FAILURE;
+
+ return doc->GetDocumentCharacterSet (aEncoding);
+}