summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-06 21:43:07 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-06 21:43:07 +0000
commit052f1b55d5bcf349a158af65876285d200d92184 (patch)
tree08ae4ac84c9de04069450dbd4cfc427973182677 /webkit/glue
parentea6e6cf0f3aa1e0ec2ea9ddbbebbb272e9bbc019 (diff)
downloadchromium_src-052f1b55d5bcf349a158af65876285d200d92184.zip
chromium_src-052f1b55d5bcf349a158af65876285d200d92184.tar.gz
chromium_src-052f1b55d5bcf349a158af65876285d200d92184.tar.bz2
Enabled WebFrameTest, refactored some test shell functions.
Review URL: http://codereview.chromium.org/9652 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4916 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/webframe_impl.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 76ef6df..dd85c47 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -125,6 +125,7 @@ MSVC_POP_WARNING();
#undef LOG
+#include "base/basictypes.h"
#include "base/gfx/bitmap_platform_device.h"
#include "base/gfx/platform_canvas.h"
#include "base/gfx/rect.h"
@@ -223,7 +224,7 @@ static void FrameContentAsPlainText(int max_chars, Frame* frame,
// size and also copy the results directly into a wstring, avoiding the
// string conversion.
for (TextIterator it(range.get()); !it.atEnd(); it.advance()) {
- const wchar_t* chars = reinterpret_cast<const wchar_t*>(it.characters());
+ const uint16* chars = reinterpret_cast<const uint16*>(it.characters());
if (!chars) {
if (it.length() != 0) {
// It appears from crash reports that an iterator can get into a state
@@ -246,7 +247,9 @@ static void FrameContentAsPlainText(int max_chars, Frame* frame,
}
int to_append = std::min(it.length(),
max_chars - static_cast<int>(output->size()));
- output->append(chars, to_append);
+ std::wstring wstr;
+ UTF16ToWide(reinterpret_cast<const char16*>(chars), to_append, &wstr);
+ output->append(wstr.c_str(), to_append);
if (output->size() >= static_cast<size_t>(max_chars))
return; // Filled up the buffer.
}