Differential D22184 Diff 64134 www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_aura_mus_os__exchange__data__provider__mus.cc
Changeset View
Changeset View
Standalone View
Standalone View
www/qt5-webengine/files/patch-src_3rdparty_chromium_ui_aura_mus_os__exchange__data__provider__mus.cc
- This file was added.
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- src/3rdparty/chromium/ui/aura/mus/os_exchange_data_provider_mus.cc.orig 2019-05-23 12:39:34 UTC | |||||
+++ src/3rdparty/chromium/ui/aura/mus/os_exchange_data_provider_mus.cc | |||||
@@ -14,6 +14,7 @@ | |||||
#include "base/strings/string_split.h" | |||||
#include "base/strings/string_util.h" | |||||
#include "base/strings/utf_string_conversions.h" | |||||
+#include "base/sys_byteorder.h" | |||||
#include "net/base/filename_util.h" | |||||
#include "ui/base/clipboard/clipboard_constants.h" | |||||
#include "ui/base/clipboard/clipboard_format_type.h" | |||||
@@ -279,8 +280,13 @@ void OSExchangeDataProviderMus::SetHtml(const base::st | |||||
std::vector<unsigned char> bytes; | |||||
// Manually jam a UTF16 BOM into bytes because otherwise, other programs will | |||||
// assume UTF-8. | |||||
+#if defined(ARCH_CPU_LITTLE_ENDIAN) | |||||
bytes.push_back(0xFF); | |||||
bytes.push_back(0xFE); | |||||
+#else | |||||
+ bytes.push_back(0xFE); | |||||
+ bytes.push_back(0xFF); | |||||
+#endif | |||||
AddString16ToVector(html, &bytes); | |||||
mime_data_[ui::kMimeTypeHTML] = bytes; | |||||
} |