Diff
Modified: trunk/Source/WebCore/ChangeLog (163256 => 163257)
--- trunk/Source/WebCore/ChangeLog 2014-02-02 02:45:52 UTC (rev 163256)
+++ trunk/Source/WebCore/ChangeLog 2014-02-02 04:59:36 UTC (rev 163257)
@@ -1,3 +1,33 @@
+2014-02-01 Darin Adler <[email protected]>
+
+ Use deprecatedCharacters in a few more places (non-Mac-build sites found by EWS)
+ https://bugs.webkit.org/show_bug.cgi?id=128042
+
+ Reviewed by Sam Weinig.
+
+ * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
+ (WebCore::IDBLevelDBCoding::encodeString):
+ * platform/graphics/win/FontCacheWin.cpp:
+ (WebCore::FontCache::systemFallbackForCharacters):
+ (WebCore::createGDIFont):
+ (WebCore::FontCache::getTraitsInFamily):
+ * platform/network/DataURL.cpp:
+ (WebCore::handleDataURL):
+ * platform/win/BString.cpp:
+ (WebCore::BString::BString):
+ * platform/win/ClipboardUtilitiesWin.cpp:
+ (WebCore::createGlobalData):
+ * platform/win/FileSystemWin.cpp:
+ (WebCore::pathByAppendingComponent):
+ (WebCore::fileSystemRepresentation):
+ * platform/win/PasteboardWin.cpp:
+ (WebCore::filesystemPathFromUrlOrTitle):
+ (WebCore::Pasteboard::writeURLToDataObject):
+ (WebCore::createGlobalImageFileDescriptor):
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenuWin::calculatePositionAndSize):
+ Call deprecatedCharacters instead of characters.
+
2014-02-01 Enrica Casucci <[email protected]>
Add support for ActionSheets in WK2 for iOS.
Modified: trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp (163256 => 163257)
--- trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp 2014-02-02 02:45:52 UTC (rev 163256)
+++ trunk/Source/WebCore/Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp 2014-02-02 04:59:36 UTC (rev 163257)
@@ -297,7 +297,7 @@
size_t length = s.length();
Vector<char> ret(length * sizeof(UChar));
- const UChar* src = ""
+ const UChar* src = ""
UChar* dst = reinterpret_cast<UChar*>(ret.data());
for (unsigned i = 0; i < length; ++i)
*dst++ = htons(*src++);
Modified: trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (163256 => 163257)
--- trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2014-02-02 02:45:52 UTC (rev 163256)
+++ trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2014-02-02 04:59:36 UTC (rev 163257)
@@ -276,7 +276,7 @@
LOGFONT logFont;
logFont.lfCharSet = DEFAULT_CHARSET;
- memcpy(logFont.lfFaceName, linkedFonts->at(linkedFontIndex).characters(), linkedFonts->at(linkedFontIndex).length() * sizeof(WCHAR));
+ memcpy(logFont.lfFaceName, linkedFonts->at(linkedFontIndex).deprecatedCharacters(), linkedFonts->at(linkedFontIndex).length() * sizeof(WCHAR));
logFont.lfFaceName[linkedFonts->at(linkedFontIndex).length()] = 0;
EnumFontFamiliesEx(hdc, &logFont, linkedFontEnumProc, reinterpret_cast<LPARAM>(&hfont), 0);
linkedFontIndex++;
@@ -447,7 +447,7 @@
LOGFONT logFont;
logFont.lfCharSet = DEFAULT_CHARSET;
unsigned familyLength = min(family.length(), static_cast<unsigned>(LF_FACESIZE - 1));
- memcpy(logFont.lfFaceName, family.characters(), familyLength * sizeof(UChar));
+ memcpy(logFont.lfFaceName, family.string().deprecatedCharacters(), familyLength * sizeof(UChar));
logFont.lfFaceName[familyLength] = 0;
logFont.lfPitchAndFamily = 0;
@@ -529,7 +529,7 @@
LOGFONT logFont;
logFont.lfCharSet = DEFAULT_CHARSET;
unsigned familyLength = min(familyName.length(), static_cast<unsigned>(LF_FACESIZE - 1));
- memcpy(logFont.lfFaceName, familyName.characters(), familyLength * sizeof(UChar));
+ memcpy(logFont.lfFaceName, familyName.string().deprecatedCharacters(), familyLength * sizeof(UChar));
logFont.lfFaceName[familyLength] = 0;
logFont.lfPitchAndFamily = 0;
Modified: trunk/Source/WebCore/platform/network/DataURL.cpp (163256 => 163257)
--- trunk/Source/WebCore/platform/network/DataURL.cpp 2014-02-02 02:45:52 UTC (rev 163256)
+++ trunk/Source/WebCore/platform/network/DataURL.cpp 2014-02-02 04:59:36 UTC (rev 163257)
@@ -84,7 +84,7 @@
data = "" encoding);
handle->client()->didReceiveResponse(handle, response);
- CString encodedData = encoding.encode(data.characters(), data.length(), URLEncodedEntitiesForUnencodables);
+ CString encodedData = encoding.encode(data.deprecatedCharacters(), data.length(), URLEncodedEntitiesForUnencodables);
response.setExpectedContentLength(encodedData.length());
if (encodedData.length())
handle->client()->didReceiveData(handle, encodedData.data(), encodedData.length(), 0);
Modified: trunk/Source/WebCore/platform/win/BString.cpp (163256 => 163257)
--- trunk/Source/WebCore/platform/win/BString.cpp 2014-02-02 02:45:52 UTC (rev 163256)
+++ trunk/Source/WebCore/platform/win/BString.cpp 2014-02-02 04:59:36 UTC (rev 163257)
@@ -65,7 +65,7 @@
if (s.isNull())
m_bstr = 0;
else
- m_bstr = SysAllocStringLen(s.characters(), s.length());
+ m_bstr = SysAllocStringLen(s.deprecatedCharacters(), s.length());
}
BString::BString(const URL& url)
@@ -73,7 +73,7 @@
if (url.isNull())
m_bstr = 0;
else
- m_bstr = SysAllocStringLen(url.string().characters(), url.string().length());
+ m_bstr = SysAllocStringLen(url.string().deprecatedCharacters(), url.string().length());
}
BString::BString(const AtomicString& s)
@@ -81,7 +81,7 @@
if (s.isNull())
m_bstr = 0;
else
- m_bstr = SysAllocStringLen(s.characters(), s.length());
+ m_bstr = SysAllocStringLen(s.string().deprecatedCharacters(), s.length());
}
#if USE(CF)
Modified: trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp (163256 => 163257)
--- trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp 2014-02-02 02:45:52 UTC (rev 163256)
+++ trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp 2014-02-02 04:59:36 UTC (rev 163257)
@@ -194,7 +194,7 @@
if (!vm)
return 0;
UChar* buffer = static_cast<UChar*>(GlobalLock(vm));
- memcpy(buffer, str.characters(), str.length() * sizeof(UChar));
+ memcpy(buffer, str.deprecatedCharacters(), str.length() * sizeof(UChar));
buffer[str.length()] = 0;
GlobalUnlock(vm);
return vm;
Modified: trunk/Source/WebCore/platform/win/FileSystemWin.cpp (163256 => 163257)
--- trunk/Source/WebCore/platform/win/FileSystemWin.cpp 2014-02-02 02:45:52 UTC (rev 163256)
+++ trunk/Source/WebCore/platform/win/FileSystemWin.cpp 2014-02-02 04:59:36 UTC (rev 163257)
@@ -159,19 +159,19 @@
Vector<UChar> buffer(MAX_PATH);
#if OS(WINCE)
- buffer.append(path.characters(), path.length());
+ buffer.append(path.deprecatedCharacters(), path.length());
UChar lastPathCharacter = path[path.length() - 1];
if (lastPathCharacter != L'\\' && lastPathCharacter != L'/' && component[0] != L'\\' && component[0] != L'/')
buffer.append(PlatformFilePathSeparator);
- buffer.append(component.characters(), component.length());
+ buffer.append(component.deprecatedCharacters(), component.length());
buffer.shrinkToFit();
#else
if (path.length() + 1 > buffer.size())
return String();
- memcpy(buffer.data(), path.characters(), path.length() * sizeof(UChar));
+ memcpy(buffer.data(), path.deprecatedCharacters(), path.length() * sizeof(UChar));
buffer[path.length()] = '\0';
String componentCopy = component;
@@ -188,7 +188,7 @@
CString fileSystemRepresentation(const String& path)
{
- const UChar* characters = path.characters();
+ const UChar* characters = path.deprecatedCharacters();
int size = WideCharToMultiByte(CP_ACP, 0, characters, path.length(), 0, 0, 0, 0) - 1;
char* buffer;
Modified: trunk/Source/WebCore/platform/win/PasteboardWin.cpp (163256 => 163257)
--- trunk/Source/WebCore/platform/win/PasteboardWin.cpp 2014-02-02 02:45:52 UTC (rev 163256)
+++ trunk/Source/WebCore/platform/win/PasteboardWin.cpp 2014-02-02 04:59:36 UTC (rev 163257)
@@ -558,7 +558,7 @@
if (!title.isEmpty()) {
size_t len = std::min<size_t>(title.length(), fsPathMaxLengthExcludingExtension);
- CopyMemory(fsPathBuffer, title.characters(), len * sizeof(UChar));
+ CopyMemory(fsPathBuffer, title.deprecatedCharacters(), len * sizeof(UChar));
fsPathBuffer[len] = 0;
pathRemoveBadFSCharacters(fsPathBuffer, len);
}
@@ -573,10 +573,10 @@
String lastComponent = kurl.lastPathComponent();
if (kurl.isLocalFile() || (!isLink && !lastComponent.isEmpty())) {
len = std::min<DWORD>(fsPathMaxLengthExcludingExtension, lastComponent.length());
- CopyMemory(fsPathBuffer, lastComponent.characters(), len * sizeof(UChar));
+ CopyMemory(fsPathBuffer, lastComponent.deprecatedCharacters(), len * sizeof(UChar));
} else {
len = std::min<DWORD>(fsPathMaxLengthExcludingExtension, url.length());
- CopyMemory(fsPathBuffer, url.characters(), len * sizeof(UChar));
+ CopyMemory(fsPathBuffer, url.deprecatedCharacters(), len * sizeof(UChar));
}
fsPathBuffer[len] = 0;
pathRemoveBadFSCharacters(fsPathBuffer, len);
@@ -672,7 +672,7 @@
fgd->fgd[0].nFileSizeLow = content.length();
unsigned maxSize = std::min<unsigned>(fsPath.length(), WTF_ARRAY_LENGTH(fgd->fgd[0].cFileName));
- CopyMemory(fgd->fgd[0].cFileName, fsPath.characters(), maxSize * sizeof(UChar));
+ CopyMemory(fgd->fgd[0].cFileName, fsPath.deprecatedCharacters(), maxSize * sizeof(UChar));
GlobalUnlock(urlFileDescriptor);
char* fileContents = static_cast<char*>(GlobalLock(urlFileContent));
@@ -907,7 +907,7 @@
}
int maxSize = std::min<int>(fsPath.length(), WTF_ARRAY_LENGTH(fgd->fgd[0].cFileName));
- CopyMemory(fgd->fgd[0].cFileName, (LPCWSTR)fsPath.characters(), maxSize * sizeof(UChar));
+ CopyMemory(fgd->fgd[0].cFileName, (LPCWSTR)fsPath.deprecatedCharacters(), maxSize * sizeof(UChar));
GlobalUnlock(memObj);
return memObj;
Modified: trunk/Source/WebCore/platform/win/PopupMenuWin.cpp (163256 => 163257)
--- trunk/Source/WebCore/platform/win/PopupMenuWin.cpp 2014-02-02 02:45:52 UTC (rev 163256)
+++ trunk/Source/WebCore/platform/win/PopupMenuWin.cpp 2014-02-02 04:59:36 UTC (rev 163257)
@@ -351,7 +351,7 @@
itemFont.update(m_popupClient->fontSelector());
}
- popupWidth = std::max(popupWidth, static_cast<int>(ceilf(itemFont.width(TextRun(text.characters(), text.length())))));
+ popupWidth = std::max(popupWidth, static_cast<int>(ceilf(itemFont.width(TextRun(text.deprecatedCharacters(), text.length())))));
}
if (naturalHeight > maxPopupHeight)