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

Unified Diff: webkit/glue/webframe_impl.cc

Issue 155650: WebFrameImpl::GetSelection(): Replace NBSPs with spaces.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months 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 | « no previous file | no next file » | 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 20878)
+++ webkit/glue/webframe_impl.cc (working copy)
@@ -76,6 +76,7 @@
#include "HTMLFormElement.h" // need this before Document.h
#include "Chrome.h"
#include "ChromeClientChromium.h"
+#include "ClipboardUtilitiesChromium.h"
#include "Console.h"
#include "Document.h"
#include "DocumentFragment.h" // Only needed for ReplaceSelectionCommand.h :(
@@ -1387,7 +1388,12 @@
String markup = WebCore::createMarkup(range.get(), 0);
return webkit_glue::StringToStdString(markup);
} else {
- return webkit_glue::StringToStdString(range->text());
+ String text = range->text();
+#if defined(OS_WIN)
+ WebCore::replaceNewlinesWithWindowsStyleNewlines(text);
+#endif
+ WebCore::replaceNBSPWithSpace(text);
+ return webkit_glue::StringToStdString(text);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698