[Win] Remove -DUCHAR_TYPE=wchar_t stopgap and learn to live with char16_t.
https://bugs.webkit.org/show_bug.cgi?id=195346
Reviewed by Fujii Hironori.
.:
- Source/cmake/OptionsJSCOnly.cmake:
- Source/cmake/OptionsWin.cmake:
Stop compiling with -DUCHAR_TYPE=wchar_t.
Source/JavaScriptCore:
(currentWorkingDirectory):
(fetchModuleFromLocalFileSystem):
- runtime/DateConversion.cpp:
(JSC::formatDateTime):
Use wchar helpers as needed.
Source/WebCore:
- platform/graphics/win/FontCacheWin.cpp:
(WebCore::appendLinkedFonts):
(WebCore::getLinkedFonts):
(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::FontCache::fontFromDescriptionAndLogFont):
(WebCore::createGDIFont):
(WebCore::FontCache::getFontSelectionCapabilitiesInFamily):
- platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
- platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
(WebCore::GlyphPage::fill):
- platform/graphics/win/IconWin.cpp:
(WebCore::Icon::createIconForFiles):
- platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::mimeTypeCache):
(WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
- platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::itemizeShapeAndPlace):
(WebCore::UniscribeController::shape):
- platform/network/win/DownloadBundleWin.cpp:
(WebCore::DownloadBundle::appendResumeData):
(WebCore::DownloadBundle::extractResumeData):
- platform/text/win/LocaleWin.cpp:
(WebCore::LCIDFromLocaleInternal):
(WebCore::LCIDFromLocale):
(WebCore::LocaleWin::getLocaleInfoString):
- platform/win/BString.cpp:
(WebCore::BString::BString):
- platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::getWebLocData):
(WebCore::createGlobalData):
(WebCore::getFileDescriptorData):
(WebCore::getURL):
(WebCore::getCFData):
(WebCore::setCFData):
- platform/win/DragDataWin.cpp:
(WebCore::DragData::asFilenames const):
- platform/win/DragImageWin.cpp:
(WebCore::createDragImageIconForCachedImageFilename):
(WebCore::dragLabelFont):
- platform/win/MIMETypeRegistryWin.cpp:
(WebCore::mimeTypeForExtension):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
- platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::read):
(WebCore::filesystemPathFromUrlOrTitle):
(WebCore::Pasteboard::writeURLToDataObject):
(WebCore::createGlobalImageFileDescriptor):
(WebCore::createGlobalHDropContent):
- platform/win/SSLKeyGeneratorWin.cpp:
(WebCore::signedPublicKeyAndChallengeString):
- platform/win/SharedBufferWin.cpp:
(WebCore::SharedBuffer::createFromReadingFile):
- rendering/RenderThemeWin.cpp:
(WebCore::fillFontDescription):
Use wchar helpers as needed.
Source/WebKit:
- Platform/IPC/win/ConnectionWin.cpp:
(IPC::Connection::createServerAndClientIdentifiers):
- Platform/win/ModuleWin.cpp:
(WebKit::Module::load):
- UIProcess/Launcher/win/ProcessLauncherWin.cpp:
(WebKit::ProcessLauncher::launchProcess):
- UIProcess/win/WebContextMenuProxyWin.cpp:
(WebKit::createMenuItem):
- UIProcess/win/WebView.cpp:
(WebKit::WebView::setToolTip):
- WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
(WebKit::InjectedBundle::initialize):
Use wchar helpers as needed.
Source/WebKitLegacy/win:
(HashType>::GetPropertyInfo):
(HashType>::LoadObject):
(DOMNode::addEventListener):
(DOMNode::removeEventListener):
(DOMWindow::addEventListener):
(DOMWindow::removeEventListener):
(DOMElement::font):
(DOMHTMLInputElement::setValueForUser):
(DOMHTMLInputElement::replaceCharactersInRange):
- Plugins/PluginDatabaseWin.cpp:
(WebCore::addPluginPathsFromRegistry):
(WebCore::PluginDatabase::getPluginPathsInDirectories const):
(WebCore::addMozillaPluginDirectories):
(WebCore::addWindowsMediaPlayerPluginDirectory):
(WebCore::addAdobeAcrobatPluginDirectory):
(WebCore::addJavaPluginDirectory):
(WebCore::safariPluginsDirectory):
(WebCore::addMacromediaPluginDirectories):
- Plugins/PluginPackageWin.cpp:
(WebCore::getVersionInfo):
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
- Plugins/PluginViewWin.cpp:
(WebCore::PluginView::handlePostReadFile):
- WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::runOpenPanel):
- WebCoreSupport/WebEditorClient.cpp:
(WebEditorClient::checkSpellingOfString):
(WebEditorClient::checkGrammarOfString):
- WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorFrontendClient::updateWindowTitle):
- WebLocalizableStrings.cpp:
(LocalizedString::operator LPCTSTR const):
(createContextMenuFromItems):
(WebView::setToolTip):
Use wchar helpers as needed.
Source/WTF:
- wtf/PlatformWin.cmake:
- wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
(WTF::String::String):
- wtf/text/win/StringWin.cpp: Added.
(WTF::String::wideCharacters const): Renamed from WTF::stringToNullTerminatedWChar.
- wtf/text/win/WCharStringExtras.h:
(WTF::ucharFrom):
(WTF::wcharFrom):
(WTF::stringToNullTerminatedWChar): Deleted.
(WTF::wcharToString): Deleted.
(WTF::nullTerminatedWCharToString): Deleted.
Add static_assert-guarded reinterpret_cast wrappers for going between UChar* and wchar_t*.
Move existing to/from-String helpers into the String (and AtomicString) class(es).
- wtf/win/FileSystemWin.cpp:
(WTF::FileSystemImpl::getFindData):
(WTF::FileSystemImpl::getFinalPathName):
(WTF::FileSystemImpl::createSymbolicLink):
(WTF::FileSystemImpl::deleteFile):
(WTF::FileSystemImpl::deleteEmptyDirectory):
(WTF::FileSystemImpl::moveFile):
(WTF::FileSystemImpl::pathByAppendingComponent):
(WTF::FileSystemImpl::fileSystemRepresentation):
(WTF::FileSystemImpl::makeAllDirectories):
(WTF::FileSystemImpl::pathGetFileName):
(WTF::FileSystemImpl::storageDirectory):
(WTF::FileSystemImpl::generateTemporaryPath):
(WTF::FileSystemImpl::openTemporaryFile):
(WTF::FileSystemImpl::openFile):
(WTF::FileSystemImpl::hardLinkOrCopyFile):
(WTF::FileSystemImpl::deleteNonEmptyDirectory):
(WTF::localeInfo):
(WTF::PathWalker::PathWalker):
Use wchar helpers as needed.
Tools:
- TestWebKitAPI/Tests/WTF/StringOperators.cpp:
(TestWebKitAPI::TEST):
Delete wchar tests -- these are MSVC-only and we won't be using String::operator+ going forward anyway.
- DumpRenderTree/win/DumpRenderTree.cpp:
(findFontFallback):
(addFontFallbackIfPresent):
(removeFontFallbackIfPresent):
(main):
- TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
(TestWebKitAPI::Util::moduleDirectory):
(TestWebKitAPI::Util::createInjectedBundlePath):
Use wchar helpers as needed.