Deprecate StringImpl::charactersWithNullTermination
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Jun 2013 01:08:00 +0000 (01:08 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Jun 2013 01:08:00 +0000 (01:08 +0000)
commitd09b30c6d4ebd18d60690fef691ce28513b7adc1
treedee22febd301ec2f0d043a1ad9ff46df6fa015c8
parentf80f7f8ee4876c9a1654d2a2c252294ed2e24dbb
Deprecate StringImpl::charactersWithNullTermination
https://bugs.webkit.org/show_bug.cgi?id=118108

Reviewed by Beth Dakin.

Source/WebCore:

Rename calls to charactersWithNullTermination to deprecatedCharactersWithNullTermination.

* html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::cacheActiveAttribLocations):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::getLinkedFonts):
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/IconWin.cpp:
(WebCore::Icon::createIconForFiles):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
* platform/graphics/wince/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/network/curl/CurlDownload.cpp:
(CurlDownload::moveFileToDestination):
* platform/network/win/CookieJarWin.cpp:
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForDOM):
* platform/network/win/DownloadBundleWin.cpp:
(WebCore::DownloadBundle::appendResumeData):
(WebCore::DownloadBundle::extractResumeData):
* platform/network/win/ResourceHandleWin.cpp:
(WebCore::createInternetHandle):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::fileLoadTimer):
* platform/sql/SQLiteFileSystem.cpp:
(WebCore::SQLiteFileSystem::openDatabase):
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::prepare):
* platform/text/win/LocaleWin.cpp:
(WebCore::LCIDFromLocaleInternal):
* platform/text/win/TextCodecWin.cpp:
(WebCore::TextCodecWin::enumerateSupportedEncodings):
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::getWebLocData):
(WebCore::createGlobalData):
(WebCore::setFileDescriptorData):
(WebCore::getURL):
(WebCore::setCFData):
* platform/win/ContextMenuWin.cpp:
(WebCore::ContextMenu::createPlatformContextMenuFromItems):
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageIconForCachedImageFilename):
* platform/win/FileSystemWin.cpp:
(WebCore::getFindData):
(WebCore::deleteFile):
(WebCore::deleteEmptyDirectory):
(WebCore::pathByAppendingComponent):
(WebCore::makeAllDirectories):
(WebCore::pathGetFileName):
(WebCore::openTemporaryFile):
(WebCore::openFile):
* platform/win/MIMETypeRegistryWin.cpp:
(WebCore::mimeTypeForExtension):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
* platform/win/PasteboardWin.cpp:
(WebCore::createGlobalImageFileDescriptor):
(WebCore::createGlobalHDropContent):
* platform/win/PathWalker.cpp:
(WebCore::PathWalker::PathWalker):
* platform/win/SSLKeyGeneratorWin.cpp:
(WebCore::WebCore::signedPublicKeyAndChallengeString):
* platform/win/SharedBufferWin.cpp:
(WebCore::SharedBuffer::createWithContentsOfFile):
* platform/wince/FileSystemWinCE.cpp:
(WebCore::getFileInfo):
(WebCore::fileExists):
(WebCore::deleteFile):
(WebCore::deleteEmptyDirectory):
(WebCore::makeAllDirectories):
(WebCore::openTemporaryFile):
(WebCore::openFile):
* plugins/win/PluginDatabaseWin.cpp:
(WebCore::PluginDatabase::getPluginPathsInDirectories):
(WebCore::addMozillaPluginDirectories):
(WebCore::addAdobeAcrobatPluginDirectory):
(WebCore::addJavaPluginDirectory):
* plugins/win/PluginPackageWin.cpp:
(WebCore::getVersionInfo):
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::handlePostReadFile):

Source/WebKit/win:

Rename calls to charactersWithNullTermination to deprecatedCharactersWithNullTermination.

* COMPropertyBag.h:
(::GetPropertyInfo):
* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::runOpenPanel):
* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorFrontendClient::updateWindowTitle):
* WebDownloadCFNet.cpp:
(WebDownload::didFinish):
* WebKitSystemBits.cpp:
(WebVolumeFreeSize):
* WebLocalizableStrings.cpp:
(LocalizedString::operator LPCTSTR):
* WebView.cpp:
(WebView::setToolTip):

Source/WebKit2:

Rename calls to charactersWithNullTermination to deprecatedCharactersWithNullTermination.

* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::createServerAndClientIdentifiers):

Source/WTF:

The optimization in String and StringImpl to keep track of whether a string
has a null terminator isn't worth it; in most cases we call charactersWithNullTermination() on
temporary strings which ends up copying strings anyway.

A better solution is to have a charactersWithNullTermination() function that returns a Vector<UChar>,
which is similar to what we have for String::utf8() and String::ascii(). This will be done in a follow-up patch.

* wtf/text/WTFString.cpp:
(WTF::String::deprecatedCharactersWithNullTermination):
* wtf/text/WTFString.h:

Tools:

Rename calls to charactersWithNullTermination to deprecatedCharactersWithNullTermination.

* DumpRenderTree/win/DumpRenderTree.cpp:
(findFontFallback):
(addFontFallbackIfPresent):
(removeFontFallbackIfPresent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
44 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/text/WTFString.cpp
Source/WTF/wtf/text/WTFString.h
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGLProgram.cpp
Source/WebCore/platform/graphics/win/FontCacheWin.cpp
Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp
Source/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.cpp
Source/WebCore/platform/graphics/win/IconWin.cpp
Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp
Source/WebCore/platform/graphics/wince/FontPlatformData.cpp
Source/WebCore/platform/network/curl/CurlDownload.cpp
Source/WebCore/platform/network/win/CookieJarWin.cpp
Source/WebCore/platform/network/win/DownloadBundleWin.cpp
Source/WebCore/platform/network/win/ResourceHandleWin.cpp
Source/WebCore/platform/sql/SQLiteFileSystem.cpp
Source/WebCore/platform/sql/SQLiteStatement.cpp
Source/WebCore/platform/text/win/LocaleWin.cpp
Source/WebCore/platform/text/win/TextCodecWin.cpp
Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
Source/WebCore/platform/win/ContextMenuWin.cpp
Source/WebCore/platform/win/DragImageWin.cpp
Source/WebCore/platform/win/FileSystemWin.cpp
Source/WebCore/platform/win/MIMETypeRegistryWin.cpp
Source/WebCore/platform/win/PasteboardWin.cpp
Source/WebCore/platform/win/PathWalker.cpp
Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp
Source/WebCore/platform/win/SharedBufferWin.cpp
Source/WebCore/platform/wince/FileSystemWinCE.cpp
Source/WebCore/plugins/win/PluginDatabaseWin.cpp
Source/WebCore/plugins/win/PluginPackageWin.cpp
Source/WebCore/plugins/win/PluginViewWin.cpp
Source/WebKit/win/COMPropertyBag.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
Source/WebKit/win/WebDownloadCFNet.cpp
Source/WebKit/win/WebKitSystemBits.cpp
Source/WebKit/win/WebLocalizableStrings.cpp
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp
Tools/ChangeLog
Tools/DumpRenderTree/win/DumpRenderTree.cpp