Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1142)

Unified Diff: webkit/glue/webframe_impl.cc

Issue 9391: Enabled WebFrameTest, stubbed out a gtk test shell function. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/logging.cc ('k') | webkit/tools/test_shell/SConscript » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webframe_impl.cc
===================================================================
--- webkit/glue/webframe_impl.cc (revision 4729)
+++ webkit/glue/webframe_impl.cc (working copy)
@@ -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 @@
// 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 @@
}
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.
}
« no previous file with comments | « base/logging.cc ('k') | webkit/tools/test_shell/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698