summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webview_impl.cc
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-12 23:08:30 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-12 23:08:30 +0000
commite38f40150dac6e0af08e3cdcfb1e502a2223c87c (patch)
tree3b31c4c506ac390d712921ae35acad89f7afd5d7 /webkit/glue/webview_impl.cc
parent5baa03fdfe3a13d4102a819fb3e653f1559b5259 (diff)
downloadchromium_src-e38f40150dac6e0af08e3cdcfb1e502a2223c87c.zip
chromium_src-e38f40150dac6e0af08e3cdcfb1e502a2223c87c.tar.gz
chromium_src-e38f40150dac6e0af08e3cdcfb1e502a2223c87c.tar.bz2
Revert the change that fixed the encoding when viewing source in subframes.
This makes view source for some pages (for example Google Reader) not work properly. I speculate that telling WebKit to change the encoding (which causes a reload) right after starting the real load makes it confused. Review URL: http://codereview.chromium.org/3022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webview_impl.cc')
-rw-r--r--webkit/glue/webview_impl.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 5b012db..5c0b490 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -35,6 +35,7 @@
#pragma warning(push, 0)
#include "Cursor.h"
#include "Document.h"
+#include "DocumentLoader.h"
#include "DragController.h"
#include "DragData.h"
#include "Editor.h"
@@ -1143,7 +1144,7 @@ const WebPreferences& WebViewImpl::GetPreferences() {
// Set the encoding of the current main frame to the one selected by
// a user in the encoding menu.
-void WebViewImpl::SetPageEncoding(const std::string& encoding_name) {
+void WebViewImpl::SetPageEncoding(const std::wstring& encoding_name) {
if (!main_frame_)
return;
@@ -1155,12 +1156,12 @@ void WebViewImpl::SetPageEncoding(const std::string& encoding_name) {
}
// Return the canonical encoding name of current main webframe in webview.
-std::string WebViewImpl::GetMainFrameEncodingName() {
+std::wstring WebViewImpl::GetMainFrameEncodingName() {
if (!main_frame_)
- return std::string();
+ return std::wstring(L"");
String encoding_name = main_frame_->frame()->loader()->encoding();
- return WideToUTF8(webkit_glue::StringToStdWString(encoding_name));
+ return std::wstring(encoding_name.charactersWithNullTermination());
}
void WebViewImpl::MakeTextLarger() {