Move URL from WebCore to WTF
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Dec 2018 03:28:36 +0000 (03:28 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Dec 2018 03:28:36 +0000 (03:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190234

Patch by Alex Christensen <achristensen@webkit.org> on 2018-11-30
Reviewed by Keith Miller.

Source/WebCore:

A URL is a low-level concept that does not depend on other classes in WebCore.
We are starting to use URLs in JavaScriptCore for modules.
I need URL and URLParser in a place with fewer dependencies for rdar://problem/44119696

* Modules/applepay/ApplePaySession.h:
* Modules/applepay/ApplePayValidateMerchantEvent.h:
* Modules/applepay/PaymentCoordinator.cpp:
* Modules/applepay/PaymentCoordinator.h:
* Modules/applepay/PaymentCoordinatorClient.h:
* Modules/applepay/PaymentSession.h:
* Modules/applicationmanifest/ApplicationManifest.h:
* Modules/beacon/NavigatorBeacon.cpp:
* Modules/cache/DOMCache.cpp:
* Modules/fetch/FetchLoader.h:
* Modules/mediasession/MediaSessionMetadata.h:
* Modules/mediasource/MediaSourceRegistry.cpp:
* Modules/mediasource/MediaSourceRegistry.h:
* Modules/mediastream/MediaStream.cpp:
* Modules/mediastream/MediaStreamRegistry.cpp:
* Modules/mediastream/MediaStreamRegistry.h:
* Modules/navigatorcontentutils/NavigatorContentUtilsClient.h:
* Modules/notifications/Notification.h:
* Modules/paymentrequest/MerchantValidationEvent.h:
* Modules/paymentrequest/PaymentRequest.h:
* Modules/plugins/PluginReplacement.h:
* Modules/webaudio/AudioContext.h:
* Modules/websockets/ThreadableWebSocketChannel.h:
* Modules/websockets/WebSocket.h:
* Modules/websockets/WebSocketHandshake.cpp:
* Modules/websockets/WebSocketHandshake.h:
* Modules/websockets/WorkerThreadableWebSocketChannel.h:
* PlatformMac.cmake:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/CachedModuleScriptLoader.h:
* bindings/js/CachedScriptFetcher.h:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeIfJavaScriptURL):
* bindings/js/ScriptController.h:
* bindings/js/ScriptModuleLoader.h:
* bindings/js/ScriptSourceCode.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSInterfaceName.cpp:
* bindings/scripts/test/JS/JSMapLike.cpp:
* bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCEReactions.cpp:
* bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
* bindings/scripts/test/JS/JSTestCallTracer.cpp:
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
* bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
* bindings/scripts/test/JS/JSTestIterable.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
* bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
* bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestPluginInterface.cpp:
* bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
* bindings/scripts/test/JS/JSTestSerialization.cpp:
* bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
* bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
* bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestStringifier.cpp:
* bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
* bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
* bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
* bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
* bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
* bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForPingLoad):
(WebCore::ContentExtensions::applyBlockedStatusToRequest):
* contentextensions/ContentExtensionsBackend.h:
* css/CSSValue.h:
* css/StyleProperties.h:
* css/StyleResolver.h:
* css/StyleSheet.h:
* css/StyleSheetContents.h:
* css/parser/CSSParserContext.h:
(WebCore::CSSParserContextHash::hash):
(WTF::HashTraits<WebCore::CSSParserContext>::constructDeletedValue):
* css/parser/CSSParserIdioms.h:
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::setDataFromItemList):
* dom/Document.cpp:
(WebCore::Document::setURL):
(WebCore::Document::processHttpEquiv):
(WebCore::Document::completeURL const):
(WebCore::Document::ensureTemplateDocument):
* dom/Document.h:
(WebCore::Document::urlForBindings const):
* dom/Element.cpp:
(WebCore::Element::isJavaScriptURLAttribute const):
* dom/InlineStyleSheetOwner.cpp:
(WebCore::parserContextForElement):
* dom/Node.cpp:
(WebCore::Node::baseURI const):
* dom/Node.h:
* dom/ScriptElement.h:
* dom/ScriptExecutionContext.h:
* dom/SecurityContext.h:
* editing/Editor.cpp:
(WebCore::Editor::pasteboardWriterURL):
* editing/Editor.h:
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
* editing/cocoa/DataDetection.h:
* editing/cocoa/EditorCocoa.mm:
(WebCore::Editor::userVisibleString):
* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::replaceRichContentWithAttachments):
(WebCore::WebContentReader::readWebArchive):
* editing/mac/EditorMac.mm:
(WebCore::Editor::plainTextFromPasteboard):
(WebCore::Editor::writeImageToPasteboard):
* editing/markup.cpp:
(WebCore::removeSubresourceURLAttributes):
(WebCore::createFragmentFromMarkup):
* editing/markup.h:
* fileapi/AsyncFileStream.cpp:
* fileapi/AsyncFileStream.h:
* fileapi/Blob.h:
* fileapi/BlobURL.cpp:
* fileapi/BlobURL.h:
* fileapi/File.h:
* fileapi/FileReaderLoader.h:
* fileapi/ThreadableBlobRegistry.h:
* history/CachedFrame.h:
* history/HistoryItem.h:
* html/DOMURL.cpp:
(WebCore::DOMURL::create):
* html/DOMURL.h:
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::archiveResourceURL):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::isURLAllowed const):
(WebCore::HTMLFrameElementBase::openURL):
(WebCore::HTMLFrameElementBase::setLocation):
* html/HTMLInputElement.h:
* html/HTMLLinkElement.h:
* html/HTMLMediaElement.cpp:
(WTF::LogArgument<URL>::toString):
(WTF::LogArgument<WebCore::URL>::toString): Deleted.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::allowedToLoadFrameURL):
* html/ImageBitmap.h:
* html/MediaFragmentURIParser.h:
* html/PublicURLManager.cpp:
* html/PublicURLManager.h:
* html/URLInputType.cpp:
* html/URLRegistry.h:
* html/URLSearchParams.cpp:
(WebCore::URLSearchParams::URLSearchParams):
(WebCore::URLSearchParams::toString const):
(WebCore::URLSearchParams::updateURL):
(WebCore::URLSearchParams::updateFromAssociatedURL):
* html/URLUtils.h:
(WebCore::URLUtils<T>::setHost):
(WebCore::URLUtils<T>::setPort):
* html/canvas/CanvasRenderingContext.cpp:
* html/canvas/CanvasRenderingContext.h:
* html/parser/HTMLParserIdioms.cpp:
* html/parser/XSSAuditor.cpp:
(WebCore::semicolonSeparatedValueContainsJavaScriptURL):
(WebCore::XSSAuditor::filterScriptToken):
(WebCore::XSSAuditor::filterObjectToken):
(WebCore::XSSAuditor::filterParamToken):
(WebCore::XSSAuditor::filterEmbedToken):
(WebCore::XSSAuditor::filterFormToken):
(WebCore::XSSAuditor::filterInputToken):
(WebCore::XSSAuditor::filterButtonToken):
(WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
(WebCore::XSSAuditor::isLikelySafeResource):
* html/parser/XSSAuditor.h:
* html/parser/XSSAuditorDelegate.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::openInNewTab):
* inspector/InspectorInstrumentation.h:
* inspector/agents/InspectorNetworkAgent.cpp:
* inspector/agents/InspectorNetworkAgent.h:
* inspector/agents/InspectorPageAgent.h:
* inspector/agents/InspectorWorkerAgent.h:
* loader/ApplicationManifestLoader.h:
* loader/CookieJar.h:
* loader/CrossOriginAccessControl.h:
* loader/CrossOriginPreflightResultCache.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::maybeLoadEmpty):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::serverRedirectSourceForHistory const):
* loader/DocumentWriter.h:
* loader/FormSubmission.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::receivedFirstData):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::createWindow):
* loader/FrameLoaderClient.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::currentItemShouldBeReplaced const):
(WebCore::HistoryController::initializeItem):
* loader/LinkLoader.h:
* loader/LoadTiming.h:
* loader/LoaderStrategy.h:
* loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::checkFormForMixedContent const):
* loader/MixedContentChecker.h:
* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::shouldScheduleNavigation const):
* loader/NavigationScheduler.h:
* loader/PingLoader.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
* loader/ResourceLoadInfo.h:
* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener):
* loader/ResourceLoadObserver.h:
* loader/ResourceLoadStatistics.h:
* loader/ResourceLoader.h:
* loader/ResourceTiming.h:
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestFrame):
* loader/SubframeLoader.h:
* loader/SubstituteData.h:
* loader/appcache/ApplicationCache.h:
* loader/appcache/ApplicationCacheGroup.h:
* loader/appcache/ApplicationCacheHost.h:
* loader/appcache/ApplicationCacheStorage.cpp:
* loader/appcache/ApplicationCacheStorage.h:
* loader/appcache/ManifestParser.cpp:
* loader/appcache/ManifestParser.h:
* loader/archive/ArchiveResourceCollection.h:
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createFromSelection):
* loader/cache/CachedResource.cpp:
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedStyleSheetClient.h:
* loader/cache/MemoryCache.h:
* loader/icon/IconLoader.h:
* loader/mac/LoaderNSURLExtras.mm:
* page/CaptionUserPreferencesMediaAF.cpp:
* page/ChromeClient.h:
* page/ClientOrigin.h:
* page/ContextMenuClient.h:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::checkOrEnableIfNeeded const):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::isInsecureScriptAccess):
* page/DragController.cpp:
(WebCore::DragController::startDrag):
* page/DragController.h:
* page/EventSource.h:
* page/Frame.h:
* page/FrameView.h:
* page/History.h:
* page/Location.cpp:
(WebCore::Location::url const):
(WebCore::Location::reload):
* page/Location.h:
* page/Page.h:
* page/PageSerializer.h:
* page/Performance.h:
* page/PerformanceResourceTiming.cpp:
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
(WebCore::SecurityOrigin::create):
* page/SecurityOrigin.h:
* page/SecurityOriginData.h:
* page/SecurityOriginHash.h:
* page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):
* page/SecurityPolicy.h:
* page/SettingsBase.h:
* page/ShareData.h:
* page/SocketProvider.h:
* page/UserContentProvider.h:
* page/UserContentURLPattern.cpp:
* page/UserContentURLPattern.h:
* page/UserScript.h:
* page/UserStyleSheet.h:
* page/VisitedLinkStore.h:
* page/csp/ContentSecurityPolicy.h:
* page/csp/ContentSecurityPolicyClient.h:
* page/csp/ContentSecurityPolicyDirectiveList.h:
* page/csp/ContentSecurityPolicySource.cpp:
(WebCore::ContentSecurityPolicySource::portMatches const):
* page/csp/ContentSecurityPolicySource.h:
* page/csp/ContentSecurityPolicySourceList.cpp:
* page/csp/ContentSecurityPolicySourceList.h:
* page/csp/ContentSecurityPolicySourceListDirective.cpp:
* platform/ContentFilterUnblockHandler.h:
* platform/ContextMenuItem.h:
* platform/Cookie.h:
* platform/CookiesStrategy.h:
* platform/DragData.h:
* platform/DragImage.h:
* platform/FileStream.h:
* platform/LinkIcon.h:
* platform/Pasteboard.cpp:
(WebCore::Pasteboard::canExposeURLToDOMWhenPasteboardContainsFiles):
* platform/Pasteboard.h:
* platform/PasteboardStrategy.h:
* platform/PasteboardWriterData.cpp:
(WebCore::PasteboardWriterData::setURLData):
(WebCore::PasteboardWriterData::setURL): Deleted.
* platform/PasteboardWriterData.h:
* platform/PlatformPasteboard.h:
* platform/PromisedAttachmentInfo.h:
* platform/SSLKeyGenerator.h:
* platform/SchemeRegistry.cpp:
(WebCore::SchemeRegistry::isBuiltinScheme):
* platform/SharedBuffer.h:
* platform/SharedStringHash.cpp:
* platform/SharedStringHash.h:
* platform/SourcesSoup.txt:
* platform/UserAgent.h:
* platform/UserAgentQuirks.cpp:
* platform/UserAgentQuirks.h:
* platform/cocoa/NetworkExtensionContentFilter.h:
* platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::willSendRequest):
* platform/glib/SSLKeyGeneratorGLib.cpp: Copied from Source/WebCore/page/ShareData.h.
(WebCore::getSupportedKeySizes):
(WebCore::signedPublicKeyAndChallengeString):
* platform/glib/UserAgentGLib.cpp:
* platform/graphics/GraphicsContext.h:
* platform/graphics/Image.cpp:
* platform/graphics/Image.h:
* platform/graphics/ImageObserver.h:
* platform/graphics/ImageSource.cpp:
* platform/graphics/ImageSource.h:
* platform/graphics/MediaPlayer.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
* platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcSetUri):
* platform/graphics/iso/ISOVTTCue.cpp:
* platform/graphics/win/GraphicsContextDirect2D.cpp:
* platform/gtk/DragImageGtk.cpp:
* platform/gtk/PasteboardGtk.cpp:
* platform/gtk/PlatformPasteboardGtk.cpp:
* platform/gtk/SelectionData.h:
* platform/ios/PasteboardIOS.mm:
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write):
* platform/ios/QuickLook.h:
* platform/mac/DragDataMac.mm:
(WebCore::DragData::asPlainText const):
* platform/mac/DragImageMac.mm:
* platform/mac/FileSystemMac.mm:
(WebCore::FileSystem::setMetadataURL):
* platform/mac/PasteboardMac.mm:
* platform/mac/PasteboardWriter.mm:
(WebCore::createPasteboardWriter):
* platform/mac/PlatformPasteboardMac.mm:
* platform/mac/PublicSuffixMac.mm:
(WebCore::decodeHostName):
* platform/mac/SSLKeyGeneratorMac.mm:
* platform/mac/WebCoreNSURLExtras.h:
* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::isArmenianLookalikeCharacter): Deleted.
(WebCore::isArmenianScriptCharacter): Deleted.
(WebCore::isASCIIDigitOrValidHostCharacter): Deleted.
(WebCore::isLookalikeCharacter): Deleted.
(WebCore::whiteListIDNScript): Deleted.
(WebCore::readIDNScriptWhiteListFile): Deleted.
(WebCore::allCharactersInIDNScriptWhiteList): Deleted.
(WebCore::isSecondLevelDomainNameAllowedByTLDRules): Deleted.
(WebCore::isRussianDomainNameCharacter): Deleted.
(WebCore::allCharactersAllowedByTLDRules): Deleted.
(WebCore::mapHostNameWithRange): Deleted.
(WebCore::hostNameNeedsDecodingWithRange): Deleted.
(WebCore::hostNameNeedsEncodingWithRange): Deleted.
(WebCore::decodeHostNameWithRange): Deleted.
(WebCore::encodeHostNameWithRange): Deleted.
(WebCore::decodeHostName): Deleted.
(WebCore::encodeHostName): Deleted.
(WebCore::collectRangesThatNeedMapping): Deleted.
(WebCore::collectRangesThatNeedEncoding): Deleted.
(WebCore::collectRangesThatNeedDecoding): Deleted.
(WebCore::applyHostNameFunctionToMailToURLString): Deleted.
(WebCore::applyHostNameFunctionToURLString): Deleted.
(WebCore::mapHostNames): Deleted.
(WebCore::stringByTrimmingWhitespace): Deleted.
(WebCore::URLByTruncatingOneCharacterBeforeComponent): Deleted.
(WebCore::URLByRemovingResourceSpecifier): Deleted.
(WebCore::URLWithData): Deleted.
(WebCore::dataWithUserTypedString): Deleted.
(WebCore::URLWithUserTypedString): Deleted.
(WebCore::URLWithUserTypedStringDeprecated): Deleted.
(WebCore::hasQuestionMarkOnlyQueryString): Deleted.
(WebCore::dataForURLComponentType): Deleted.
(WebCore::URLByRemovingComponentAndSubsequentCharacter): Deleted.
(WebCore::URLByRemovingUserInfo): Deleted.
(WebCore::originalURLData): Deleted.
(WebCore::createStringWithEscapedUnsafeCharacters): Deleted.
(WebCore::userVisibleString): Deleted.
(WebCore::isUserVisibleURL): Deleted.
(WebCore::rangeOfURLScheme): Deleted.
(WebCore::looksLikeAbsoluteURL): Deleted.
* platform/mediastream/MediaEndpointConfiguration.h:
* platform/network/BlobPart.h:
* platform/network/BlobRegistry.h:
* platform/network/BlobRegistryImpl.h:
* platform/network/BlobResourceHandle.cpp:
* platform/network/CookieRequestHeaderFieldProxy.h:
* platform/network/CredentialStorage.cpp:
* platform/network/CredentialStorage.h:
* platform/network/DataURLDecoder.cpp:
* platform/network/DataURLDecoder.h:
* platform/network/FormData.h:
* platform/network/ProxyServer.h:
* platform/network/ResourceErrorBase.h:
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::didReceiveResponse):
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleClient.h:
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::redirectedRequest const):
* platform/network/ResourceRequestBase.h:
* platform/network/ResourceResponseBase.h:
* platform/network/SocketStreamHandle.h:
* platform/network/cf/DNSResolveQueueCFNet.cpp:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
* platform/network/cf/ProxyServerCFNet.cpp:
* platform/network/cf/ResourceErrorCF.cpp:
* platform/network/cocoa/NetworkStorageSessionCocoa.mm:
* platform/network/curl/CookieJarCurlDatabase.cpp: Added.
(WebCore::cookiesForSession):
(WebCore::CookieJarCurlDatabase::setCookiesFromDOM const):
(WebCore::CookieJarCurlDatabase::setCookiesFromHTTPResponse const):
(WebCore::CookieJarCurlDatabase::cookiesForDOM const):
(WebCore::CookieJarCurlDatabase::cookieRequestHeaderFieldValue const):
(WebCore::CookieJarCurlDatabase::cookiesEnabled const):
(WebCore::CookieJarCurlDatabase::getRawCookies const):
(WebCore::CookieJarCurlDatabase::deleteCookie const):
(WebCore::CookieJarCurlDatabase::getHostnamesWithCookies const):
(WebCore::CookieJarCurlDatabase::deleteCookiesForHostnames const):
(WebCore::CookieJarCurlDatabase::deleteAllCookies const):
(WebCore::CookieJarCurlDatabase::deleteAllCookiesModifiedSince const):
* platform/network/curl/CookieJarDB.cpp:
* platform/network/curl/CookieUtil.h:
* platform/network/curl/CurlContext.h:
* platform/network/curl/CurlProxySettings.h:
* platform/network/curl/CurlResponse.h:
* platform/network/curl/NetworkStorageSessionCurl.cpp:
* platform/network/curl/ProxyServerCurl.cpp:
* platform/network/curl/SocketStreamHandleImplCurl.cpp:
* platform/network/mac/ResourceErrorMac.mm:
* platform/network/soup/NetworkStorageSessionSoup.cpp:
* platform/network/soup/ProxyServerSoup.cpp:
* platform/network/soup/ResourceHandleSoup.cpp:
* platform/network/soup/ResourceRequest.h:
* platform/network/soup/ResourceRequestSoup.cpp:
* platform/network/soup/SocketStreamHandleImplSoup.cpp:
* platform/network/soup/SoupNetworkSession.cpp:
* platform/network/soup/SoupNetworkSession.h:
* platform/text/TextEncoding.h:
* platform/win/BString.cpp:
* platform/win/BString.h:
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::markupToCFHTML):
* platform/win/ClipboardUtilitiesWin.h:
* platform/win/DragImageWin.cpp:
* platform/win/PasteboardWin.cpp:
* plugins/PluginData.h:
* rendering/HitTestResult.h:
* rendering/RenderAttachment.cpp:
* svg/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::sourceURI const):
* svg/SVGURIReference.cpp:
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageCache.h:
* svg/graphics/SVGImageForContainer.h:
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
* testing/Internals.mm:
(WebCore::Internals::userVisibleString):
* testing/MockContentFilter.cpp:
(WebCore::MockContentFilter::willSendRequest):
* testing/MockPaymentCoordinator.cpp:
* testing/js/WebCoreTestSupport.cpp:
* workers/AbstractWorker.h:
* workers/WorkerGlobalScope.h:
* workers/WorkerGlobalScopeProxy.h:
* workers/WorkerInspectorProxy.h:
* workers/WorkerLocation.h:
* workers/WorkerScriptLoader.h:
* workers/WorkerThread.cpp:
* workers/WorkerThread.h:
* workers/service/ServiceWorker.h:
* workers/service/ServiceWorkerClientData.h:
* workers/service/ServiceWorkerContainer.cpp:
* workers/service/ServiceWorkerContextData.h:
* workers/service/ServiceWorkerData.h:
* workers/service/ServiceWorkerJobData.h:
* workers/service/ServiceWorkerRegistrationKey.cpp:
* workers/service/ServiceWorkerRegistrationKey.h:
(WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>::constructDeletedValue):
* worklets/WorkletGlobalScope.h:
* xml/XMLHttpRequest.h:

Source/WebKit:

* NetworkProcess/Cookies/WebCookieManager.cpp:
* NetworkProcess/Cookies/WebCookieManager.h:
* NetworkProcess/Cookies/WebCookieManager.messages.in:
* NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::publishDownloadProgress):
* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::publishProgress):
* NetworkProcess/Downloads/PendingDownload.h:
* NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
(WebKit::Download::publishProgress):
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerBlobURL):
(WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
(WebKit::NetworkBlobRegistry::unregisterBlobURL):
(WebKit::NetworkBlobRegistry::blobSize):
(WebKit::NetworkBlobRegistry::filesInBlob):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkDataTask.cpp:
(WebKit::NetworkDataTask::didReceiveResponse):
* NetworkProcess/NetworkDataTaskBlob.cpp:
* NetworkProcess/NetworkLoadChecker.h:
(WebKit::NetworkLoadChecker::setContentExtensionController):
(WebKit::NetworkLoadChecker::url const):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::writeBlobToFilePath):
(WebKit::NetworkProcess::publishDownloadProgress):
(WebKit::NetworkProcess::preconnectTo):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::logBlockedCookieInformation):
(WebKit::logCookieInformationInternal):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkSocketStream.cpp:
(WebKit::NetworkSocketStream::create):
* NetworkProcess/NetworkSocketStream.h:
* NetworkProcess/PingLoad.h:
* NetworkProcess/ServiceWorker/WebSWServerConnection.h:
* NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
* NetworkProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::retrieveRecords):
* NetworkProcess/cache/CacheStorageEngine.h:
* NetworkProcess/cache/CacheStorageEngineCache.h:
* NetworkProcess/cache/CacheStorageEngineConnection.cpp:
(WebKit::CacheStorageEngineConnection::retrieveRecords):
* NetworkProcess/cache/CacheStorageEngineConnection.h:
* NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
(WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
* NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
(WebKit::NetworkCache::SubresourceInfo::firstPartyForCookies const):
* NetworkProcess/capture/NetworkCaptureEvent.cpp:
(WebKit::NetworkCapture::Request::operator WebCore::ResourceRequest const):
(WebKit::NetworkCapture::Response::operator WebCore::ResourceResponse const):
(WebKit::NetworkCapture::Error::operator WebCore::ResourceError const):
* NetworkProcess/capture/NetworkCaptureManager.cpp:
(WebKit::NetworkCapture::Manager::findBestFuzzyMatch):
(WebKit::NetworkCapture::Manager::fuzzyMatchURLs):
(WebKit::NetworkCapture::Manager::urlIdentifyingCommonDomain):
* NetworkProcess/capture/NetworkCaptureManager.h:
* NetworkProcess/capture/NetworkCaptureResource.cpp:
(WebKit::NetworkCapture::Resource::url):
(WebKit::NetworkCapture::Resource::queryParameters):
* NetworkProcess/capture/NetworkCaptureResource.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::deleteHSTSCacheForHostNames):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::openCFURLRef):
(WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error):
* Shared/API/APIURL.h:
(API::URL::create):
(API::URL::equals):
(API::URL::URL):
(API::URL::url const):
(API::URL::parseURLIfNecessary const):
* Shared/API/APIUserContentURLPattern.h:
(API::UserContentURLPattern::matchesURL const):
* Shared/API/c/WKURLRequest.cpp:
* Shared/API/c/WKURLResponse.cpp:
* Shared/API/c/cf/WKURLCF.mm:
(WKURLCreateWithCFURL):
(WKURLCopyCFURL):
* Shared/API/glib/WebKitURIRequest.cpp:
* Shared/API/glib/WebKitURIResponse.cpp:
* Shared/APIWebArchiveResource.mm:
(API::WebArchiveResource::WebArchiveResource):
* Shared/AssistedNodeInformation.h:
* Shared/Cocoa/WKNSURLExtras.mm:
(-[NSURL _web_originalDataAsWTFString]):
(): Deleted.
* Shared/SessionState.h:
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::itemIsInSameDocument const):
* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebCoreArgumentCoders.h:
* Shared/WebErrors.h:
* Shared/WebHitTestResultData.cpp:
* Shared/cf/ArgumentCodersCF.cpp:
(IPC::encode):
(IPC::decode):
* Shared/gtk/WebErrorsGtk.cpp:
* Shared/ios/InteractionInformationAtPosition.h:
* UIProcess/API/APIHTTPCookieStore.h:
* UIProcess/API/APINavigation.cpp:
(API::Navigation::appendRedirectionURL):
* UIProcess/API/APINavigation.h:
(API::Navigation::takeRedirectChain):
* UIProcess/API/APINavigationAction.h:
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::signedPublicKeyAndChallengeString):
(API::NavigationClient::contentRuleListNotification):
(API::NavigationClient::webGLLoadPolicy const):
(API::NavigationClient::resolveWebGLLoadPolicy const):
* UIProcess/API/APIUIClient.h:
(API::UIClient::saveDataToFileInDownloadsFolder):
* UIProcess/API/APIUserScript.cpp:
(API::UserScript::generateUniqueURL):
* UIProcess/API/APIUserScript.h:
* UIProcess/API/APIUserStyleSheet.cpp:
(API::UserStyleSheet::generateUniqueURL):
* UIProcess/API/APIUserStyleSheet.h:
* UIProcess/API/C/WKOpenPanelResultListener.cpp:
(filePathsFromFileURLs):
* UIProcess/API/C/WKPage.cpp:
(WKPageLoadPlainTextStringWithUserData):
(WKPageSetPageUIClient):
(WKPageSetPageNavigationClient):
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupAddUserStyleSheet):
(WKPageGroupAddUserScript):
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreSetResourceLoadStatisticsPrevalentResourceForDebugMode):
(WKWebsiteDataStoreSetStatisticsLastSeen):
(WKWebsiteDataStoreSetStatisticsPrevalentResource):
(WKWebsiteDataStoreSetStatisticsVeryPrevalentResource):
(WKWebsiteDataStoreIsStatisticsPrevalentResource):
(WKWebsiteDataStoreIsStatisticsVeryPrevalentResource):
(WKWebsiteDataStoreIsStatisticsRegisteredAsSubresourceUnder):
(WKWebsiteDataStoreIsStatisticsRegisteredAsSubFrameUnder):
(WKWebsiteDataStoreIsStatisticsRegisteredAsRedirectingTo):
(WKWebsiteDataStoreSetStatisticsHasHadUserInteraction):
(WKWebsiteDataStoreIsStatisticsHasHadUserInteraction):
(WKWebsiteDataStoreSetStatisticsGrandfathered):
(WKWebsiteDataStoreIsStatisticsGrandfathered):
(WKWebsiteDataStoreSetStatisticsSubframeUnderTopFrameOrigin):
(WKWebsiteDataStoreSetStatisticsSubresourceUnderTopFrameOrigin):
(WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectTo):
(WKWebsiteDataStoreSetStatisticsSubresourceUniqueRedirectFrom):
(WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectTo):
(WKWebsiteDataStoreSetStatisticsTopFrameUniqueRedirectFrom):
* UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
* UIProcess/API/Cocoa/WKUserScript.mm:
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:userContentWorld:]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _showSafeBrowsingWarning:completionHandler:]):
(-[WKWebView _showSafeBrowsingWarningWithTitle:warning:details:completionHandler:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:]):
(-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
* UIProcess/API/Cocoa/_WKApplicationManifest.mm:
(-[_WKApplicationManifest initWithCoder:]):
(+[_WKApplicationManifest applicationManifestFromJSON:manifestURL:documentURL:]):
* UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
* UIProcess/API/glib/IconDatabase.cpp:
* UIProcess/API/glib/WebKitCookieManager.cpp:
(webkit_cookie_manager_get_cookies):
* UIProcess/API/glib/WebKitFileChooserRequest.cpp:
* UIProcess/API/glib/WebKitSecurityOrigin.cpp:
(webkit_security_origin_new_for_uri):
* UIProcess/API/glib/WebKitUIClient.cpp:
* UIProcess/API/glib/WebKitURISchemeRequest.cpp:
* UIProcess/API/glib/WebKitWebView.cpp:
(webkit_web_view_load_plain_text):
* UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
(WebKit::WebPaymentCoordinatorProxy::showPaymentUI):
(WebKit::WebPaymentCoordinatorProxy::validateMerchant):
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toPKPaymentRequest):
* UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
* UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::navigateBrowsingContext):
(WebKit::domainByAddingDotPrefixIfNeeded):
(WebKit::WebAutomationSession::addSingleCookie):
(WebKit::WebAutomationSession::deleteAllCookies):
* UIProcess/Cocoa/DownloadClient.mm:
(WebKit::DownloadClient::didFinish):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::webGLLoadPolicy const):
(WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const):
(WebKit::NavigationState::NavigationClient::contentRuleListNotification):
(WebKit::NavigationState::NavigationClient::willPerformClientRedirect):
(WebKit::NavigationState::NavigationClient::didPerformClientRedirect):
(WebKit::NavigationState::NavigationClient::signedPublicKeyAndChallengeString):
* UIProcess/Cocoa/SafeBrowsingResultCocoa.mm: Copied from Source/WebKit/WebProcess/Network/WebSocketProvider.h.
(WebKit::SafeBrowsingResult::SafeBrowsingResult):
* UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm:
(WebKit::reportAnErrorURL):
(WebKit::malwareDetailsURL):
(WebKit::safeBrowsingDetailsText):
(WebKit::SafeBrowsingWarning::SafeBrowsingWarning):
* UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
(-[_WKPreviewControllerDataSource finish:]):
(WebKit::SystemPreviewController::finish):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::saveDataToFileInDownloadsFolder):
(WebKit::requestUserMediaAuthorizationForDevices):
(WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
* UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm:
(-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
* UIProcess/Cocoa/WKSafeBrowsingWarning.h:
* UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(-[WKSafeBrowsingWarning initWithFrame:safeBrowsingWarning:completionHandler:]):
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::showSafeBrowsingWarning):
(WebKit::WebViewImpl::writeToURLForFilePromiseProvider):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::publishProgress):
* UIProcess/Downloads/DownloadProxy.h:
(WebKit::DownloadProxy::setRedirectChain):
(WebKit::DownloadProxy::redirectChain const):
* UIProcess/FrameLoadState.cpp:
(WebKit::FrameLoadState::didStartProvisionalLoad):
(WebKit::FrameLoadState::didReceiveServerRedirectForProvisionalLoad):
(WebKit::FrameLoadState::didSameDocumentNotification):
(WebKit::FrameLoadState::setUnreachableURL):
* UIProcess/FrameLoadState.h:
(WebKit::FrameLoadState::url const):
(WebKit::FrameLoadState::setURL):
(WebKit::FrameLoadState::provisionalURL const):
(WebKit::FrameLoadState::unreachableURL const):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::writeBlobToFilePath):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/PageClient.h:
(WebKit::PageClient::showSafeBrowsingWarning):
* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::hasOnlySecureContent):
* UIProcess/Plugins/PluginInfoStore.cpp:
* UIProcess/Plugins/PluginInfoStore.h:
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
* UIProcess/SafeBrowsingResult.h: Copied from Source/WebKit/UIProcess/SystemPreviewController.h.
(WebKit::SafeBrowsingResult::create):
(WebKit::SafeBrowsingResult::url const):
(WebKit::SafeBrowsingResult::provider const):
(WebKit::SafeBrowsingResult::isPhishing const):
(WebKit::SafeBrowsingResult::isMalware const):
(WebKit::SafeBrowsingResult::isUnwantedSoftware const):
(WebKit::SafeBrowsingResult::isKnownToBeUnsafe const):
* UIProcess/SafeBrowsingWarning.h:
(WebKit::SafeBrowsingWarning::create):
* UIProcess/SuspendedPageProxy.cpp:
* UIProcess/SystemPreviewController.h:
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::url const):
(WebKit::WebFrameProxy::provisionalURL const):
(WebKit::WebFrameProxy::unreachableURL const):
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebOpenPanelResultListenerProxy.cpp:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadDataWithNavigation):
(WebKit::WebPageProxy::loadAlternateHTML):
(WebKit::WebPageProxy::loadWebArchiveData):
(WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::contentRuleListNotification):
(WebKit::WebPageProxy::processDidTerminate):
(WebKit::WebPageProxy::signedPublicKeyAndChallengeString):
(WebKit::WebPageProxy::setURLSchemeHandlerForScheme):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::tryPrewarmWithDomainInformation):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::setPrevalentResourceForDebugMode):
(WebKit::WebResourceLoadStatisticsStore::logFrameNavigation):
* UIProcess/WebResourceLoadStatisticsStore.h:
* UIProcess/ios/DragDropInteractionState.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::showSafeBrowsingWarning):
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):
* UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
* UIProcess/ios/WKLegacyPDFView.mm:
(-[WKLegacyPDFView actionSheetAssistant:shareElementWithURL:rect:]):
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
* UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController _updateLocationInfo]):
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeLegacySessionState):
* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::showSafeBrowsingWarning):
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _defaultAnimationController]):
* UIProcess/win/WebInspectorProxyWin.cpp:
* WebProcess/ApplePay/WebPaymentCoordinator.cpp:
(WebKit::WebPaymentCoordinator::showPaymentUI):
(WebKit::WebPaymentCoordinator::validateMerchant):
* WebProcess/ApplePay/WebPaymentCoordinator.h:
* WebProcess/Cache/WebCacheStorageConnection.cpp:
(WebKit::WebCacheStorageConnection::doRetrieveRecords):
* WebProcess/Cache/WebCacheStorageConnection.h:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerFileBlobURL):
* WebProcess/FileAPI/BlobRegistryProxy.h:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
(API::InjectedBundle::PageLoaderClient::willLoadDataRequest):
(API::InjectedBundle::PageLoaderClient::userAgentForURL const):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameAllowsFollowingLink):
(WKBundleFrameCopySuggestedFilenameForResourceWithURL):
(WKBundleFrameCopyMIMETypeForResourceWithURL):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageHasLocalDataForURL):
* WebProcess/InjectedBundle/API/gtk/DOM/ConvertToUTF8String.cpp:
(convertToUTF8String):
* WebProcess/InjectedBundle/API/gtk/DOM/ConvertToUTF8String.h:
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::preconnectTo):
* WebProcess/Network/WebLoaderStrategy.h:
* WebProcess/Network/WebSocketProvider.h:
* WebProcess/Network/WebSocketStream.cpp:
(WebKit::WebSocketStream::WebSocketStream):
* WebProcess/Network/WebSocketStream.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::clickedLink):
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performURLRequest):
(WebKit::PluginView::performJavaScriptURLRequest):
* WebProcess/Plugins/WebPluginInfoProvider.cpp:
(WebKit::WebPluginInfoProvider::webVisiblePluginInfo):
* WebProcess/Plugins/WebPluginInfoProvider.h:
* WebProcess/Storage/WebSWClientConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::signedPublicKeyAndChallengeString const):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::readURLFromPasteboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteDragImage):
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
* WebProcess/WebPage/VisitedLinkTableController.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::allowsFollowingLink const):
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadURLInFrame):
(WebKit::WebPage::loadData):
(WebKit::WebPage::loadAlternateHTML):
(WebKit::WebPage::dumpHistoryForTesting):
(WebKit::WebPage::sendCSPViolationReport):
(WebKit::WebPage::addUserScript):
(WebKit::WebPage::addUserStyleSheet):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
(WebKit::WebPrintOperationGtk::frameURL const):
* WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::sendPrewarmInformation):
* WebProcess/WebProcess.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::activePagesOrigins):

Source/WebKitLegacy:

* WebCoreSupport/WebResourceLoadScheduler.cpp:
* WebCoreSupport/WebResourceLoadScheduler.h:

Source/WebKitLegacy/mac:

* DOM/DOMAttr.mm:
* DOM/DOMBlob.mm:
* DOM/DOMCSSCharsetRule.mm:
* DOM/DOMCSSImportRule.mm:
* DOM/DOMCSSMediaRule.mm:
* DOM/DOMCSSPageRule.mm:
* DOM/DOMCSSPrimitiveValue.mm:
* DOM/DOMCSSRule.mm:
* DOM/DOMCSSStyleDeclaration.mm:
* DOM/DOMCSSStyleRule.mm:
* DOM/DOMCSSStyleSheet.mm:
* DOM/DOMCSSValue.mm:
* DOM/DOMCharacterData.mm:
* DOM/DOMCounter.mm:
* DOM/DOMDocument.mm:
* DOM/DOMDocumentFragment.mm:
* DOM/DOMDocumentType.mm:
* DOM/DOMEvent.mm:
* DOM/DOMFile.mm:
* DOM/DOMHTMLAnchorElement.mm:
* DOM/DOMHTMLAppletElement.mm:
* DOM/DOMHTMLAreaElement.mm:
* DOM/DOMHTMLBRElement.mm:
* DOM/DOMHTMLBaseElement.mm:
* DOM/DOMHTMLBaseFontElement.mm:
* DOM/DOMHTMLBodyElement.mm:
* DOM/DOMHTMLButtonElement.mm:
* DOM/DOMHTMLCanvasElement.mm:
* DOM/DOMHTMLCollection.mm:
* DOM/DOMHTMLDivElement.mm:
* DOM/DOMHTMLDocument.mm:
* DOM/DOMHTMLElement.mm:
* DOM/DOMHTMLEmbedElement.mm:
* DOM/DOMHTMLFieldSetElement.mm:
* DOM/DOMHTMLFontElement.mm:
* DOM/DOMHTMLFormElement.mm:
* DOM/DOMHTMLFrameElement.mm:
* DOM/DOMHTMLFrameSetElement.mm:
* DOM/DOMHTMLHRElement.mm:
* DOM/DOMHTMLHeadElement.mm:
* DOM/DOMHTMLHeadingElement.mm:
* DOM/DOMHTMLHtmlElement.mm:
* DOM/DOMHTMLIFrameElement.mm:
* DOM/DOMHTMLImageElement.mm:
* DOM/DOMHTMLInputElement.mm:
* DOM/DOMHTMLLIElement.mm:
* DOM/DOMHTMLLabelElement.mm:
* DOM/DOMHTMLLegendElement.mm:
* DOM/DOMHTMLLinkElement.mm:
* DOM/DOMHTMLMapElement.mm:
* DOM/DOMHTMLMarqueeElement.mm:
* DOM/DOMHTMLMediaElement.mm:
* DOM/DOMHTMLMetaElement.mm:
* DOM/DOMHTMLModElement.mm:
* DOM/DOMHTMLOListElement.mm:
* DOM/DOMHTMLObjectElement.mm:
* DOM/DOMHTMLOptGroupElement.mm:
* DOM/DOMHTMLOptionElement.mm:
* DOM/DOMHTMLOptionsCollection.mm:
* DOM/DOMHTMLParagraphElement.mm:
* DOM/DOMHTMLParamElement.mm:
* DOM/DOMHTMLQuoteElement.mm:
* DOM/DOMHTMLScriptElement.mm:
* DOM/DOMHTMLSelectElement.mm:
* DOM/DOMHTMLStyleElement.mm:
* DOM/DOMHTMLTableCaptionElement.mm:
* DOM/DOMHTMLTableCellElement.mm:
* DOM/DOMHTMLTableColElement.mm:
* DOM/DOMHTMLTableElement.mm:
* DOM/DOMHTMLTableRowElement.mm:
* DOM/DOMHTMLTableSectionElement.mm:
* DOM/DOMHTMLTitleElement.mm:
* DOM/DOMHTMLUListElement.mm:
* DOM/DOMHTMLVideoElement.mm:
* DOM/DOMKeyboardEvent.mm:
* DOM/DOMMediaList.mm:
* DOM/DOMMouseEvent.mm:
* DOM/DOMMutationEvent.mm:
* DOM/DOMNamedNodeMap.mm:
* DOM/DOMProcessingInstruction.mm:
* DOM/DOMRange.mm:
* DOM/DOMStyleSheet.mm:
* DOM/DOMText.mm:
* DOM/DOMTextEvent.mm:
* DOM/DOMTokenList.mm:
* DOM/DOMUIEvent.mm:
* DOM/DOMXPathResult.mm:
* History/WebHistoryItem.mm:
* Misc/WebNSURLExtras.mm:
(-[NSURL _web_userVisibleString]):
(-[NSURL _web_URLByRemovingUserInfo]):
(-[NSURL _web_dataForURLComponentType:]):
(-[NSURL _web_schemeData]):
(-[NSURL _web_hostData]):
* Misc/WebUserContentURLPattern.mm:
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
* Plugins/WebNetscapePluginStream.h:
(WebNetscapePluginStream::setRequestURL):
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::signedPublicKeyAndChallengeString const):
* WebCoreSupport/WebContextMenuClient.h:
* WebCoreSupport/WebContextMenuClient.mm:
* WebCoreSupport/WebDragClient.h:
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::updateGlobalHistory):
* WebCoreSupport/WebPaymentCoordinatorClient.h:
* WebCoreSupport/WebPaymentCoordinatorClient.mm:
(WebPaymentCoordinatorClient::showPaymentUI):
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::readURLFromPasteboard):
* WebCoreSupport/WebPluginInfoProvider.h:
* WebCoreSupport/WebPluginInfoProvider.mm:
(WebPluginInfoProvider::webVisiblePluginInfo):
* WebCoreSupport/WebSecurityOrigin.mm:
* WebCoreSupport/WebVisitedLinkStore.h:
* WebView/WebDataSource.mm:
* WebView/WebFrame.mm:
(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _defaultAnimationController]):
* WebView/WebPDFView.mm:
* WebView/WebScriptDebugger.mm:
* WebView/WebViewInternal.h:

Source/WebKitLegacy/win:

* MarshallingHelpers.cpp:
* MarshallingHelpers.h:
* Plugins/PluginDatabase.cpp:
* Plugins/PluginDatabase.h:
* Plugins/PluginDatabaseWin.cpp:
* Plugins/PluginStream.h:
* Plugins/PluginView.h:
* WebCoreSupport/WebContextMenuClient.h:
* WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
* WebCoreSupport/WebDesktopNotificationsDelegate.h:
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPluginInfoProvider.cpp:
(WebPluginInfoProvider::webVisiblePluginInfo):
* WebCoreSupport/WebPluginInfoProvider.h:
* WebCoreSupport/WebVisitedLinkStore.h:
* WebDataSource.cpp:
* WebDownload.h:
* WebElementPropertyBag.cpp:
* WebFrame.h:
* WebHistory.cpp:
* WebHistory.h:
* WebHistoryItem.cpp:
* WebResource.cpp:
(WebResource::WebResource):
* WebResource.h:
* WebSecurityOrigin.cpp:
* WebURLResponse.cpp:
(WebURLResponse::createInstance):
* WebUserContentURLPattern.cpp:
* WebView.h:

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Forward.h:
* wtf/PlatformGTK.cmake:
* wtf/PlatformMac.cmake:
* wtf/PlatformWPE.cmake:
* wtf/PlatformWin.cmake:
* wtf/URL.cpp: Renamed from Source/WebCore/platform/URL.cpp.
(WTF::URL::protocolIs):
* wtf/URL.h: Renamed from Source/WebCore/platform/URL.h.
* wtf/URLHash.h: Renamed from Source/WebCore/platform/URLHash.h.
(WTF::URLHash::hash):
(WTF::URLHash::equal):
* wtf/URLParser.cpp: Renamed from Source/WebCore/platform/URLParser.cpp.
(WTF::URLParser::isInUserInfoEncodeSet):
(WTF::URLParser::parseAuthority):
* wtf/URLParser.h: Renamed from Source/WebCore/platform/URLParser.h.
(WTF::URLParser::URLParser):
(WTF::URLParser::result):
* wtf/cf/CFURLExtras.cpp: Renamed from Source/WebCore/platform/cf/CFURLExtras.cpp.
* wtf/cf/CFURLExtras.h: Renamed from Source/WebCore/platform/cf/CFURLExtras.h.
* wtf/cf/URLCF.cpp: Renamed from Source/WebCore/platform/cf/URLCF.cpp.
* wtf/cocoa/NSURLExtras.h: Copied from Source/WebCore/loader/archive/ArchiveResourceCollection.h.
* wtf/cocoa/NSURLExtras.mm: Copied from Source/WebCore/platform/mac/WebCoreNSURLExtras.mm.
(WTF::isArmenianLookalikeCharacter):
(WTF::isArmenianScriptCharacter):
(WTF::isASCIIDigitOrValidHostCharacter):
(WTF::isLookalikeCharacter):
(WTF::whiteListIDNScript):
(WTF::readIDNScriptWhiteListFile):
(WTF::allCharactersInIDNScriptWhiteList):
(WTF::isSecondLevelDomainNameAllowedByTLDRules):
(WTF::isRussianDomainNameCharacter):
(WTF::allCharactersAllowedByTLDRules):
(WTF::mapHostNameWithRange):
(WTF::hostNameNeedsDecodingWithRange):
(WTF::hostNameNeedsEncodingWithRange):
(WTF::decodeHostNameWithRange):
(WTF::encodeHostNameWithRange):
(WTF::decodeHostName):
(WTF::encodeHostName):
(WTF::collectRangesThatNeedMapping):
(WTF::collectRangesThatNeedEncoding):
(WTF::collectRangesThatNeedDecoding):
(WTF::applyHostNameFunctionToMailToURLString):
(WTF::applyHostNameFunctionToURLString):
(WTF::mapHostNames):
(WTF::stringByTrimmingWhitespace):
(WTF::URLByTruncatingOneCharacterBeforeComponent):
(WTF::URLByRemovingResourceSpecifier):
(WTF::URLWithData):
(WTF::dataWithUserTypedString):
(WTF::URLWithUserTypedString):
(WTF::URLWithUserTypedStringDeprecated):
(WTF::hasQuestionMarkOnlyQueryString):
(WTF::dataForURLComponentType):
(WTF::URLByRemovingComponentAndSubsequentCharacter):
(WTF::URLByRemovingUserInfo):
(WTF::originalURLData):
(WTF::createStringWithEscapedUnsafeCharacters):
(WTF::userVisibleString):
(WTF::isUserVisibleURL):
(WTF::rangeOfURLScheme):
(WTF::looksLikeAbsoluteURL):
* wtf/cocoa/URLCocoa.mm: Renamed from Source/WebCore/platform/mac/URLMac.mm.
(WTF::URL::URL):
(WTF::URL::createCFURL const):
* wtf/glib/GUniquePtrSoup.h: Renamed from Source/WebCore/platform/network/soup/GUniquePtrSoup.h.
* wtf/glib/URLSoup.cpp: Renamed from Source/WebCore/platform/soup/URLSoup.cpp.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
* TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp:
* TestWebKitAPI/Tests/WebCore/URL.cpp:
(TestWebKitAPI::createURL):
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::checkURL):
(TestWebKitAPI::checkRelativeURL):
(TestWebKitAPI::checkURLDifferences):
(TestWebKitAPI::checkRelativeURLDifferences):
* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
* TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp:
* TestWebKitAPI/Tests/WebCore/cocoa/URLExtras.mm:
(TestWebKitAPI::originalDataAsString):
(TestWebKitAPI::userVisibleString):
(TestWebKitAPI::literalURL):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm:
(literalURL):
* TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp:
* TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm:
(-[LoadInvalidURLWebFrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
* TestWebKitAPI/Tests/mac/SSLKeyGenerator.mm:
* TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
(TestWebKitAPI::Util::createURLForResource):
* lldb/lldb_webkit.py:
(__lldb_init_module):
(WTFURL_SummaryProvider):
(WTFURLProvider):
(WebCoreURL_SummaryProvider): Deleted.
(WebCoreURLProvider): Deleted.
(WebCoreURLProvider.__init__): Deleted.
(WebCoreURLProvider.to_string): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238771 268f45cc-cd09-0410-ab3c-d52691b4dbfc

791 files changed:
Source/WTF/ChangeLog
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/Forward.h
Source/WTF/wtf/PlatformGTK.cmake
Source/WTF/wtf/PlatformMac.cmake
Source/WTF/wtf/PlatformWPE.cmake
Source/WTF/wtf/PlatformWin.cmake
Source/WTF/wtf/URL.cpp [moved from Source/WebCore/platform/URL.cpp with 99% similarity]
Source/WTF/wtf/URL.h [moved from Source/WebCore/platform/URL.h with 71% similarity]
Source/WTF/wtf/URLHash.h [moved from Source/WebCore/platform/URLHash.h with 72% similarity]
Source/WTF/wtf/URLParser.cpp [moved from Source/WebCore/platform/URLParser.cpp with 99% similarity]
Source/WTF/wtf/URLParser.h [moved from Source/WebCore/platform/URLParser.h with 91% similarity]
Source/WTF/wtf/cf/CFURLExtras.cpp [moved from Source/WebCore/platform/cf/CFURLExtras.cpp with 98% similarity]
Source/WTF/wtf/cf/CFURLExtras.h [moved from Source/WebCore/platform/cf/CFURLExtras.h with 86% similarity]
Source/WTF/wtf/cf/URLCF.cpp [moved from Source/WebCore/platform/cf/URLCF.cpp with 95% similarity]
Source/WTF/wtf/cocoa/NSURLExtras.h [new file with mode: 0644]
Source/WTF/wtf/cocoa/NSURLExtras.mm [new file with mode: 0644]
Source/WTF/wtf/cocoa/URLCocoa.mm [moved from Source/WebCore/platform/mac/URLMac.mm with 84% similarity]
Source/WTF/wtf/glib/GUniquePtrSoup.h [moved from Source/WebCore/platform/network/soup/GUniquePtrSoup.h with 93% similarity]
Source/WTF/wtf/glib/URLSoup.cpp [moved from Source/WebCore/platform/soup/URLSoup.cpp with 96% similarity]
Source/WebCore/ChangeLog
Source/WebCore/Modules/applepay/ApplePaySession.h
Source/WebCore/Modules/applepay/ApplePayValidateMerchantEvent.h
Source/WebCore/Modules/applepay/PaymentCoordinator.cpp
Source/WebCore/Modules/applepay/PaymentCoordinator.h
Source/WebCore/Modules/applepay/PaymentCoordinatorClient.h
Source/WebCore/Modules/applepay/PaymentSession.h
Source/WebCore/Modules/applicationmanifest/ApplicationManifest.h
Source/WebCore/Modules/beacon/NavigatorBeacon.cpp
Source/WebCore/Modules/cache/DOMCache.cpp
Source/WebCore/Modules/fetch/FetchLoader.h
Source/WebCore/Modules/mediasession/MediaSessionMetadata.h
Source/WebCore/Modules/mediasource/MediaSourceRegistry.cpp
Source/WebCore/Modules/mediasource/MediaSourceRegistry.h
Source/WebCore/Modules/mediastream/MediaStream.cpp
Source/WebCore/Modules/mediastream/MediaStreamRegistry.cpp
Source/WebCore/Modules/mediastream/MediaStreamRegistry.h
Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtilsClient.h
Source/WebCore/Modules/notifications/Notification.h
Source/WebCore/Modules/paymentrequest/MerchantValidationEvent.h
Source/WebCore/Modules/paymentrequest/PaymentRequest.h
Source/WebCore/Modules/plugins/PluginReplacement.h
Source/WebCore/Modules/webaudio/AudioContext.h
Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h
Source/WebCore/Modules/websockets/WebSocket.h
Source/WebCore/Modules/websockets/WebSocketHandshake.cpp
Source/WebCore/Modules/websockets/WebSocketHandshake.h
Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h
Source/WebCore/PlatformMac.cmake
Source/WebCore/PlatformWin.cmake
Source/WebCore/Sources.txt
Source/WebCore/SourcesCocoa.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/CachedModuleScriptLoader.h
Source/WebCore/bindings/js/CachedScriptFetcher.h
Source/WebCore/bindings/js/ScriptController.cpp
Source/WebCore/bindings/js/ScriptController.h
Source/WebCore/bindings/js/ScriptModuleLoader.h
Source/WebCore/bindings/js/ScriptSourceCode.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp
Source/WebCore/bindings/scripts/test/JS/JSMapLike.cpp
Source/WebCore/bindings/scripts/test/JS/JSReadOnlyMapLike.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestStringifier.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
Source/WebCore/contentextensions/ContentExtensionsBackend.cpp
Source/WebCore/contentextensions/ContentExtensionsBackend.h
Source/WebCore/css/CSSValue.h
Source/WebCore/css/StyleProperties.h
Source/WebCore/css/StyleResolver.h
Source/WebCore/css/StyleSheet.h
Source/WebCore/css/StyleSheetContents.h
Source/WebCore/css/parser/CSSParserContext.h
Source/WebCore/css/parser/CSSParserIdioms.h
Source/WebCore/dom/DataTransfer.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/InlineStyleSheetOwner.cpp
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/ScriptElement.h
Source/WebCore/dom/ScriptExecutionContext.h
Source/WebCore/dom/SecurityContext.h
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/Editor.h
Source/WebCore/editing/MarkupAccumulator.cpp
Source/WebCore/editing/cocoa/DataDetection.h
Source/WebCore/editing/cocoa/EditorCocoa.mm
Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm
Source/WebCore/editing/mac/EditorMac.mm
Source/WebCore/editing/markup.cpp
Source/WebCore/editing/markup.h
Source/WebCore/fileapi/AsyncFileStream.cpp
Source/WebCore/fileapi/AsyncFileStream.h
Source/WebCore/fileapi/Blob.h
Source/WebCore/fileapi/BlobURL.cpp
Source/WebCore/fileapi/BlobURL.h
Source/WebCore/fileapi/File.h
Source/WebCore/fileapi/FileReaderLoader.h
Source/WebCore/fileapi/ThreadableBlobRegistry.h
Source/WebCore/history/CachedFrame.h
Source/WebCore/history/HistoryItem.h
Source/WebCore/html/DOMURL.cpp
Source/WebCore/html/DOMURL.h
Source/WebCore/html/HTMLAttachmentElement.cpp
Source/WebCore/html/HTMLFrameElementBase.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/HTMLLinkElement.h
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/ImageBitmap.h
Source/WebCore/html/MediaFragmentURIParser.h
Source/WebCore/html/PublicURLManager.cpp
Source/WebCore/html/PublicURLManager.h
Source/WebCore/html/URLInputType.cpp
Source/WebCore/html/URLRegistry.h
Source/WebCore/html/URLSearchParams.cpp
Source/WebCore/html/URLUtils.h
Source/WebCore/html/canvas/CanvasRenderingContext.cpp
Source/WebCore/html/canvas/CanvasRenderingContext.h
Source/WebCore/html/parser/HTMLParserIdioms.cpp
Source/WebCore/html/parser/XSSAuditor.cpp
Source/WebCore/html/parser/XSSAuditor.h
Source/WebCore/html/parser/XSSAuditorDelegate.h
Source/WebCore/inspector/InspectorFrontendHost.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
Source/WebCore/inspector/agents/InspectorNetworkAgent.h
Source/WebCore/inspector/agents/InspectorPageAgent.h
Source/WebCore/inspector/agents/InspectorWorkerAgent.h
Source/WebCore/loader/ApplicationManifestLoader.h
Source/WebCore/loader/CookieJar.h
Source/WebCore/loader/CrossOriginAccessControl.h
Source/WebCore/loader/CrossOriginPreflightResultCache.h
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/DocumentLoader.h
Source/WebCore/loader/DocumentWriter.h
Source/WebCore/loader/FormSubmission.h
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/loader/HistoryController.cpp
Source/WebCore/loader/LinkLoader.h
Source/WebCore/loader/LoadTiming.h
Source/WebCore/loader/LoaderStrategy.h
Source/WebCore/loader/MixedContentChecker.cpp
Source/WebCore/loader/MixedContentChecker.h
Source/WebCore/loader/NavigationScheduler.cpp
Source/WebCore/loader/NavigationScheduler.h
Source/WebCore/loader/PingLoader.h
Source/WebCore/loader/PolicyChecker.cpp
Source/WebCore/loader/ResourceLoadInfo.h
Source/WebCore/loader/ResourceLoadObserver.cpp
Source/WebCore/loader/ResourceLoadObserver.h
Source/WebCore/loader/ResourceLoadStatistics.h
Source/WebCore/loader/ResourceLoader.h
Source/WebCore/loader/ResourceTiming.h
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/loader/SubframeLoader.h
Source/WebCore/loader/SubstituteData.h
Source/WebCore/loader/appcache/ApplicationCache.h
Source/WebCore/loader/appcache/ApplicationCacheGroup.h
Source/WebCore/loader/appcache/ApplicationCacheHost.h
Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
Source/WebCore/loader/appcache/ApplicationCacheStorage.h
Source/WebCore/loader/appcache/ManifestParser.cpp
Source/WebCore/loader/appcache/ManifestParser.h
Source/WebCore/loader/archive/ArchiveResourceCollection.h
Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResourceLoader.h
Source/WebCore/loader/cache/CachedStyleSheetClient.h
Source/WebCore/loader/cache/MemoryCache.h
Source/WebCore/loader/icon/IconLoader.h
Source/WebCore/loader/mac/LoaderNSURLExtras.mm
Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/ClientOrigin.h
Source/WebCore/page/ContextMenuClient.h
Source/WebCore/page/ContextMenuController.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/DragController.cpp
Source/WebCore/page/DragController.h
Source/WebCore/page/EventSource.h
Source/WebCore/page/Frame.h
Source/WebCore/page/FrameView.h
Source/WebCore/page/History.h
Source/WebCore/page/Location.cpp
Source/WebCore/page/Location.h
Source/WebCore/page/Page.h
Source/WebCore/page/PageSerializer.h
Source/WebCore/page/Performance.h
Source/WebCore/page/PerformanceResourceTiming.cpp
Source/WebCore/page/SecurityOrigin.cpp
Source/WebCore/page/SecurityOrigin.h
Source/WebCore/page/SecurityOriginData.h
Source/WebCore/page/SecurityOriginHash.h
Source/WebCore/page/SecurityPolicy.cpp
Source/WebCore/page/SecurityPolicy.h
Source/WebCore/page/SettingsBase.h
Source/WebCore/page/ShareData.h
Source/WebCore/page/SocketProvider.h
Source/WebCore/page/UserContentProvider.h
Source/WebCore/page/UserContentURLPattern.cpp
Source/WebCore/page/UserContentURLPattern.h
Source/WebCore/page/UserScript.h
Source/WebCore/page/UserStyleSheet.h
Source/WebCore/page/VisitedLinkStore.h
Source/WebCore/page/csp/ContentSecurityPolicy.h
Source/WebCore/page/csp/ContentSecurityPolicyClient.h
Source/WebCore/page/csp/ContentSecurityPolicyDirectiveList.h
Source/WebCore/page/csp/ContentSecurityPolicySource.cpp
Source/WebCore/page/csp/ContentSecurityPolicySource.h
Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp
Source/WebCore/page/csp/ContentSecurityPolicySourceList.h
Source/WebCore/page/csp/ContentSecurityPolicySourceListDirective.cpp
Source/WebCore/platform/ContentFilterUnblockHandler.h
Source/WebCore/platform/ContextMenuItem.h
Source/WebCore/platform/Cookie.h
Source/WebCore/platform/CookiesStrategy.h
Source/WebCore/platform/DragData.h
Source/WebCore/platform/DragImage.h
Source/WebCore/platform/FileStream.h
Source/WebCore/platform/LinkIcon.h
Source/WebCore/platform/Pasteboard.cpp
Source/WebCore/platform/Pasteboard.h
Source/WebCore/platform/PasteboardStrategy.h
Source/WebCore/platform/PasteboardWriterData.cpp
Source/WebCore/platform/PasteboardWriterData.h
Source/WebCore/platform/PlatformPasteboard.h
Source/WebCore/platform/PromisedAttachmentInfo.h
Source/WebCore/platform/SSLKeyGenerator.h
Source/WebCore/platform/SchemeRegistry.cpp
Source/WebCore/platform/SharedBuffer.h
Source/WebCore/platform/SharedStringHash.cpp
Source/WebCore/platform/SharedStringHash.h
Source/WebCore/platform/SourcesSoup.txt
Source/WebCore/platform/UserAgent.h
Source/WebCore/platform/UserAgentQuirks.cpp
Source/WebCore/platform/UserAgentQuirks.h
Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h
Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm
Source/WebCore/platform/glib/SSLKeyGeneratorGLib.cpp [new file with mode: 0644]
Source/WebCore/platform/glib/UserAgentGLib.cpp
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/Image.cpp
Source/WebCore/platform/graphics/Image.h
Source/WebCore/platform/graphics/ImageObserver.h
Source/WebCore/platform/graphics/ImageSource.cpp
Source/WebCore/platform/graphics/ImageSource.h
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp
Source/WebCore/platform/graphics/iso/ISOVTTCue.cpp
Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp
Source/WebCore/platform/gtk/DragImageGtk.cpp
Source/WebCore/platform/gtk/PasteboardGtk.cpp
Source/WebCore/platform/gtk/PlatformPasteboardGtk.cpp
Source/WebCore/platform/gtk/SelectionData.h
Source/WebCore/platform/ios/PasteboardIOS.mm
Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
Source/WebCore/platform/ios/QuickLook.h
Source/WebCore/platform/mac/DragDataMac.mm
Source/WebCore/platform/mac/DragImageMac.mm
Source/WebCore/platform/mac/FileSystemMac.mm
Source/WebCore/platform/mac/PasteboardMac.mm
Source/WebCore/platform/mac/PasteboardWriter.mm
Source/WebCore/platform/mac/PlatformPasteboardMac.mm
Source/WebCore/platform/mac/PublicSuffixMac.mm
Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm
Source/WebCore/platform/mac/WebCoreNSURLExtras.h
Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
Source/WebCore/platform/mediastream/MediaEndpointConfiguration.h
Source/WebCore/platform/network/BlobPart.h
Source/WebCore/platform/network/BlobRegistry.h
Source/WebCore/platform/network/BlobRegistryImpl.h
Source/WebCore/platform/network/BlobResourceHandle.cpp
Source/WebCore/platform/network/CookieRequestHeaderFieldProxy.h
Source/WebCore/platform/network/CredentialStorage.cpp
Source/WebCore/platform/network/CredentialStorage.h
Source/WebCore/platform/network/DataURLDecoder.cpp
Source/WebCore/platform/network/DataURLDecoder.h
Source/WebCore/platform/network/FormData.h
Source/WebCore/platform/network/ProxyServer.h
Source/WebCore/platform/network/ResourceErrorBase.h
Source/WebCore/platform/network/ResourceHandle.cpp
Source/WebCore/platform/network/ResourceHandle.h
Source/WebCore/platform/network/ResourceHandleClient.h
Source/WebCore/platform/network/ResourceRequestBase.cpp
Source/WebCore/platform/network/ResourceRequestBase.h
Source/WebCore/platform/network/ResourceResponseBase.h
Source/WebCore/platform/network/SocketStreamHandle.h
Source/WebCore/platform/network/cf/DNSResolveQueueCFNet.cpp
Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp
Source/WebCore/platform/network/cf/ProxyServerCFNet.cpp
Source/WebCore/platform/network/cf/ResourceErrorCF.cpp
Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm
Source/WebCore/platform/network/curl/CookieJarCurlDatabase.cpp [new file with mode: 0644]
Source/WebCore/platform/network/curl/CookieJarDB.cpp
Source/WebCore/platform/network/curl/CookieUtil.h
Source/WebCore/platform/network/curl/CurlContext.h
Source/WebCore/platform/network/curl/CurlProxySettings.h
Source/WebCore/platform/network/curl/CurlResponse.h
Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
Source/WebCore/platform/network/curl/ProxyServerCurl.cpp
Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp
Source/WebCore/platform/network/mac/ResourceErrorMac.mm
Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp
Source/WebCore/platform/network/soup/ProxyServerSoup.cpp
Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
Source/WebCore/platform/network/soup/ResourceRequest.h
Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp
Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp
Source/WebCore/platform/network/soup/SoupNetworkSession.cpp
Source/WebCore/platform/network/soup/SoupNetworkSession.h
Source/WebCore/platform/text/TextEncoding.h
Source/WebCore/platform/win/BString.cpp
Source/WebCore/platform/win/BString.h
Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
Source/WebCore/platform/win/ClipboardUtilitiesWin.h
Source/WebCore/platform/win/DragImageWin.cpp
Source/WebCore/platform/win/PasteboardWin.cpp
Source/WebCore/plugins/PluginData.h
Source/WebCore/rendering/HitTestResult.h
Source/WebCore/rendering/RenderAttachment.cpp
Source/WebCore/svg/SVGImageLoader.cpp
Source/WebCore/svg/SVGURIReference.cpp
Source/WebCore/svg/graphics/SVGImage.h
Source/WebCore/svg/graphics/SVGImageCache.h
Source/WebCore/svg/graphics/SVGImageForContainer.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.mm
Source/WebCore/testing/MockContentFilter.cpp
Source/WebCore/testing/MockPaymentCoordinator.cpp
Source/WebCore/testing/js/WebCoreTestSupport.cpp
Source/WebCore/workers/AbstractWorker.h
Source/WebCore/workers/WorkerGlobalScope.h
Source/WebCore/workers/WorkerGlobalScopeProxy.h
Source/WebCore/workers/WorkerInspectorProxy.h
Source/WebCore/workers/WorkerLocation.h
Source/WebCore/workers/WorkerScriptLoader.h
Source/WebCore/workers/WorkerThread.cpp
Source/WebCore/workers/WorkerThread.h
Source/WebCore/workers/service/ServiceWorker.h
Source/WebCore/workers/service/ServiceWorkerClientData.h
Source/WebCore/workers/service/ServiceWorkerContainer.cpp
Source/WebCore/workers/service/ServiceWorkerContextData.h
Source/WebCore/workers/service/ServiceWorkerData.h
Source/WebCore/workers/service/ServiceWorkerJobData.h
Source/WebCore/workers/service/ServiceWorkerRegistrationKey.cpp
Source/WebCore/workers/service/ServiceWorkerRegistrationKey.h
Source/WebCore/worklets/WorkletGlobalScope.h
Source/WebCore/xml/XMLHttpRequest.h
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/Cookies/WebCookieManager.cpp
Source/WebKit/NetworkProcess/Cookies/WebCookieManager.h
Source/WebKit/NetworkProcess/Cookies/WebCookieManager.messages.in
Source/WebKit/NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm
Source/WebKit/NetworkProcess/Downloads/Download.h
Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp
Source/WebKit/NetworkProcess/Downloads/DownloadManager.h
Source/WebKit/NetworkProcess/Downloads/PendingDownload.cpp
Source/WebKit/NetworkProcess/Downloads/PendingDownload.h
Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm
Source/WebKit/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp
Source/WebKit/NetworkProcess/FileAPI/NetworkBlobRegistry.h
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
Source/WebKit/NetworkProcess/NetworkDataTask.cpp
Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp
Source/WebKit/NetworkProcess/NetworkLoadChecker.h
Source/WebKit/NetworkProcess/NetworkProcess.cpp
Source/WebKit/NetworkProcess/NetworkProcess.h
Source/WebKit/NetworkProcess/NetworkProcess.messages.in
Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.h
Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit/NetworkProcess/NetworkResourceLoader.h
Source/WebKit/NetworkProcess/NetworkSocketStream.cpp
Source/WebKit/NetworkProcess/NetworkSocketStream.h
Source/WebKit/NetworkProcess/PingLoad.h
Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.h
Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in
Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.messages.in
Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp
Source/WebKit/NetworkProcess/cache/CacheStorageEngine.h
Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.h
Source/WebKit/NetworkProcess/cache/CacheStorageEngineConnection.cpp
Source/WebKit/NetworkProcess/cache/CacheStorageEngineConnection.h
Source/WebKit/NetworkProcess/cache/CacheStorageEngineConnection.messages.in
Source/WebKit/NetworkProcess/cache/NetworkCache.h
Source/WebKit/NetworkProcess/cache/NetworkCacheStatistics.cpp
Source/WebKit/NetworkProcess/cache/NetworkCacheSubresourcesEntry.h
Source/WebKit/NetworkProcess/capture/NetworkCaptureEvent.cpp
Source/WebKit/NetworkProcess/capture/NetworkCaptureManager.cpp
Source/WebKit/NetworkProcess/capture/NetworkCaptureManager.h
Source/WebKit/NetworkProcess/capture/NetworkCaptureResource.cpp
Source/WebKit/NetworkProcess/capture/NetworkCaptureResource.h
Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm
Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
Source/WebKit/PluginProcess/mac/PluginProcessMac.mm
Source/WebKit/Shared/API/APIURL.h
Source/WebKit/Shared/API/APIUserContentURLPattern.h
Source/WebKit/Shared/API/c/WKURLRequest.cpp
Source/WebKit/Shared/API/c/WKURLResponse.cpp
Source/WebKit/Shared/API/c/cf/WKURLCF.mm
Source/WebKit/Shared/API/glib/WebKitURIRequest.cpp
Source/WebKit/Shared/API/glib/WebKitURIResponse.cpp
Source/WebKit/Shared/APIWebArchiveResource.mm
Source/WebKit/Shared/AssistedNodeInformation.h
Source/WebKit/Shared/Cocoa/WKNSURLExtras.mm
Source/WebKit/Shared/SessionState.h
Source/WebKit/Shared/WebBackForwardListItem.cpp
Source/WebKit/Shared/WebCoreArgumentCoders.cpp
Source/WebKit/Shared/WebCoreArgumentCoders.h
Source/WebKit/Shared/WebErrors.h
Source/WebKit/Shared/WebHitTestResultData.cpp
Source/WebKit/Shared/cf/ArgumentCodersCF.cpp
Source/WebKit/Shared/gtk/WebErrorsGtk.cpp
Source/WebKit/Shared/ios/InteractionInformationAtPosition.h
Source/WebKit/UIProcess/API/APIHTTPCookieStore.h
Source/WebKit/UIProcess/API/APINavigation.cpp
Source/WebKit/UIProcess/API/APINavigation.h
Source/WebKit/UIProcess/API/APINavigationAction.h
Source/WebKit/UIProcess/API/APINavigationClient.h
Source/WebKit/UIProcess/API/APIUIClient.h
Source/WebKit/UIProcess/API/APIUserScript.cpp
Source/WebKit/UIProcess/API/APIUserScript.h
Source/WebKit/UIProcess/API/APIUserStyleSheet.cpp
Source/WebKit/UIProcess/API/APIUserStyleSheet.h
Source/WebKit/UIProcess/API/C/WKOpenPanelResultListener.cpp
Source/WebKit/UIProcess/API/C/WKPage.cpp
Source/WebKit/UIProcess/API/C/WKPageGroup.cpp
Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp
Source/WebKit/UIProcess/API/Cocoa/WKHTTPCookieStore.mm
Source/WebKit/UIProcess/API/Cocoa/WKUserScript.mm
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.mm
Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm
Source/WebKit/UIProcess/API/glib/IconDatabase.cpp
Source/WebKit/UIProcess/API/glib/WebKitCookieManager.cpp
Source/WebKit/UIProcess/API/glib/WebKitFileChooserRequest.cpp
Source/WebKit/UIProcess/API/glib/WebKitSecurityOrigin.cpp
Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
Source/WebKit/UIProcess/API/glib/WebKitURISchemeRequest.cpp
Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
Source/WebKit/UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp
Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp
Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.h
Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h
Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm
Source/WebKit/UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm
Source/WebKit/UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm
Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
Source/WebKit/UIProcess/Cocoa/DownloadClient.mm
Source/WebKit/UIProcess/Cocoa/NavigationState.h
Source/WebKit/UIProcess/Cocoa/NavigationState.mm
Source/WebKit/UIProcess/Cocoa/SafeBrowsingResultCocoa.mm [new file with mode: 0644]
Source/WebKit/UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm
Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm
Source/WebKit/UIProcess/Cocoa/UIDelegate.h
Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
Source/WebKit/UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm
Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.h
Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.mm
Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
Source/WebKit/UIProcess/Cocoa/WebViewImpl.h
Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
Source/WebKit/UIProcess/Downloads/DownloadProxy.h
Source/WebKit/UIProcess/FrameLoadState.cpp
Source/WebKit/UIProcess/FrameLoadState.h
Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
Source/WebKit/UIProcess/PageClient.h
Source/WebKit/UIProcess/PageLoadState.cpp
Source/WebKit/UIProcess/Plugins/PluginInfoStore.cpp
Source/WebKit/UIProcess/Plugins/PluginInfoStore.h
Source/WebKit/UIProcess/Plugins/mac/PluginProcessProxyMac.mm
Source/WebKit/UIProcess/SafeBrowsingResult.h [new file with mode: 0644]
Source/WebKit/UIProcess/SafeBrowsingWarning.h
Source/WebKit/UIProcess/SuspendedPageProxy.cpp
Source/WebKit/UIProcess/SystemPreviewController.h
Source/WebKit/UIProcess/WebCookieManagerProxy.h
Source/WebKit/UIProcess/WebFrameProxy.h
Source/WebKit/UIProcess/WebInspectorProxy.h
Source/WebKit/UIProcess/WebOpenPanelResultListenerProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebPageProxy.messages.in
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebProcessPool.h
Source/WebKit/UIProcess/WebProcessProxy.cpp
Source/WebKit/UIProcess/WebProcessProxy.h
Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp
Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h
Source/WebKit/UIProcess/ios/DragDropInteractionState.h
Source/WebKit/UIProcess/ios/PageClientImplIOS.h
Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/WKGeolocationProviderIOS.mm
Source/WebKit/UIProcess/ios/WKLegacyPDFView.mm
Source/WebKit/UIProcess/ios/WKPDFView.mm
Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp
Source/WebKit/UIProcess/mac/PageClientImplMac.h
Source/WebKit/UIProcess/mac/PageClientImplMac.mm
Source/WebKit/UIProcess/mac/WKImmediateActionController.mm
Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp
Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.cpp
Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.h
Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.cpp
Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.h
Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.cpp
Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.h
Source/WebKit/WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/ConvertToUTF8String.cpp
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/ConvertToUTF8String.h
Source/WebKit/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp
Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
Source/WebKit/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
Source/WebKit/WebProcess/Network/WebLoaderStrategy.h
Source/WebKit/WebProcess/Network/WebSocketProvider.h
Source/WebKit/WebProcess/Network/WebSocketStream.cpp
Source/WebKit/WebProcess/Network/WebSocketStream.h
Source/WebKit/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
Source/WebKit/WebProcess/Plugins/Netscape/NetscapePlugin.h
Source/WebKit/WebProcess/Plugins/Netscape/NetscapePluginStream.h
Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h
Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm
Source/WebKit/WebProcess/Plugins/Plugin.h
Source/WebKit/WebProcess/Plugins/PluginController.h
Source/WebKit/WebProcess/Plugins/PluginProxy.h
Source/WebKit/WebProcess/Plugins/PluginView.cpp
Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp
Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.h
Source/WebKit/WebProcess/Storage/WebSWClientConnection.h
Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h
Source/WebKit/WebProcess/UserContent/WebUserContentController.h
Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit/WebProcess/WebCoreSupport/WebContextMenuClient.h
Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.h
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.h
Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
Source/WebKit/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm
Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.h
Source/WebKit/WebProcess/WebPage/WebFrame.cpp
Source/WebKit/WebProcess/WebPage/WebFrame.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Source/WebKit/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp
Source/WebKit/WebProcess/WebPage/gtk/WebPrintOperationGtk.h
Source/WebKit/WebProcess/WebProcess.cpp
Source/WebKit/WebProcess/WebProcess.h
Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/WebCoreSupport/WebResourceLoadScheduler.cpp
Source/WebKitLegacy/WebCoreSupport/WebResourceLoadScheduler.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/DOM/DOMAttr.mm
Source/WebKitLegacy/mac/DOM/DOMBlob.mm
Source/WebKitLegacy/mac/DOM/DOMCSSCharsetRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSImportRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSMediaRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSPageRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSPrimitiveValue.mm
Source/WebKitLegacy/mac/DOM/DOMCSSRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSStyleDeclaration.mm
Source/WebKitLegacy/mac/DOM/DOMCSSStyleRule.mm
Source/WebKitLegacy/mac/DOM/DOMCSSStyleSheet.mm
Source/WebKitLegacy/mac/DOM/DOMCSSValue.mm
Source/WebKitLegacy/mac/DOM/DOMCharacterData.mm
Source/WebKitLegacy/mac/DOM/DOMCounter.mm
Source/WebKitLegacy/mac/DOM/DOMDocument.mm
Source/WebKitLegacy/mac/DOM/DOMDocumentFragment.mm
Source/WebKitLegacy/mac/DOM/DOMDocumentType.mm
Source/WebKitLegacy/mac/DOM/DOMEvent.mm
Source/WebKitLegacy/mac/DOM/DOMFile.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLAnchorElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLAppletElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLAreaElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLBRElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLBaseElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLBaseFontElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLBodyElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLButtonElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLCanvasElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLCollection.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLDivElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLDocument.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLEmbedElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLFieldSetElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLFontElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLFormElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLFrameElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLFrameSetElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLHRElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLHeadElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLHeadingElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLHtmlElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLIFrameElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLImageElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLInputElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLLIElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLLabelElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLLegendElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLLinkElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLMapElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLMarqueeElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLMediaElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLMetaElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLModElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLOListElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLObjectElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLOptGroupElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLOptionElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLOptionsCollection.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLParagraphElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLParamElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLQuoteElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLScriptElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLSelectElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLStyleElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTableCaptionElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTableCellElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTableColElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTableElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTableRowElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTableSectionElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLTitleElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLUListElement.mm
Source/WebKitLegacy/mac/DOM/DOMHTMLVideoElement.mm
Source/WebKitLegacy/mac/DOM/DOMKeyboardEvent.mm
Source/WebKitLegacy/mac/DOM/DOMMediaList.mm
Source/WebKitLegacy/mac/DOM/DOMMouseEvent.mm
Source/WebKitLegacy/mac/DOM/DOMMutationEvent.mm
Source/WebKitLegacy/mac/DOM/DOMNamedNodeMap.mm
Source/WebKitLegacy/mac/DOM/DOMProcessingInstruction.mm
Source/WebKitLegacy/mac/DOM/DOMRange.mm
Source/WebKitLegacy/mac/DOM/DOMStyleSheet.mm
Source/WebKitLegacy/mac/DOM/DOMText.mm
Source/WebKitLegacy/mac/DOM/DOMTextEvent.mm
Source/WebKitLegacy/mac/DOM/DOMTokenList.mm
Source/WebKitLegacy/mac/DOM/DOMUIEvent.mm
Source/WebKitLegacy/mac/DOM/DOMXPathResult.mm
Source/WebKitLegacy/mac/History/WebHistoryItem.mm
Source/WebKitLegacy/mac/Misc/WebNSURLExtras.mm
Source/WebKitLegacy/mac/Misc/WebUserContentURLPattern.mm
Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
Source/WebKitLegacy/mac/Plugins/WebNetscapePluginStream.h
Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h
Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.h
Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.h
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebPaymentCoordinatorClient.h
Source/WebKitLegacy/mac/WebCoreSupport/WebPaymentCoordinatorClient.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.h
Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.h
Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebSecurityOrigin.mm
Source/WebKitLegacy/mac/WebCoreSupport/WebVisitedLinkStore.h
Source/WebKitLegacy/mac/WebView/WebDataSource.mm
Source/WebKitLegacy/mac/WebView/WebFrame.mm
Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm
Source/WebKitLegacy/mac/WebView/WebPDFView.mm
Source/WebKitLegacy/mac/WebView/WebScriptDebugger.mm
Source/WebKitLegacy/mac/WebView/WebViewInternal.h
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/MarshallingHelpers.cpp
Source/WebKitLegacy/win/MarshallingHelpers.h
Source/WebKitLegacy/win/Plugins/PluginDatabase.cpp
Source/WebKitLegacy/win/Plugins/PluginDatabase.h
Source/WebKitLegacy/win/Plugins/PluginDatabaseWin.cpp
Source/WebKitLegacy/win/Plugins/PluginStream.h
Source/WebKitLegacy/win/Plugins/PluginView.h
Source/WebKitLegacy/win/WebCoreSupport/WebContextMenuClient.h
Source/WebKitLegacy/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
Source/WebKitLegacy/win/WebCoreSupport/WebDesktopNotificationsDelegate.h
Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.h
Source/WebKitLegacy/win/WebCoreSupport/WebPluginInfoProvider.cpp
Source/WebKitLegacy/win/WebCoreSupport/WebPluginInfoProvider.h
Source/WebKitLegacy/win/WebCoreSupport/WebVisitedLinkStore.h
Source/WebKitLegacy/win/WebDataSource.cpp
Source/WebKitLegacy/win/WebDownload.h
Source/WebKitLegacy/win/WebElementPropertyBag.cpp
Source/WebKitLegacy/win/WebFrame.h
Source/WebKitLegacy/win/WebHistory.cpp
Source/WebKitLegacy/win/WebHistory.h
Source/WebKitLegacy/win/WebHistoryItem.cpp
Source/WebKitLegacy/win/WebResource.cpp
Source/WebKitLegacy/win/WebResource.h
Source/WebKitLegacy/win/WebSecurityOrigin.cpp
Source/WebKitLegacy/win/WebURLResponse.cpp
Source/WebKitLegacy/win/WebUserContentURLPattern.cpp
Source/WebKitLegacy/win/WebView.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp
Tools/TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp
Tools/TestWebKitAPI/Tests/WebCore/URL.cpp
Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp
Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp
Tools/TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp
Tools/TestWebKitAPI/Tests/WebCore/cocoa/URLExtras.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm
Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm
Tools/TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp
Tools/TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm
Tools/TestWebKitAPI/Tests/mac/SSLKeyGenerator.mm
Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp
Tools/lldb/lldb_webkit.py

index 70e6d32..0ef827b 100644 (file)
@@ -1,3 +1,80 @@
+2018-11-30  Alex Christensen  <achristensen@webkit.org>
+
+        Move URL from WebCore to WTF
+        https://bugs.webkit.org/show_bug.cgi?id=190234
+
+        Reviewed by Keith Miller.
+
+        * WTF.xcodeproj/project.pbxproj:
+        * wtf/CMakeLists.txt:
+        * wtf/Forward.h:
+        * wtf/PlatformGTK.cmake:
+        * wtf/PlatformMac.cmake:
+        * wtf/PlatformWPE.cmake:
+        * wtf/PlatformWin.cmake:
+        * wtf/URL.cpp: Renamed from Source/WebCore/platform/URL.cpp.
+        (WTF::URL::protocolIs):
+        * wtf/URL.h: Renamed from Source/WebCore/platform/URL.h.
+        * wtf/URLHash.h: Renamed from Source/WebCore/platform/URLHash.h.
+        (WTF::URLHash::hash):
+        (WTF::URLHash::equal):
+        * wtf/URLParser.cpp: Renamed from Source/WebCore/platform/URLParser.cpp.
+        (WTF::URLParser::isInUserInfoEncodeSet):
+        (WTF::URLParser::parseAuthority):
+        * wtf/URLParser.h: Renamed from Source/WebCore/platform/URLParser.h.
+        (WTF::URLParser::URLParser):
+        (WTF::URLParser::result):
+        * wtf/cf/CFURLExtras.cpp: Renamed from Source/WebCore/platform/cf/CFURLExtras.cpp.
+        * wtf/cf/CFURLExtras.h: Renamed from Source/WebCore/platform/cf/CFURLExtras.h.
+        * wtf/cf/URLCF.cpp: Renamed from Source/WebCore/platform/cf/URLCF.cpp.
+        * wtf/cocoa/NSURLExtras.h: Copied from Source/WebCore/loader/archive/ArchiveResourceCollection.h.
+        * wtf/cocoa/NSURLExtras.mm: Copied from Source/WebCore/platform/mac/WebCoreNSURLExtras.mm.
+        (WTF::isArmenianLookalikeCharacter):
+        (WTF::isArmenianScriptCharacter):
+        (WTF::isASCIIDigitOrValidHostCharacter):
+        (WTF::isLookalikeCharacter):
+        (WTF::whiteListIDNScript):
+        (WTF::readIDNScriptWhiteListFile):
+        (WTF::allCharactersInIDNScriptWhiteList):
+        (WTF::isSecondLevelDomainNameAllowedByTLDRules):
+        (WTF::isRussianDomainNameCharacter):
+        (WTF::allCharactersAllowedByTLDRules):
+        (WTF::mapHostNameWithRange):
+        (WTF::hostNameNeedsDecodingWithRange):
+        (WTF::hostNameNeedsEncodingWithRange):
+        (WTF::decodeHostNameWithRange):
+        (WTF::encodeHostNameWithRange):
+        (WTF::decodeHostName):
+        (WTF::encodeHostName):
+        (WTF::collectRangesThatNeedMapping):
+        (WTF::collectRangesThatNeedEncoding):
+        (WTF::collectRangesThatNeedDecoding):
+        (WTF::applyHostNameFunctionToMailToURLString):
+        (WTF::applyHostNameFunctionToURLString):
+        (WTF::mapHostNames):
+        (WTF::stringByTrimmingWhitespace):
+        (WTF::URLByTruncatingOneCharacterBeforeComponent):
+        (WTF::URLByRemovingResourceSpecifier):
+        (WTF::URLWithData):
+        (WTF::dataWithUserTypedString):
+        (WTF::URLWithUserTypedString):
+        (WTF::URLWithUserTypedStringDeprecated):
+        (WTF::hasQuestionMarkOnlyQueryString):
+        (WTF::dataForURLComponentType):
+        (WTF::URLByRemovingComponentAndSubsequentCharacter):
+        (WTF::URLByRemovingUserInfo):
+        (WTF::originalURLData):
+        (WTF::createStringWithEscapedUnsafeCharacters):
+        (WTF::userVisibleString):
+        (WTF::isUserVisibleURL):
+        (WTF::rangeOfURLScheme):
+        (WTF::looksLikeAbsoluteURL):
+        * wtf/cocoa/URLCocoa.mm: Renamed from Source/WebCore/platform/mac/URLMac.mm.
+        (WTF::URL::URL):
+        (WTF::URL::createCFURL const):
+        * wtf/glib/GUniquePtrSoup.h: Renamed from Source/WebCore/platform/network/soup/GUniquePtrSoup.h.
+        * wtf/glib/URLSoup.cpp: Renamed from Source/WebCore/platform/soup/URLSoup.cpp.
+
 2018-11-30  Alexey Proskuryakov  <ap@apple.com>
 
         Move USE_CFNETWORK_IGNORE_HSTS to its proper place
index 67f5509..a223949 100644 (file)
                5311BD531EA71CAD00525281 /* Signals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5311BD511EA71CAD00525281 /* Signals.cpp */; };
                5311BD5C1EA822F900525281 /* ThreadMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5311BD5B1EA822F900525281 /* ThreadMessage.cpp */; };
                53534F2A1EC0E10E00141B2F /* MachExceptions.defs in Sources */ = {isa = PBXBuildFile; fileRef = 53534F291EC0E10E00141B2F /* MachExceptions.defs */; settings = {ATTRIBUTES = (Client, Server, ); }; };
+               5C1F05932164356B0039302C /* CFURLExtras.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C1F05912164356B0039302C /* CFURLExtras.cpp */; };
+               5C1F0595216437B30039302C /* URLCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C1F0594216437B30039302C /* URLCF.cpp */; };
+               5CC0EE7521629F1900A1A842 /* URLParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5CC0EE7321629F1900A1A842 /* URLParser.cpp */; };
+               5CC0EE7621629F1900A1A842 /* URL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5CC0EE7421629F1900A1A842 /* URL.cpp */; };
+               5CC0EE892162BC2200A1A842 /* URLCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CC0EE862162BC2200A1A842 /* URLCocoa.mm */; };
+               5CC0EE8A2162BC2200A1A842 /* NSURLExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CC0EE882162BC2200A1A842 /* NSURLExtras.mm */; };
                70A993FE1AD7151300FA615B /* SymbolRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 70A993FC1AD7151300FA615B /* SymbolRegistry.cpp */; };
                70ECA60D1B02426800449739 /* AtomicStringImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 70ECA60A1B02426800449739 /* AtomicStringImpl.cpp */; };
                7A05093F1FB9DCC500B33FB8 /* JSONValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A05093E1FB9DCC500B33FB8 /* JSONValues.cpp */; };
                553071C91C40427200384898 /* TinyLRUCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TinyLRUCache.h; sourceTree = "<group>"; };
                5597F82C1D94B9970066BC21 /* SynchronizedFixedQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SynchronizedFixedQueue.h; sourceTree = "<group>"; };
                5B43383A5D0B463C9433D933 /* IndexMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IndexMap.h; sourceTree = "<group>"; };
+               5C1F05912164356B0039302C /* CFURLExtras.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CFURLExtras.cpp; sourceTree = "<group>"; };
+               5C1F05922164356B0039302C /* CFURLExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFURLExtras.h; sourceTree = "<group>"; };
+               5C1F0594216437B30039302C /* URLCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLCF.cpp; sourceTree = "<group>"; };
+               5C1F0597216439940039302C /* URLHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLHash.h; sourceTree = "<group>"; };
                5C7C88D31D0A3A0A009D2F6D /* UniqueRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniqueRef.h; sourceTree = "<group>"; };
+               5CC0EE7121629F1800A1A842 /* URL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URL.h; sourceTree = "<group>"; };
+               5CC0EE7221629F1900A1A842 /* URLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLParser.h; sourceTree = "<group>"; };
+               5CC0EE7321629F1900A1A842 /* URLParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLParser.cpp; sourceTree = "<group>"; };
+               5CC0EE7421629F1900A1A842 /* URL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URL.cpp; sourceTree = "<group>"; };
+               5CC0EE772162A01000A1A842 /* URLHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLHash.h; sourceTree = "<group>"; };
+               5CC0EE862162BC2200A1A842 /* URLCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = URLCocoa.mm; sourceTree = "<group>"; };
+               5CC0EE872162BC2200A1A842 /* NSURLExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSURLExtras.h; sourceTree = "<group>"; };
+               5CC0EE882162BC2200A1A842 /* NSURLExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NSURLExtras.mm; sourceTree = "<group>"; };
                5D247B6214689B8600E78B76 /* libWTF.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libWTF.a; sourceTree = BUILT_PRODUCTS_DIR; };
                5D247B6E14689C4700E78B76 /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
                5D247B7014689C4700E78B76 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
                2CDED0F018115C3F004DBA70 /* cf */ = {
                        isa = PBXGroup;
                        children = (
+                               5C1F05912164356B0039302C /* CFURLExtras.cpp */,
+                               5C1F05922164356B0039302C /* CFURLExtras.h */,
                                C2BCFC411F61D61600C9222C /* LanguageCF.cpp */,
                                2CDED0EE18115C38004DBA70 /* RunLoopCF.cpp */,
                                1AFDE647195201C300C48FFA /* TypeCastsCF.h */,
+                               5C1F0594216437B30039302C /* URLCF.cpp */,
                        );
                        path = cf;
                        sourceTree = "<group>";
                                E300E521203D645F00DA79BE /* UniqueArray.h */,
                                5C7C88D31D0A3A0A009D2F6D /* UniqueRef.h */,
                                CD7600FF1F90A3CA00026E26 /* UnsafePointer.h */,
+                               5CC0EE7421629F1900A1A842 /* URL.cpp */,
+                               5CC0EE7121629F1800A1A842 /* URL.h */,
+                               5C1F0597216439940039302C /* URLHash.h */,
+                               5CC0EE772162A01000A1A842 /* URLHash.h */,
+                               5CC0EE7321629F1900A1A842 /* URLParser.cpp */,
+                               5CC0EE7221629F1900A1A842 /* URLParser.h */,
                                7AFEC6B01EB22B5900DADE36 /* UUID.cpp */,
                                7AFEC6AE1EB22AC600DADE36 /* UUID.h */,
                                A8A4736F151A825B004123FF /* ValueCheck.h */,
                                A8A472C5151A825A004123FF /* MainThreadCocoa.mm */,
                                ADF2CE651E39F106006889DB /* MemoryFootprintCocoa.cpp */,
                                AD89B6B91E64150F0090707F /* MemoryPressureHandlerCocoa.mm */,
+                               5CC0EE872162BC2200A1A842 /* NSURLExtras.h */,
+                               5CC0EE882162BC2200A1A842 /* NSURLExtras.mm */,
                                A30D412C1F0DE0BA00B71954 /* SoftLinking.h */,
+                               5CC0EE862162BC2200A1A842 /* URLCocoa.mm */,
                                E4A0AD3C1A96253C00536DF6 /* WorkQueueCocoa.cpp */,
                        );
                        path = cocoa;
                                A8A4738B151A825B004123FF /* BitVector.cpp in Sources */,
                                DCEE22011CEA7551000C2396 /* BlockObjCExceptions.mm in Sources */,
                                A8A473AC151A825B004123FF /* cached-powers.cc in Sources */,
+                               5C1F05932164356B0039302C /* CFURLExtras.cpp in Sources */,
                                0F66B28A1DC97BAB004A1D3F /* ClockType.cpp in Sources */,
                                A8A47460151A825B004123FF /* CollatorDefault.cpp in Sources */,
                                A8A47463151A825B004123FF /* CollatorICU.cpp in Sources */,
                                AD89B6BA1E64150F0090707F /* MemoryPressureHandlerCocoa.mm in Sources */,
                                A8A473EC151A825B004123FF /* MetaAllocator.cpp in Sources */,
                                0F66B28C1DC97BAB004A1D3F /* MonotonicTime.cpp in Sources */,
+                               5CC0EE8A2162BC2200A1A842 /* NSURLExtras.mm in Sources */,
                                A8A473F4151A825B004123FF /* NumberOfCores.cpp in Sources */,
                                A8A473F7151A825B004123FF /* OSAllocatorPosix.cpp in Sources */,
                                A8A473F9151A825B004123FF /* OSRandomSource.cpp in Sources */,
                                5311BD5C1EA822F900525281 /* ThreadMessage.cpp in Sources */,
                                0F66B2901DC97BAB004A1D3F /* TimeWithDynamicClockType.cpp in Sources */,
                                0F7075F51FBF53CD00489AF0 /* TimingScope.cpp in Sources */,
+                               5CC0EE7621629F1900A1A842 /* URL.cpp in Sources */,
+                               5C1F0595216437B30039302C /* URLCF.cpp in Sources */,
+                               5CC0EE892162BC2200A1A842 /* URLCocoa.mm in Sources */,
+                               5CC0EE7521629F1900A1A842 /* URLParser.cpp in Sources */,
                                1C181C8F1D307AB800F5FA16 /* UTextProvider.cpp in Sources */,
                                1C181C911D307AB800F5FA16 /* UTextProviderLatin1.cpp in Sources */,
                                1C181C931D307AB800F5FA16 /* UTextProviderUTF16.cpp in Sources */,
index 63c7070..cee1cce 100644 (file)
@@ -240,6 +240,9 @@ set(WTF_PUBLIC_HEADERS
     TinyPtrSet.h
     TriState.h
     TypeCasts.h
+    URL.h
+    URLHash.h
+    URLParser.h
     UUID.h
     UnalignedAccess.h
     Unexpected.h
@@ -394,6 +397,8 @@ set(WTF_SOURCES
     Threading.cpp
     TimeWithDynamicClockType.cpp
     TimingScope.cpp
+    URL.cpp
+    URLParser.cpp
     UUID.cpp
     WTFAssertions.cpp
     WallTime.cpp
index 5fdb592..b83997c 100644 (file)
@@ -43,6 +43,7 @@ class StringView;
 class TextPosition;
 class TextStream;
 class UniquedStringImpl;
+class URL;
 class WallTime;
 
 struct FastMalloc;
@@ -112,6 +113,7 @@ using WTF::StringImpl;
 using WTF::StringView;
 using WTF::TextPosition;
 using WTF::TextStream;
+using WTF::URL;
 using WTF::Variant;
 using WTF::Vector;
 
index 696a1ba..006fc22 100644 (file)
@@ -6,6 +6,7 @@ list(APPEND WTF_PUBLIC_HEADERS
     glib/GRefPtr.h
     glib/GTypedefs.h
     glib/GUniquePtr.h
+    glib/GUniquePtrSoup.h
     glib/RunLoopSourcePriority.h
     glib/WTFGType.h
 )
@@ -25,6 +26,7 @@ list(APPEND WTF_SOURCES
     glib/GLibUtilities.cpp
     glib/GRefPtr.cpp
     glib/RunLoopGLib.cpp
+    glib/URLSoup.cpp
 
     text/unix/TextBreakIteratorInternalICUUnix.cpp
 
@@ -50,9 +52,11 @@ list(APPEND WTF_LIBRARIES
     ${GLIB_GIO_LIBRARIES}
     ${GLIB_GOBJECT_LIBRARIES}
     ${GLIB_LIBRARIES}
+    ${LIBSOUP_LIBRARIES}
     ${ZLIB_LIBRARIES}
 )
 
 list(APPEND WTF_SYSTEM_INCLUDE_DIRECTORIES
     ${GLIB_INCLUDE_DIRS}
+    ${LIBSOUP_INCLUDE_DIRS}
 )
index d9bd48f..4795f8f 100644 (file)
@@ -8,10 +8,12 @@ list(APPEND WTF_LIBRARIES
 )
 
 list(APPEND WTF_PUBLIC_HEADERS
+    cf/CFURLExtras.h
     cf/TypeCastsCF.h
 
     cocoa/Entitlements.h
     cocoa/MachSendRight.h
+    cocoa/NSURLExtras.h
     cocoa/SoftLinking.h
 
     darwin/WeakLinking.h
@@ -37,8 +39,10 @@ list(APPEND WTF_SOURCES
     SchedulePairCF.cpp
     SchedulePairMac.mm
 
+    cf/CFURLExtras.cpp
     cf/LanguageCF.cpp
     cf/RunLoopCF.cpp
+    cf/URLCF.cpp
 
     cocoa/AutodrainedPool.cpp
     cocoa/CPUTimeCocoa.cpp
@@ -47,6 +51,8 @@ list(APPEND WTF_SOURCES
     cocoa/MainThreadCocoa.mm
     cocoa/MemoryFootprintCocoa.cpp
     cocoa/MemoryPressureHandlerCocoa.mm
+    cocoa/NSURLExtras.mm
+    cocoa/URLCocoa.mm
     cocoa/WorkQueueCocoa.cpp
 
     mac/DeprecatedSymbolsUsedBySafari.mm
index 752b599..a02da52 100644 (file)
@@ -4,6 +4,7 @@ list(APPEND WTF_PUBLIC_HEADERS
     glib/GRefPtr.h
     glib/GTypedefs.h
     glib/GUniquePtr.h
+    glib/GUniquePtrSoup.h
     glib/RunLoopSourcePriority.h
     glib/WTFGType.h
 
@@ -19,6 +20,7 @@ list(APPEND WTF_SOURCES
     glib/GLibUtilities.cpp
     glib/GRefPtr.cpp
     glib/RunLoopGLib.cpp
+    glib/URLSoup.cpp
 
     linux/CurrentProcessMemoryStatus.cpp
     linux/MemoryFootprintLinux.cpp
@@ -35,9 +37,11 @@ list(APPEND WTF_LIBRARIES
     ${GLIB_GIO_LIBRARIES}
     ${GLIB_GOBJECT_LIBRARIES}
     ${GLIB_LIBRARIES}
+    ${LIBSOUP_LIBRARIES}
     ${ZLIB_LIBRARIES}
 )
 
 list(APPEND WTF_SYSTEM_INCLUDE_DIRECTORIES
     ${GLIB_INCLUDE_DIRS}
+    ${LIBSOUP_INCLUDE_DIRS}
 )
index 5f2275a..2b8b5f8 100644 (file)
@@ -22,11 +22,15 @@ list(APPEND WTF_SOURCES
 
 if (USE_CF)
     list(APPEND WTF_PUBLIC_HEADERS
+        cf/CFURLExtras.h
         cf/TypeCastsCF.h
 
         text/cf/TextBreakIteratorCF.h
     )
     list(APPEND WTF_SOURCES
+        cf/CFURLExtras.cpp
+        cf/URLCF.cpp
+
         text/cf/AtomicStringImplCF.cpp
         text/cf/StringCF.cpp
         text/cf/StringImplCF.cpp
similarity index 99%
rename from Source/WebCore/platform/URL.cpp
rename to Source/WTF/wtf/URL.cpp
index 013462b..5ce17cd 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include "config.h"
-#include "URL.h"
+#include <wtf/URL.h>
 
 #include "URLParser.h"
 #include <stdio.h>
@@ -46,8 +46,7 @@
 // so many allocations, or change this to use StringBuffer instead.
 
 
-namespace WebCore {
-using namespace WTF;
+namespace WTF {
 
 typedef Vector<char, 512> CharBuffer;
 typedef Vector<UChar, 512> UCharBuffer;
@@ -807,7 +806,7 @@ bool protocolIs(const String& url, const char* protocol)
 
 inline bool URL::protocolIs(const String& string, const char* protocol)
 {
-    return WebCore::protocolIsInternal(string, protocol);
+    return WTF::protocolIsInternal(string, protocol);
 }
 
 #ifndef NDEBUG
@@ -1107,4 +1106,4 @@ bool URL::hostIsIPAddress(StringView host)
 }
 #endif
 
-} // namespace WebCore
+} // namespace WTF
similarity index 71%
rename from Source/WebCore/platform/URL.h
rename to Source/WTF/wtf/URL.h
index 8a818ba..9979e69 100644 (file)
@@ -34,7 +34,7 @@ typedef const struct __CFURL* CFURLRef;
 #endif
 
 #if USE(SOUP)
-#include "GUniquePtrSoup.h"
+#include <wtf/glib/GUniquePtrSoup.h>
 #endif
 
 #if USE(FOUNDATION)
@@ -43,9 +43,6 @@ OBJC_CLASS NSURL;
 
 namespace WTF {
 class TextStream;
-}
-
-namespace WebCore {
 
 class URLTextEncoding {
 public:
@@ -55,7 +52,7 @@ public:
 
 struct URLHash;
 
-class URL {
+class WTF_EXPORT_PRIVATE URL {
 public:
     // Generates a URL which contains a null string.
     URL() { invalidate(); }
@@ -70,10 +67,10 @@ public:
     // FIXME: If the base URL is invalid, this always creates an invalid
     // URL. Instead I think it would be better to treat all invalid base URLs
     // the same way we treate null and empty base URLs.
-    WEBCORE_EXPORT URL(const URL& base, const String& relative, const URLTextEncoding* = nullptr);
+    URL(const URL& base, const String& relative, const URLTextEncoding* = nullptr);
 
-    WEBCORE_EXPORT static URL fakeURLWithRelativePart(const String&);
-    WEBCORE_EXPORT static URL fileURLWithFileSystemPath(const String&);
+    static URL fakeURLWithRelativePart(const String&);
+    static URL fileURLWithFileSystemPath(const String&);
 
     String strippedForUseAsReferrer() const;
 
@@ -84,7 +81,7 @@ public:
     // Makes a deep copy. Helpful only if you need to use a URL on another
     // thread. Since the underlying StringImpl objects are immutable, there's
     // no other reason to ever prefer isolatedCopy() over plain old assignment.
-    WEBCORE_EXPORT URL isolatedCopy() const;
+    URL isolatedCopy() const;
 
     bool isNull() const;
     bool isEmpty() const;
@@ -99,20 +96,20 @@ public:
 
     const String& string() const { return m_string; }
 
-    WEBCORE_EXPORT String stringCenterEllipsizedToLength(unsigned length = 1024) const;
-
-    WEBCORE_EXPORT StringView protocol() const;
-    WEBCORE_EXPORT StringView host() const;
-    WEBCORE_EXPORT std::optional<uint16_t> port() const;
-    WEBCORE_EXPORT String hostAndPort() const;
-    WEBCORE_EXPORT String protocolHostAndPort() const;
-    WEBCORE_EXPORT String user() const;
-    WEBCORE_EXPORT String pass() const;
-    WEBCORE_EXPORT String path() const;
-    WEBCORE_EXPORT String lastPathComponent() const;
-    WEBCORE_EXPORT String query() const;
-    WEBCORE_EXPORT String fragmentIdentifier() const;
-    WEBCORE_EXPORT bool hasFragmentIdentifier() const;
+    String stringCenterEllipsizedToLength(unsigned length = 1024) const;
+
+    StringView protocol() const;
+    StringView host() const;
+    std::optional<uint16_t> port() const;
+    String hostAndPort() const;
+    String protocolHostAndPort() const;
+    String user() const;
+    String pass() const;
+    String path() const;
+    String lastPathComponent() const;
+    String query() const;
+    String fragmentIdentifier() const;
+    bool hasFragmentIdentifier() const;
 
     bool hasUsername() const;
     bool hasPassword() const;
@@ -122,27 +119,28 @@ public:
 
     // Unlike user() and pass(), these functions don't decode escape sequences.
     // This is necessary for accurate round-tripping, because encoding doesn't encode '%' characters.
-    WEBCORE_EXPORT String encodedUser() const;
-    WEBCORE_EXPORT String encodedPass() const;
+    String encodedUser() const;
+    String encodedPass() const;
 
-    WEBCORE_EXPORT String baseAsString() const;
+    String baseAsString() const;
 
-    WEBCORE_EXPORT String fileSystemPath() const;
+    String fileSystemPath() const;
 
     // Returns true if the current URL's protocol is the same as the null-
     // terminated ASCII argument. The argument must be lower-case.
-    WEBCORE_EXPORT bool protocolIs(const char*) const;
+    bool protocolIs(const char*) const;
     bool protocolIs(StringView) const;
     bool protocolIsBlob() const { return protocolIs("blob"); }
     bool protocolIsData() const { return protocolIs("data"); }
-    WEBCORE_EXPORT bool protocolIsAbout() const;
+    bool protocolIsAbout() const;
     bool protocolIsInHTTPFamily() const;
-    WEBCORE_EXPORT bool isLocalFile() const;
+    bool isLocalFile() const;
+    bool isBlankURL() const;
     bool cannotBeABaseURL() const { return m_cannotBeABaseURL; }
 
-    WEBCORE_EXPORT bool isMatchingDomain(const String&) const;
+    bool isMatchingDomain(const String&) const;
 
-    WEBCORE_EXPORT bool setProtocol(const String&);
+    bool setProtocol(const String&);
     void setHost(const String&);
 
     void removePort();
@@ -156,19 +154,19 @@ public:
 
     // If you pass an empty path for HTTP or HTTPS URLs, the resulting path
     // will be "/".
-    WEBCORE_EXPORT void setPath(const String&);
+    void setPath(const String&);
 
     // The query may begin with a question mark, or, if not, one will be added
     // for you. Setting the query to the empty string will leave a "?" in the
     // URL (with nothing after it). To clear the query, pass a null string.
-    WEBCORE_EXPORT void setQuery(const String&);
+    void setQuery(const String&);
 
-    WEBCORE_EXPORT void setFragmentIdentifier(StringView);
-    WEBCORE_EXPORT void removeFragmentIdentifier();
+    void setFragmentIdentifier(StringView);
+    void removeFragmentIdentifier();
 
-    WEBCORE_EXPORT void removeQueryAndFragmentIdentifier();
+    void removeQueryAndFragmentIdentifier();
 
-    WEBCORE_EXPORT static bool hostIsIPAddress(StringView);
+    static bool hostIsIPAddress(StringView);
 
     unsigned pathStart() const;
     unsigned pathEnd() const;
@@ -177,8 +175,8 @@ public:
     operator const String&() const { return string(); }
 
 #if USE(CF)
-    WEBCORE_EXPORT URL(CFURLRef);
-    WEBCORE_EXPORT RetainPtr<CFURLRef> createCFURL() const;
+    URL(CFURLRef);
+    RetainPtr<CFURLRef> createCFURL() const;
 #endif
 
 #if USE(SOUP)
@@ -187,8 +185,8 @@ public:
 #endif
 
 #if USE(FOUNDATION)
-    WEBCORE_EXPORT URL(NSURL*);
-    WEBCORE_EXPORT operator NSURL*() const;
+    URL(NSURL*);
+    operator NSURL*() const;
 #endif
 #ifdef __OBJC__
     operator NSString*() const { return string(); }
@@ -204,14 +202,14 @@ public:
 
 private:
     friend class URLParser;
-    WEBCORE_EXPORT void invalidate();
+    void invalidate();
     static bool protocolIs(const String&, const char*);
     void copyToBuffer(Vector<char, 512>& buffer) const;
     unsigned hostStart() const;
 
-    WEBCORE_EXPORT friend bool equalIgnoringFragmentIdentifier(const URL&, const URL&);
-    WEBCORE_EXPORT friend bool protocolHostAndPortAreEqual(const URL&, const URL&);
-    WEBCORE_EXPORT friend bool hostsAreEqual(const URL&, const URL&);
+    friend WTF_EXPORT_PRIVATE bool equalIgnoringFragmentIdentifier(const URL&, const URL&);
+    friend WTF_EXPORT_PRIVATE bool protocolHostAndPortAreEqual(const URL&, const URL&);
+    friend WTF_EXPORT_PRIVATE bool hostsAreEqual(const URL&, const URL&);
 
     String m_string;
 
@@ -261,36 +259,36 @@ std::optional<URL> URL::decode(Decoder& decoder)
     return URL(URL(), string);
 }
 
-WEBCORE_EXPORT bool equalIgnoringFragmentIdentifier(const URL&, const URL&);
-WEBCORE_EXPORT bool equalIgnoringQueryAndFragment(const URL&, const URL&);
-WEBCORE_EXPORT bool protocolHostAndPortAreEqual(const URL&, const URL&);
-WEBCORE_EXPORT bool hostsAreEqual(const URL&, const URL&);
+WTF_EXPORT_PRIVATE bool equalIgnoringFragmentIdentifier(const URL&, const URL&);
+WTF_EXPORT_PRIVATE bool equalIgnoringQueryAndFragment(const URL&, const URL&);
+WTF_EXPORT_PRIVATE bool protocolHostAndPortAreEqual(const URL&, const URL&);
+WTF_EXPORT_PRIVATE bool hostsAreEqual(const URL&, const URL&);
 
-WEBCORE_EXPORT const URL& blankURL();
+WTF_EXPORT_PRIVATE const URL& blankURL();
 
 // Functions to do URL operations on strings.
 // These are operations that aren't faster on a parsed URL.
 // These are also different from the URL functions in that they don't require the string to be a valid and parsable URL.
 // This is especially important because valid javascript URLs are not necessarily considered valid by URL.
 
-WEBCORE_EXPORT bool protocolIs(const String& url, const char* protocol);
-WEBCORE_EXPORT bool protocolIsJavaScript(const String& url);
-bool protocolIsJavaScript(StringView url);
-WEBCORE_EXPORT bool protocolIsInHTTPFamily(const String& url);
+WTF_EXPORT_PRIVATE bool protocolIs(const String& url, const char* protocol);
+WTF_EXPORT_PRIVATE bool protocolIsJavaScript(const String& url);
+WTF_EXPORT_PRIVATE bool protocolIsJavaScript(StringView url);
+WTF_EXPORT_PRIVATE bool protocolIsInHTTPFamily(const String& url);
 
-std::optional<uint16_t> defaultPortForProtocol(StringView protocol);
-WEBCORE_EXPORT bool isDefaultPortForProtocol(uint16_t port, StringView protocol);
-WEBCORE_EXPORT bool portAllowed(const URL&); // Blacklist ports that should never be used for Web resources.
+WTF_EXPORT_PRIVATE std::optional<uint16_t> defaultPortForProtocol(StringView protocol);
+WTF_EXPORT_PRIVATE bool isDefaultPortForProtocol(uint16_t port, StringView protocol);
+WTF_EXPORT_PRIVATE bool portAllowed(const URL&); // Blacklist ports that should never be used for Web resources.
 
-WEBCORE_EXPORT void registerDefaultPortForProtocolForTesting(uint16_t port, const String& protocol);
-WEBCORE_EXPORT void clearDefaultPortForProtocolMapForTesting();
+WTF_EXPORT_PRIVATE void registerDefaultPortForProtocolForTesting(uint16_t port, const String& protocol);
+WTF_EXPORT_PRIVATE void clearDefaultPortForProtocolMapForTesting();
 
-bool isValidProtocol(const String&);
+WTF_EXPORT_PRIVATE bool isValidProtocol(const String&);
 
-String mimeTypeFromDataURL(const String& url);
+WTF_EXPORT_PRIVATE String mimeTypeFromDataURL(const String& url);
 
 // FIXME: This is a wrong concept to expose, different parts of a URL need different escaping per the URL Standard.
-WEBCORE_EXPORT String encodeWithURLEscapeSequences(const String&);
+WTF_EXPORT_PRIVATE String encodeWithURLEscapeSequences(const String&);
 
 // Inlines.
 
@@ -387,11 +385,9 @@ inline unsigned URL::pathAfterLastSlash() const
     return m_pathAfterLastSlash;
 }
 
-WTF::TextStream& operator<<(WTF::TextStream&, const URL&);
+WTF_EXPORT_PRIVATE WTF::TextStream& operator<<(WTF::TextStream&, const URL&);
 
-} // namespace WebCore
+template<> struct DefaultHash<URL>;
+template<> struct HashTraits<URL>;
 
-namespace WTF {
-template<> struct DefaultHash<WebCore::URL>;
-template<> struct HashTraits<WebCore::URL>;
 } // namespace WTF
similarity index 72%
rename from Source/WebCore/platform/URLHash.h
rename to Source/WTF/wtf/URLHash.h
index 41d0ab9..d02fa3d 100644 (file)
 #ifndef URLHash_h
 #define URLHash_h
 
-#include "URL.h"
+#include <wtf/URL.h>
 #include <wtf/text/StringHash.h>
 #include <wtf/text/WTFString.h>
 
-namespace WebCore {
-
-    struct URLHash {
-        static unsigned hash(const URL& key)
-        {
-            return key.string().impl()->hash();
-        }
-
-        static bool equal(const URL& a, const URL& b)
-        {
-            return StringHash::equal(a.string(), b.string());
-        }
+namespace WTF {
 
-        static const bool safeToCompareToEmptyOrDeleted = false;
-    };
+struct URLHash {
+    static unsigned hash(const URL& key)
+    {
+        return key.string().impl()->hash();
+    }
 
-} // namespace WebCore
+    static bool equal(const URL& a, const URL& b)
+    {
+        return StringHash::equal(a.string(), b.string());
+    }
 
-namespace WTF {
+    static const bool safeToCompareToEmptyOrDeleted = false;
+};
 
 // URLHash is the default hash for String
-template<> struct DefaultHash<WebCore::URL> {
-    using Hash = WebCore::URLHash;
+template<> struct DefaultHash<URL> {
+    using Hash = URLHash;
 };
 
-template<> struct HashTraits<WebCore::URL> : SimpleClassHashTraits<WebCore::URL> { };
+template<> struct HashTraits<URL> : SimpleClassHashTraits<URL> { };
 
 } // namespace WTF
 
similarity index 99%
rename from Source/WebCore/platform/URLParser.cpp
rename to Source/WTF/wtf/URLParser.cpp
index 17bac49..509d4b8 100644 (file)
  */
 
 #include "config.h"
-#include "URLParser.h"
+#include <wtf/URLParser.h>
 
-#include "Logging.h"
-#include "RuntimeApplicationChecks.h"
 #include <array>
 #include <mutex>
 #include <unicode/uidna.h>
+#include <unicode/utf8.h>
 #include <unicode/utypes.h>
 
-namespace WebCore {
+namespace WTF {
 
 #define URL_PARSER_DEBUGGING 0
 
 #if URL_PARSER_DEBUGGING
-#define URL_PARSER_LOG(...) LOG(URLParser, __VA_ARGS__)
+#define URL_PARSER_LOG(...) WTFLogAlways(__VA_ARGS__)
 #else
 #define URL_PARSER_LOG(...)
 #endif
@@ -431,7 +430,7 @@ ALWAYS_INLINE static bool shouldPercentEncodeQueryByte(uint8_t byte, const bool&
 
 bool URLParser::isInUserInfoEncodeSet(UChar c)
 {
-    return WebCore::isInUserInfoEncodeSet(c);
+    return WTF::isInUserInfoEncodeSet(c);
 }
 
 template<typename CharacterType, URLParser::ReportSyntaxViolation reportSyntaxViolation>
@@ -2087,10 +2086,10 @@ void URLParser::parseAuthority(CodePointIterator<CharacterType> iterator)
             appendToASCIIBuffer(':');
             break;
         }
-        utf8PercentEncode<WebCore::isInUserInfoEncodeSet>(iterator);
+        utf8PercentEncode<WTF::isInUserInfoEncodeSet>(iterator);
     }
     for (; !iterator.atEnd(); advance(iterator))
-        utf8PercentEncode<WebCore::isInUserInfoEncodeSet>(iterator);
+        utf8PercentEncode<WTF::isInUserInfoEncodeSet>(iterator);
     m_url.m_passwordEnd = currentPosition(iterator);
     if (!m_url.m_userEnd)
         m_url.m_userEnd = m_url.m_passwordEnd;
@@ -2923,4 +2922,4 @@ bool URLParser::internalValuesConsistent(const URL& url)
         && url.m_queryEnd <= url.m_string.length();
 }
 
-} // namespace WebCore
+} // namespace WTF
similarity index 91%
rename from Source/WebCore/platform/URLParser.h
rename to Source/WTF/wtf/URLParser.h
index f65beb0..9e25b54 100644 (file)
 
 #pragma once
 
-#include "URL.h"
 #include <wtf/Expected.h>
 #include <wtf/Forward.h>
+#include <wtf/URL.h>
 
 struct UIDNA;
 
-namespace WebCore {
+namespace WTF {
 
 template<typename CharacterType> class CodePointIterator;
 
 class URLParser {
 public:
-    WEBCORE_EXPORT URLParser(const String&, const URL& = { }, const URLTextEncoding* = nullptr);
-    URL result() { return m_url; }
-
-    WEBCORE_EXPORT static bool allValuesEqual(const URL&, const URL&);
-    WEBCORE_EXPORT static bool internalValuesConsistent(const URL&);
+    WTF_EXPORT_PRIVATE static bool allValuesEqual(const URL&, const URL&);
+    WTF_EXPORT_PRIVATE static bool internalValuesConsistent(const URL&);
     
-    typedef Vector<WTF::KeyValuePair<String, String>> URLEncodedForm;
-    WEBCORE_EXPORT static URLEncodedForm parseURLEncodedForm(StringView);
-    static String serialize(const URLEncodedForm&);
+    using URLEncodedForm = Vector<WTF::KeyValuePair<String, String>>;
+    WTF_EXPORT_PRIVATE static URLEncodedForm parseURLEncodedForm(StringView);
+    WTF_EXPORT_PRIVATE static String serialize(const URLEncodedForm&);
+
+    WTF_EXPORT_PRIVATE static bool isSpecialScheme(const String& scheme);
+    WTF_EXPORT_PRIVATE static std::optional<String> maybeCanonicalizeScheme(const String& scheme);
 
     static const UIDNA& internationalDomainNameTranscoder();
     static bool isInUserInfoEncodeSet(UChar);
 
-    WEBCORE_EXPORT static bool isSpecialScheme(const String& scheme);
-    WEBCORE_EXPORT static std::optional<String> maybeCanonicalizeScheme(const String& scheme);
-
 private:
+    URLParser(const String&, const URL& = { }, const URLTextEncoding* = nullptr);
+    URL result() { return m_url; }
+
     static std::optional<uint16_t> defaultPortForProtocol(StringView);
     friend std::optional<uint16_t> defaultPortForProtocol(StringView);
+    friend class URL;
 
     URL m_url;
     Vector<LChar> m_asciiBuffer;
similarity index 98%
rename from Source/WebCore/platform/cf/CFURLExtras.cpp
rename to Source/WTF/wtf/cf/CFURLExtras.cpp
index 73b43bc..b6665a8 100644 (file)
 #include "config.h"
 #include "CFURLExtras.h"
 
-#include "URL.h"
+#include <wtf/URL.h>
 #include <wtf/text/CString.h>
 
-namespace WebCore {
+namespace WTF {
 
 RetainPtr<CFURLRef> createCFURLFromBuffer(const char* data, size_t size, CFURLRef baseURL)
 {
similarity index 86%
rename from Source/WebCore/platform/cf/CFURLExtras.h
rename to Source/WTF/wtf/cf/CFURLExtras.h
index ffd5706..dac49c3 100644 (file)
 #include <wtf/RetainPtr.h>
 #include <wtf/Vector.h>
 
-namespace WebCore {
+namespace WTF {
 
 class URL;
 typedef Vector<char, 512> URLCharBuffer;
 
-WEBCORE_EXPORT RetainPtr<CFURLRef> createCFURLFromBuffer(const char*, size_t, CFURLRef baseURL = 0);
-WEBCORE_EXPORT void getURLBytes(CFURLRef, URLCharBuffer&);
-WEBCORE_EXPORT void getURLBytes(CFURLRef, CString&);
+WTF_EXPORT_PRIVATE RetainPtr<CFURLRef> createCFURLFromBuffer(const char*, size_t, CFURLRef baseURL = 0);
+WTF_EXPORT_PRIVATE void getURLBytes(CFURLRef, URLCharBuffer&);
+WTF_EXPORT_PRIVATE void getURLBytes(CFURLRef, CString&);
 
 bool isCFURLSameOrigin(CFURLRef, const URL&);
 
similarity index 95%
rename from Source/WebCore/platform/cf/URLCF.cpp
rename to Source/WTF/wtf/cf/URLCF.cpp
index 33366a2..89591e2 100644 (file)
  */
 
 #include "config.h"
-#include "URL.h"
+#include <wtf/URL.h>
 
 #include "CFURLExtras.h"
 #include "URLParser.h"
 #include <CoreFoundation/CFURL.h>
 #include <wtf/text/CString.h>
 
-#if PLATFORM(IOS_FAMILY)
-#include "RuntimeApplicationChecks.h"
-#endif
-
-namespace WebCore {
+namespace WTF {
 
 URL::URL(CFURLRef url)
 {
diff --git a/Source/WTF/wtf/cocoa/NSURLExtras.h b/Source/WTF/wtf/cocoa/NSURLExtras.h
new file mode 100644 (file)
index 0000000..0c432e4
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2005, 2007, 2012, 2014 Apple, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+@class NSString;
+@class NSURL;
+
+namespace WTF {
+
+WTF_EXPORT_PRIVATE NSString *userVisibleString(NSURL *);
+WTF_EXPORT_PRIVATE NSURL *URLWithUserTypedString(NSString *, NSURL *baseURL); // Return value of nil means error.
+WTF_EXPORT_PRIVATE NSURL *URLByRemovingUserInfo(NSURL *);
+WTF_EXPORT_PRIVATE NSString *decodeHostName(NSString *); // Return value of nil means error.
+WTF_EXPORT_PRIVATE NSString *encodeHostName(NSString *); // Return value of nil means error.
+WTF_EXPORT_PRIVATE NSURL *URLByTruncatingOneCharacterBeforeComponent(NSURL *, CFURLComponentType);
+WTF_EXPORT_PRIVATE NSURL *URLWithData(NSData *, NSURL *baseURL);
+WTF_EXPORT_PRIVATE NSData *originalURLData(NSURL *);
+WTF_EXPORT_PRIVATE NSData *dataForURLComponentType(NSURL *, CFURLComponentType);
+WTF_EXPORT_PRIVATE NSURL *URLWithUserTypedStringDeprecated(NSString *, NSURL *baseURL);
+
+NSRange rangeOfURLScheme(NSString *);
+WTF_EXPORT_PRIVATE BOOL isUserVisibleURL(NSString *);
+WTF_EXPORT_PRIVATE BOOL looksLikeAbsoluteURL(NSString *);
+
+} // namespace WTF
diff --git a/Source/WTF/wtf/cocoa/NSURLExtras.mm b/Source/WTF/wtf/cocoa/NSURLExtras.mm
new file mode 100644 (file)
index 0000000..135e42d
--- /dev/null
@@ -0,0 +1,1236 @@
+/*
+ * Copyright (C) 2005, 2007, 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import <Foundation/Foundation.h>
+#import "NSURLExtras.h"
+
+#import "CFURLExtras.h"
+#import "URLParser.h"
+#import <wtf/Function.h>
+#import <wtf/HexNumber.h>
+#import <wtf/ObjCRuntimeExtras.h>
+#import <wtf/RetainPtr.h>
+#import <wtf/Vector.h>
+#import <unicode/uchar.h>
+#import <unicode/uidna.h>
+#import <unicode/uscript.h>
+
+// Needs to be big enough to hold an IDN-encoded name.
+// For host names bigger than this, we won't do IDN encoding, which is almost certainly OK.
+#define HOST_NAME_BUFFER_LENGTH 2048
+#define URL_BYTES_BUFFER_LENGTH 2048
+
+typedef void (* StringRangeApplierFunction)(NSString *, NSRange, RetainPtr<NSMutableArray>&);
+
+static uint32_t IDNScriptWhiteList[(USCRIPT_CODE_LIMIT + 31) / 32];
+
+namespace WTF {
+
+static bool isArmenianLookalikeCharacter(UChar32 codePoint)
+{
+    return codePoint == 0x0548 || codePoint == 0x054D || codePoint == 0x0578 || codePoint == 0x057D;
+}
+
+static bool isArmenianScriptCharacter(UChar32 codePoint)
+{
+    UErrorCode error = U_ZERO_ERROR;
+    UScriptCode script = uscript_getScript(codePoint, &error);
+    if (error != U_ZERO_ERROR) {
+        LOG_ERROR("got ICU error while trying to look at scripts: %d", error);
+        return false;
+    }
+
+    return script == USCRIPT_ARMENIAN;
+}
+
+
+template<typename CharacterType> inline bool isASCIIDigitOrValidHostCharacter(CharacterType charCode)
+{
+    if (!isASCIIDigitOrPunctuation(charCode))
+        return false;
+
+    // Things the URL Parser rejects:
+    switch (charCode) {
+    case '#':
+    case '%':
+    case '/':
+    case ':':
+    case '?':
+    case '@':
+    case '[':
+    case '\\':
+    case ']':
+        return false;
+    default:
+        return true;
+    }
+}
+
+
+
+static BOOL isLookalikeCharacter(std::optional<UChar32> previousCodePoint, UChar32 charCode)
+{
+    // This function treats the following as unsafe, lookalike characters:
+    // any non-printable character, any character considered as whitespace,
+    // any ignorable character, and emoji characters related to locks.
+    
+    // We also considered the characters in Mozilla's blacklist <http://kb.mozillazine.org/Network.IDN.blacklist_chars>.
+
+    // Some of the characters here will never appear once ICU has encoded.
+    // For example, ICU transforms most spaces into an ASCII space and most
+    // slashes into an ASCII solidus. But one of the two callers uses this
+    // on characters that have not been processed by ICU, so they are needed here.
+    
+    if (!u_isprint(charCode) || u_isUWhiteSpace(charCode) || u_hasBinaryProperty(charCode, UCHAR_DEFAULT_IGNORABLE_CODE_POINT))
+        return YES;
+    
+    switch (charCode) {
+        case 0x00BC: /* VULGAR FRACTION ONE QUARTER */
+        case 0x00BD: /* VULGAR FRACTION ONE HALF */
+        case 0x00BE: /* VULGAR FRACTION THREE QUARTERS */
+        case 0x00ED: /* LATIN SMALL LETTER I WITH ACUTE */
+        case 0x01C3: /* LATIN LETTER RETROFLEX CLICK */
+        case 0x0251: /* LATIN SMALL LETTER ALPHA */
+        case 0x0261: /* LATIN SMALL LETTER SCRIPT G */
+        case 0x02D0: /* MODIFIER LETTER TRIANGULAR COLON */
+        case 0x0335: /* COMBINING SHORT STROKE OVERLAY */
+        case 0x0337: /* COMBINING SHORT SOLIDUS OVERLAY */
+        case 0x0338: /* COMBINING LONG SOLIDUS OVERLAY */
+        case 0x0589: /* ARMENIAN FULL STOP */
+        case 0x05B4: /* HEBREW POINT HIRIQ */
+        case 0x05BC: /* HEBREW POINT DAGESH OR MAPIQ */
+        case 0x05C3: /* HEBREW PUNCTUATION SOF PASUQ */
+        case 0x05F4: /* HEBREW PUNCTUATION GERSHAYIM */
+        case 0x0609: /* ARABIC-INDIC PER MILLE SIGN */
+        case 0x060A: /* ARABIC-INDIC PER TEN THOUSAND SIGN */
+        case 0x0650: /* ARABIC KASRA */
+        case 0x0660: /* ARABIC INDIC DIGIT ZERO */
+        case 0x066A: /* ARABIC PERCENT SIGN */
+        case 0x06D4: /* ARABIC FULL STOP */
+        case 0x06F0: /* EXTENDED ARABIC INDIC DIGIT ZERO */
+        case 0x0701: /* SYRIAC SUPRALINEAR FULL STOP */
+        case 0x0702: /* SYRIAC SUBLINEAR FULL STOP */
+        case 0x0703: /* SYRIAC SUPRALINEAR COLON */
+        case 0x0704: /* SYRIAC SUBLINEAR COLON */
+        case 0x1735: /* PHILIPPINE SINGLE PUNCTUATION */
+        case 0x1D04: /* LATIN LETTER SMALL CAPITAL C */
+        case 0x1D0F: /* LATIN LETTER SMALL CAPITAL O */
+        case 0x1D1C: /* LATIN LETTER SMALL CAPITAL U */
+        case 0x1D20: /* LATIN LETTER SMALL CAPITAL V */
+        case 0x1D21: /* LATIN LETTER SMALL CAPITAL W */
+        case 0x1D22: /* LATIN LETTER SMALL CAPITAL Z */
+        case 0x1ECD: /* LATIN SMALL LETTER O WITH DOT BELOW */
+        case 0x2010: /* HYPHEN */
+        case 0x2011: /* NON-BREAKING HYPHEN */
+        case 0x2024: /* ONE DOT LEADER */
+        case 0x2027: /* HYPHENATION POINT */
+        case 0x2039: /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */
+        case 0x203A: /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */
+        case 0x2041: /* CARET INSERTION POINT */
+        case 0x2044: /* FRACTION SLASH */
+        case 0x2052: /* COMMERCIAL MINUS SIGN */
+        case 0x2153: /* VULGAR FRACTION ONE THIRD */
+        case 0x2154: /* VULGAR FRACTION TWO THIRDS */
+        case 0x2155: /* VULGAR FRACTION ONE FIFTH */
+        case 0x2156: /* VULGAR FRACTION TWO FIFTHS */
+        case 0x2157: /* VULGAR FRACTION THREE FIFTHS */
+        case 0x2158: /* VULGAR FRACTION FOUR FIFTHS */
+        case 0x2159: /* VULGAR FRACTION ONE SIXTH */
+        case 0x215A: /* VULGAR FRACTION FIVE SIXTHS */
+        case 0x215B: /* VULGAR FRACTION ONE EIGHT */
+        case 0x215C: /* VULGAR FRACTION THREE EIGHTHS */
+        case 0x215D: /* VULGAR FRACTION FIVE EIGHTHS */
+        case 0x215E: /* VULGAR FRACTION SEVEN EIGHTHS */
+        case 0x215F: /* FRACTION NUMERATOR ONE */
+        case 0x2212: /* MINUS SIGN */
+        case 0x2215: /* DIVISION SLASH */
+        case 0x2216: /* SET MINUS */
+        case 0x2236: /* RATIO */
+        case 0x233F: /* APL FUNCTIONAL SYMBOL SLASH BAR */
+        case 0x23AE: /* INTEGRAL EXTENSION */
+        case 0x244A: /* OCR DOUBLE BACKSLASH */
+        case 0x2571: /* DisplayType::Box DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT */
+        case 0x2572: /* DisplayType::Box DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT */
+        case 0x29F6: /* SOLIDUS WITH OVERBAR */
+        case 0x29F8: /* BIG SOLIDUS */
+        case 0x2AFB: /* TRIPLE SOLIDUS BINARY RELATION */
+        case 0x2AFD: /* DOUBLE SOLIDUS OPERATOR */
+        case 0x2FF0: /* IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT */
+        case 0x2FF1: /* IDEOGRAPHIC DESCRIPTION CHARACTER ABOVE TO BELOW */
+        case 0x2FF2: /* IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO MIDDLE AND RIGHT */
+        case 0x2FF3: /* IDEOGRAPHIC DESCRIPTION CHARACTER ABOVE TO MIDDLE AND BELOW */
+        case 0x2FF4: /* IDEOGRAPHIC DESCRIPTION CHARACTER FULL SURROUND */
+        case 0x2FF5: /* IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM ABOVE */
+        case 0x2FF6: /* IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM BELOW */
+        case 0x2FF7: /* IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM LEFT */
+        case 0x2FF8: /* IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM UPPER LEFT */
+        case 0x2FF9: /* IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM UPPER RIGHT */
+        case 0x2FFA: /* IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM LOWER LEFT */
+        case 0x2FFB: /* IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID */
+        case 0x3002: /* IDEOGRAPHIC FULL STOP */
+        case 0x3008: /* LEFT ANGLE BRACKET */
+        case 0x3014: /* LEFT TORTOISE SHELL BRACKET */
+        case 0x3015: /* RIGHT TORTOISE SHELL BRACKET */
+        case 0x3033: /* VERTICAL KANA REPEAT MARK UPPER HALF */
+        case 0x3035: /* VERTICAL KANA REPEAT MARK LOWER HALF */
+        case 0x321D: /* PARENTHESIZED KOREAN CHARACTER OJEON */
+        case 0x321E: /* PARENTHESIZED KOREAN CHARACTER O HU */
+        case 0x33AE: /* SQUARE RAD OVER S */
+        case 0x33AF: /* SQUARE RAD OVER S SQUARED */
+        case 0x33C6: /* SQUARE C OVER KG */
+        case 0x33DF: /* SQUARE A OVER M */
+        case 0x05B9: /* HEBREW POINT HOLAM */
+        case 0x05BA: /* HEBREW POINT HOLAM HASER FOR VAV */
+        case 0x05C1: /* HEBREW POINT SHIN DOT */
+        case 0x05C2: /* HEBREW POINT SIN DOT */
+        case 0x05C4: /* HEBREW MARK UPPER DOT */
+        case 0xA731: /* LATIN LETTER SMALL CAPITAL S */
+        case 0xA771: /* LATIN SMALL LETTER DUM */
+        case 0xA789: /* MODIFIER LETTER COLON */
+        case 0xFE14: /* PRESENTATION FORM FOR VERTICAL SEMICOLON */
+        case 0xFE15: /* PRESENTATION FORM FOR VERTICAL EXCLAMATION MARK */
+        case 0xFE3F: /* PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET */
+        case 0xFE5D: /* SMALL LEFT TORTOISE SHELL BRACKET */
+        case 0xFE5E: /* SMALL RIGHT TORTOISE SHELL BRACKET */
+        case 0xFF0E: /* FULLWIDTH FULL STOP */
+        case 0xFF0F: /* FULL WIDTH SOLIDUS */
+        case 0xFF61: /* HALFWIDTH IDEOGRAPHIC FULL STOP */
+        case 0xFFFC: /* OBJECT REPLACEMENT CHARACTER */
+        case 0xFFFD: /* REPLACEMENT CHARACTER */
+        case 0x1F50F: /* LOCK WITH INK PEN */
+        case 0x1F510: /* CLOSED LOCK WITH KEY */
+        case 0x1F511: /* KEY */
+        case 0x1F512: /* LOCK */
+        case 0x1F513: /* OPEN LOCK */
+            return YES;
+        case 0x0307: /* COMBINING DOT ABOVE */
+            return previousCodePoint == 0x0237 /* LATIN SMALL LETTER DOTLESS J */
+                || previousCodePoint == 0x0131 /* LATIN SMALL LETTER DOTLESS I */
+                || previousCodePoint == 0x05D5; /* HEBREW LETTER VAV */
+        case 0x0548: /* ARMENIAN CAPITAL LETTER VO */
+        case 0x054D: /* ARMENIAN CAPITAL LETTER SEH */
+        case 0x0578: /* ARMENIAN SMALL LETTER VO */
+        case 0x057D: /* ARMENIAN SMALL LETTER SEH */
+            return previousCodePoint
+                && !isASCIIDigitOrValidHostCharacter(previousCodePoint.value())
+                && !isArmenianScriptCharacter(previousCodePoint.value());
+        case '.':
+            return NO;
+        default:
+            return previousCodePoint
+                && isArmenianLookalikeCharacter(previousCodePoint.value())
+                && !(isArmenianScriptCharacter(charCode) || isASCIIDigitOrValidHostCharacter(charCode));
+    }
+}
+
+static void whiteListIDNScript(const char* scriptName)
+{
+    int32_t script = u_getPropertyValueEnum(UCHAR_SCRIPT, scriptName);
+    if (script >= 0 && script < USCRIPT_CODE_LIMIT) {
+        size_t index = script / 32;
+        uint32_t mask = 1 << (script % 32);
+        IDNScriptWhiteList[index] |= mask;
+    }
+}
+
+static BOOL readIDNScriptWhiteListFile(NSString *filename)
+{
+    if (!filename)
+        return NO;
+
+    FILE *file = fopen([filename fileSystemRepresentation], "r");
+    if (!file)
+        return NO;
+    
+    // Read a word at a time.
+    // Allow comments, starting with # character to the end of the line.
+    while (1) {
+        // Skip a comment if present.
+        if (fscanf(file, " #%*[^\n\r]%*[\n\r]") == EOF)
+            break;
+        
+        // Read a script name if present.
+        char word[33];
+        int result = fscanf(file, " %32[^# \t\n\r]%*[^# \t\n\r] ", word);
+        if (result == EOF)
+            break;
+        
+        if (result == 1) {
+            // Got a word, map to script code and put it into the array.
+            whiteListIDNScript(word);
+        }
+    }
+    fclose(file);
+    return YES;
+}
+
+static BOOL allCharactersInIDNScriptWhiteList(const UChar *buffer, int32_t length)
+{
+    static dispatch_once_t flag;
+    dispatch_once(&flag, ^{
+        // Read white list from library.
+        NSArray *dirs = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSAllDomainsMask, YES);
+        int numDirs = [dirs count];
+        for (int i = 0; i < numDirs; i++) {
+            if (readIDNScriptWhiteListFile([[dirs objectAtIndex:i] stringByAppendingPathComponent:@"IDNScriptWhiteList.txt"]))
+                return;
+        }
+        const char* defaultIDNScriptWhiteList[20] = {
+            "Common",
+            "Inherited",
+            "Arabic",
+            "Armenian",
+            "Bopomofo",
+            "Canadian_Aboriginal",
+            "Devanagari",
+            "Deseret",
+            "Gujarati",
+            "Gurmukhi",
+            "Hangul",
+            "Han",
+            "Hebrew",
+            "Hiragana",
+            "Katakana_Or_Hiragana",
+            "Katakana",
+            "Latin",
+            "Tamil",
+            "Thai",
+            "Yi",
+        };
+        for (const char* scriptName : defaultIDNScriptWhiteList)
+            whiteListIDNScript(scriptName);
+    });
+    
+    int32_t i = 0;
+    std::optional<UChar32> previousCodePoint;
+    while (i < length) {
+        UChar32 c;
+        U16_NEXT(buffer, i, length, c)
+        UErrorCode error = U_ZERO_ERROR;
+        UScriptCode script = uscript_getScript(c, &error);
+        if (error != U_ZERO_ERROR) {
+            LOG_ERROR("got ICU error while trying to look at scripts: %d", error);
+            return NO;
+        }
+        if (script < 0) {
+            LOG_ERROR("got negative number for script code from ICU: %d", script);
+            return NO;
+        }
+        if (script >= USCRIPT_CODE_LIMIT)
+            return NO;
+
+        size_t index = script / 32;
+        uint32_t mask = 1 << (script % 32);
+        if (!(IDNScriptWhiteList[index] & mask))
+            return NO;
+        
+        if (isLookalikeCharacter(previousCodePoint, c))
+            return NO;
+        previousCodePoint = c;
+    }
+    return YES;
+}
+
+static bool isSecondLevelDomainNameAllowedByTLDRules(const UChar* buffer, int32_t length, const WTF::Function<bool(UChar)>& characterIsAllowed)
+{
+    ASSERT(length > 0);
+
+    for (int32_t i = length - 1; i >= 0; --i) {
+        UChar ch = buffer[i];
+        
+        if (characterIsAllowed(ch))
+            continue;
+        
+        // Only check the second level domain. Lower level registrars may have different rules.
+        if (ch == '.')
+            break;
+        
+        return false;
+    }
+    return true;
+}
+
+#define CHECK_RULES_IF_SUFFIX_MATCHES(suffix, function) \
+    { \
+        static const int32_t suffixLength = sizeof(suffix) / sizeof(suffix[0]); \
+        if (length > suffixLength && 0 == memcmp(buffer + length - suffixLength, suffix, sizeof(suffix))) \
+            return isSecondLevelDomainNameAllowedByTLDRules(buffer, length - suffixLength, function); \
+    }
+
+static bool isRussianDomainNameCharacter(UChar ch)
+{
+    // Only modern Russian letters, digits and dashes are allowed.
+    return (ch >= 0x0430 && ch <= 0x044f) || ch == 0x0451 || isASCIIDigit(ch) || ch == '-';
+}
+
+static BOOL allCharactersAllowedByTLDRules(const UChar* buffer, int32_t length)
+{
+    // Skip trailing dot for root domain.
+    if (buffer[length - 1] == '.')
+        length--;
+
+    // http://cctld.ru/files/pdf/docs/rules_ru-rf.pdf
+    static const UChar cyrillicRF[] = {
+        '.',
+        0x0440, // CYRILLIC SMALL LETTER ER
+        0x0444  // CYRILLIC SMALL LETTER EF
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicRF, isRussianDomainNameCharacter);
+
+    // http://rusnames.ru/rules.pl
+    static const UChar cyrillicRUS[] = {
+        '.',
+        0x0440, // CYRILLIC SMALL LETTER ER
+        0x0443, // CYRILLIC SMALL LETTER U
+        0x0441  // CYRILLIC SMALL LETTER ES
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicRUS, isRussianDomainNameCharacter);
+
+    // http://ru.faitid.org/projects/moscow/documents/moskva/idn
+    static const UChar cyrillicMOSKVA[] = {
+        '.',
+        0x043C, // CYRILLIC SMALL LETTER EM
+        0x043E, // CYRILLIC SMALL LETTER O
+        0x0441, // CYRILLIC SMALL LETTER ES
+        0x043A, // CYRILLIC SMALL LETTER KA
+        0x0432, // CYRILLIC SMALL LETTER VE
+        0x0430  // CYRILLIC SMALL LETTER A
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicMOSKVA, isRussianDomainNameCharacter);
+
+    // http://www.dotdeti.ru/foruser/docs/regrules.php
+    static const UChar cyrillicDETI[] = {
+        '.',
+        0x0434, // CYRILLIC SMALL LETTER DE
+        0x0435, // CYRILLIC SMALL LETTER IE
+        0x0442, // CYRILLIC SMALL LETTER TE
+        0x0438  // CYRILLIC SMALL LETTER I
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicDETI, isRussianDomainNameCharacter);
+
+    // http://corenic.org - rules not published. The word is Russian, so only allowing Russian at this time,
+    // although we may need to revise the checks if this ends up being used with other languages spoken in Russia.
+    static const UChar cyrillicONLAYN[] = {
+        '.',
+        0x043E, // CYRILLIC SMALL LETTER O
+        0x043D, // CYRILLIC SMALL LETTER EN
+        0x043B, // CYRILLIC SMALL LETTER EL
+        0x0430, // CYRILLIC SMALL LETTER A
+        0x0439, // CYRILLIC SMALL LETTER SHORT I
+        0x043D  // CYRILLIC SMALL LETTER EN
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicONLAYN, isRussianDomainNameCharacter);
+
+    // http://corenic.org - same as above.
+    static const UChar cyrillicSAYT[] = {
+        '.',
+        0x0441, // CYRILLIC SMALL LETTER ES
+        0x0430, // CYRILLIC SMALL LETTER A
+        0x0439, // CYRILLIC SMALL LETTER SHORT I
+        0x0442  // CYRILLIC SMALL LETTER TE
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicSAYT, isRussianDomainNameCharacter);
+
+    // http://pir.org/products/opr-domain/ - rules not published. According to the registry site,
+    // the intended audience is "Russian and other Slavic-speaking markets".
+    // Chrome appears to only allow Russian, so sticking with that for now.
+    static const UChar cyrillicORG[] = {
+        '.',
+        0x043E, // CYRILLIC SMALL LETTER O
+        0x0440, // CYRILLIC SMALL LETTER ER
+        0x0433  // CYRILLIC SMALL LETTER GHE
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicORG, isRussianDomainNameCharacter);
+
+    // http://cctld.by/rules.html
+    static const UChar cyrillicBEL[] = {
+        '.',
+        0x0431, // CYRILLIC SMALL LETTER BE
+        0x0435, // CYRILLIC SMALL LETTER IE
+        0x043B  // CYRILLIC SMALL LETTER EL
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicBEL, [](UChar ch) {
+        // Russian and Byelorussian letters, digits and dashes are allowed.
+        return (ch >= 0x0430 && ch <= 0x044f) || ch == 0x0451 || ch == 0x0456 || ch == 0x045E || ch == 0x2019 || isASCIIDigit(ch) || ch == '-';
+    });
+
+    // http://www.nic.kz/docs/poryadok_vnedreniya_kaz_ru.pdf
+    static const UChar cyrillicKAZ[] = {
+        '.',
+        0x049B, // CYRILLIC SMALL LETTER KA WITH DESCENDER
+        0x0430, // CYRILLIC SMALL LETTER A
+        0x0437  // CYRILLIC SMALL LETTER ZE
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicKAZ, [](UChar ch) {
+        // Kazakh letters, digits and dashes are allowed.
+        return (ch >= 0x0430 && ch <= 0x044f) || ch == 0x0451 || ch == 0x04D9 || ch == 0x0493 || ch == 0x049B || ch == 0x04A3 || ch == 0x04E9 || ch == 0x04B1 || ch == 0x04AF || ch == 0x04BB || ch == 0x0456 || isASCIIDigit(ch) || ch == '-';
+    });
+
+    // http://uanic.net/docs/documents-ukr/Rules%20of%20UKR_v4.0.pdf
+    static const UChar cyrillicUKR[] = {
+        '.',
+        0x0443, // CYRILLIC SMALL LETTER U
+        0x043A, // CYRILLIC SMALL LETTER KA
+        0x0440  // CYRILLIC SMALL LETTER ER
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicUKR, [](UChar ch) {
+        // Russian and Ukrainian letters, digits and dashes are allowed.
+        return (ch >= 0x0430 && ch <= 0x044f) || ch == 0x0451 || ch == 0x0491 || ch == 0x0404 || ch == 0x0456 || ch == 0x0457 || isASCIIDigit(ch) || ch == '-';
+    });
+
+    // http://www.rnids.rs/data/DOKUMENTI/idn-srb-policy-termsofuse-v1.4-eng.pdf
+    static const UChar cyrillicSRB[] = {
+        '.',
+        0x0441, // CYRILLIC SMALL LETTER ES
+        0x0440, // CYRILLIC SMALL LETTER ER
+        0x0431  // CYRILLIC SMALL LETTER BE
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicSRB, [](UChar ch) {
+        // Serbian letters, digits and dashes are allowed.
+        return (ch >= 0x0430 && ch <= 0x0438) || (ch >= 0x043A && ch <= 0x0448) || ch == 0x0452 || ch == 0x0458 || ch == 0x0459 || ch == 0x045A || ch == 0x045B || ch == 0x045F || isASCIIDigit(ch) || ch == '-';
+    });
+
+    // http://marnet.mk/doc/pravilnik-mk-mkd.pdf
+    static const UChar cyrillicMKD[] = {
+        '.',
+        0x043C, // CYRILLIC SMALL LETTER EM
+        0x043A, // CYRILLIC SMALL LETTER KA
+        0x0434  // CYRILLIC SMALL LETTER DE
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicMKD, [](UChar ch) {
+        // Macedonian letters, digits and dashes are allowed.
+        return (ch >= 0x0430 && ch <= 0x0438) || (ch >= 0x043A && ch <= 0x0448) || ch == 0x0453 || ch == 0x0455 || ch == 0x0458 || ch == 0x0459 || ch == 0x045A || ch == 0x045C || ch == 0x045F || isASCIIDigit(ch) || ch == '-';
+    });
+
+    // https://www.mon.mn/cs/
+    static const UChar cyrillicMON[] = {
+        '.',
+        0x043C, // CYRILLIC SMALL LETTER EM
+        0x043E, // CYRILLIC SMALL LETTER O
+        0x043D  // CYRILLIC SMALL LETTER EN
+    };
+    CHECK_RULES_IF_SUFFIX_MATCHES(cyrillicMON, [](UChar ch) {
+        // Mongolian letters, digits and dashes are allowed.
+        return (ch >= 0x0430 && ch <= 0x044f) || ch == 0x0451 || ch == 0x04E9 || ch == 0x04AF || isASCIIDigit(ch) || ch == '-';
+    });
+
+    // Not a known top level domain with special rules.
+    return NO;
+}
+
+// Return value of nil means no mapping is necessary.
+// If makeString is NO, then return value is either nil or self to indicate mapping is necessary.
+// If makeString is YES, then return value is either nil or the mapped string.
+static NSString *mapHostNameWithRange(NSString *string, NSRange range, BOOL encode, BOOL makeString, BOOL *error)
+{
+    if (range.length > HOST_NAME_BUFFER_LENGTH)
+        return nil;
+    
+    if (![string length])
+        return nil;
+    
+    UChar sourceBuffer[HOST_NAME_BUFFER_LENGTH];
+    UChar destinationBuffer[HOST_NAME_BUFFER_LENGTH];
+    
+    if (encode && [string rangeOfString:@"%" options:NSLiteralSearch range:range].location != NSNotFound) {
+        NSString *substring = [string substringWithRange:range];
+        substring = CFBridgingRelease(CFURLCreateStringByReplacingPercentEscapes(nullptr, (CFStringRef)substring, CFSTR("")));
+        if (substring) {
+            string = substring;
+            range = NSMakeRange(0, [string length]);
+        }
+    }
+    
+    int length = range.length;
+    [string getCharacters:sourceBuffer range:range];
+    
+    UErrorCode uerror = U_ZERO_ERROR;
+    UIDNAInfo processingDetails = UIDNA_INFO_INITIALIZER;
+    int32_t numCharactersConverted = (encode ? uidna_nameToASCII : uidna_nameToUnicode)(&URLParser::internationalDomainNameTranscoder(), sourceBuffer, length, destinationBuffer, HOST_NAME_BUFFER_LENGTH, &processingDetails, &uerror);
+    if (length && (U_FAILURE(uerror) || processingDetails.errors)) {
+        *error = YES;
+        return nil;
+    }
+    
+    if (numCharactersConverted == length && !memcmp(sourceBuffer, destinationBuffer, length * sizeof(UChar)))
+        return nil;
+    
+    if (!encode && !allCharactersInIDNScriptWhiteList(destinationBuffer, numCharactersConverted) && !allCharactersAllowedByTLDRules(destinationBuffer, numCharactersConverted))
+        return nil;
+    
+    return makeString ? [NSString stringWithCharacters:destinationBuffer length:numCharactersConverted] : string;
+}
+
+static BOOL hostNameNeedsDecodingWithRange(NSString *string, NSRange range, BOOL *error)
+{
+    return mapHostNameWithRange(string, range, NO, NO, error) != nil;
+}
+static BOOL hostNameNeedsEncodingWithRange(NSString *string, NSRange range, BOOL *error)
+{
+    return mapHostNameWithRange(string, range, YES,  NO, error) != nil;
+}
+
+static NSString *decodeHostNameWithRange(NSString *string, NSRange range)
+{
+    BOOL error = NO;
+    NSString *host = mapHostNameWithRange(string, range, NO, YES, &error);
+    if (error)
+        return nil;
+    return !host ? string : host;
+}
+
+static NSString *encodeHostNameWithRange(NSString *string, NSRange range)
+{
+    BOOL error = NO;
+    NSString *host = mapHostNameWithRange(string, range, YES, YES, &error);
+    if (error)
+        return nil;
+    return !host ? string : host;
+}
+
+NSString *decodeHostName(NSString *string)
+{
+    BOOL error = NO;
+    NSString *host = mapHostNameWithRange(string, NSMakeRange(0, [string length]), NO, YES, &error);
+    if (error)
+        return nil;
+    return !host ? string : host;
+}
+
+NSString *encodeHostName(NSString *string)
+{
+    BOOL error = NO;
+    NSString *host = mapHostNameWithRange(string, NSMakeRange(0, [string length]), YES, YES, &error);
+    if (error)
+        return nil;
+    return !host ? string : host;
+}
+
+static void collectRangesThatNeedMapping(NSString *string, NSRange range, RetainPtr<NSMutableArray>& array, BOOL encode)
+{
+    // Generally, we want to optimize for the case where there is one host name that does not need mapping.
+    // Therefore, we use nil to indicate no mapping here and an empty array to indicate error.
+
+    BOOL error = NO;
+    BOOL needsMapping = encode ? hostNameNeedsEncodingWithRange(string, range, &error) : hostNameNeedsDecodingWithRange(string, range, &error);
+    if (!error && !needsMapping)
+        return;
+    
+    if (!array)
+        array = adoptNS([NSMutableArray new]);
+
+    if (!error)
+        [array addObject:[NSValue valueWithRange:range]];
+}
+
+static void collectRangesThatNeedEncoding(NSString *string, NSRange range, RetainPtr<NSMutableArray>& array)
+{
+    return collectRangesThatNeedMapping(string, range, array, YES);
+}
+
+static void collectRangesThatNeedDecoding(NSString *string, NSRange range, RetainPtr<NSMutableArray>& array)
+{
+    return collectRangesThatNeedMapping(string, range, array, NO);
+}
+
+static void applyHostNameFunctionToMailToURLString(NSString *string, StringRangeApplierFunction f, RetainPtr<NSMutableArray>& array)
+{
+    // In a mailto: URL, host names come after a '@' character and end with a '>' or ',' or '?' character.
+    // Skip quoted strings so that characters in them don't confuse us.
+    // When we find a '?' character, we are past the part of the URL that contains host names.
+    
+    static NeverDestroyed<RetainPtr<NSCharacterSet>> hostNameOrStringStartCharacters = [NSCharacterSet characterSetWithCharactersInString:@"\"@?"];
+    static NeverDestroyed<RetainPtr<NSCharacterSet>> hostNameEndCharacters = [NSCharacterSet characterSetWithCharactersInString:@">,?"];
+    static NeverDestroyed<RetainPtr<NSCharacterSet>> quotedStringCharacters = [NSCharacterSet characterSetWithCharactersInString:@"\"\\"];
+    
+    unsigned stringLength = [string length];
+    NSRange remaining = NSMakeRange(0, stringLength);
+    
+    while (1) {
+        // Find start of host name or of quoted string.
+        NSRange hostNameOrStringStart = [string rangeOfCharacterFromSet:hostNameOrStringStartCharacters.get().get() options:0 range:remaining];
+        if (hostNameOrStringStart.location == NSNotFound)
+            return;
+
+        unichar c = [string characterAtIndex:hostNameOrStringStart.location];
+        remaining.location = NSMaxRange(hostNameOrStringStart);
+        remaining.length = stringLength - remaining.location;
+        
+        if (c == '?')
+            return;
+        
+        if (c == '@') {
+            // Find end of host name.
+            unsigned hostNameStart = remaining.location;
+            NSRange hostNameEnd = [string rangeOfCharacterFromSet:hostNameEndCharacters.get().get() options:0 range:remaining];
+            BOOL done;
+            if (hostNameEnd.location == NSNotFound) {
+                hostNameEnd.location = stringLength;
+                done = YES;
+            } else {
+                remaining.location = hostNameEnd.location;
+                remaining.length = stringLength - remaining.location;
+                done = NO;
+            }
+            
+            // Process host name range.
+            f(string, NSMakeRange(hostNameStart, hostNameEnd.location - hostNameStart), array);
+            
+            if (done)
+                return;
+        } else {
+            // Skip quoted string.
+            ASSERT(c == '"');
+            while (1) {
+                NSRange escapedCharacterOrStringEnd = [string rangeOfCharacterFromSet:quotedStringCharacters.get().get() options:0 range:remaining];
+                if (escapedCharacterOrStringEnd.location == NSNotFound)
+                    return;
+
+                c = [string characterAtIndex:escapedCharacterOrStringEnd.location];
+                remaining.location = NSMaxRange(escapedCharacterOrStringEnd);
+                remaining.length = stringLength - remaining.location;
+                
+                // If we are the end of the string, then break from the string loop back to the host name loop.
+                if (c == '"')
+                    break;
+                
+                // Skip escaped character.
+                ASSERT(c == '\\');
+                if (!remaining.length)
+                    return;
+
+                remaining.location += 1;
+                remaining.length -= 1;
+            }
+        }
+    }
+}
+
+static void applyHostNameFunctionToURLString(NSString *string, StringRangeApplierFunction f, RetainPtr<NSMutableArray>& array)
+{
+    // Find hostnames. Too bad we can't use any real URL-parsing code to do this,
+    // but we have to do it before doing all the %-escaping, and this is the only
+    // code we have that parses mailto URLs anyway.
+    
+    // Maybe we should implement this using a character buffer instead?
+    
+    if (protocolIs(string, "mailto")) {
+        applyHostNameFunctionToMailToURLString(string, f, array);
+        return;
+    }
+    
+    // Find the host name in a hierarchical URL.
+    // It comes after a "://" sequence, with scheme characters preceding.
+    // If ends with the end of the string or a ":", "/", or a "?".
+    // If there is a "@" character, the host part is just the part after the "@".
+    NSRange separatorRange = [string rangeOfString:@"://"];
+    if (separatorRange.location == NSNotFound)
+        return;
+    
+    // Check that all characters before the :// are valid scheme characters.
+    static NeverDestroyed<RetainPtr<NSCharacterSet>> nonSchemeCharacters = [[NSCharacterSet characterSetWithCharactersInString:@"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-."] invertedSet];
+    if ([string rangeOfCharacterFromSet:nonSchemeCharacters.get().get() options:0 range:NSMakeRange(0, separatorRange.location)].location != NSNotFound)
+        return;
+    
+    unsigned stringLength = [string length];
+    
+    static NeverDestroyed<RetainPtr<NSCharacterSet>> hostTerminators = [NSCharacterSet characterSetWithCharactersInString:@":/?#"];
+    
+    // Start after the separator.
+    unsigned authorityStart = NSMaxRange(separatorRange);
+    
+    // Find terminating character.
+    NSRange hostNameTerminator = [string rangeOfCharacterFromSet:hostTerminators.get().get() options:0 range:NSMakeRange(authorityStart, stringLength - authorityStart)];
+    unsigned hostNameEnd = hostNameTerminator.location == NSNotFound ? stringLength : hostNameTerminator.location;
+    
+    // Find "@" for the start of the host name.
+    NSRange userInfoTerminator = [string rangeOfString:@"@" options:0 range:NSMakeRange(authorityStart, hostNameEnd - authorityStart)];
+    unsigned hostNameStart = userInfoTerminator.location == NSNotFound ? authorityStart : NSMaxRange(userInfoTerminator);
+    
+    return f(string, NSMakeRange(hostNameStart, hostNameEnd - hostNameStart), array);
+}
+
+static RetainPtr<NSString> mapHostNames(NSString *string, BOOL encode)
+{
+    // Generally, we want to optimize for the case where there is one host name that does not need mapping.
+    
+    if (encode && [string canBeConvertedToEncoding:NSASCIIStringEncoding])
+        return string;
+    
+    // Make a list of ranges that actually need mapping.
+    RetainPtr<NSMutableArray> hostNameRanges;
+    StringRangeApplierFunction f = encode ? collectRangesThatNeedEncoding : collectRangesThatNeedDecoding;
+    applyHostNameFunctionToURLString(string, f, hostNameRanges);
+    if (!hostNameRanges)
+        return string;
+
+    if (![hostNameRanges count])
+        return nil;
+    
+    // Do the mapping.
+    auto mutableCopy = adoptNS([string mutableCopy]);
+    unsigned i = [hostNameRanges count];
+    while (i--) {
+        NSRange hostNameRange = [[hostNameRanges objectAtIndex:i] rangeValue];
+        NSString *mappedHostName = encode ? encodeHostNameWithRange(string, hostNameRange) : decodeHostNameWithRange(string, hostNameRange);
+        [mutableCopy replaceCharactersInRange:hostNameRange withString:mappedHostName];
+    }
+    return mutableCopy;
+}
+
+static RetainPtr<NSString> stringByTrimmingWhitespace(NSString *string)
+{
+    auto trimmed = adoptNS([string mutableCopy]);
+    CFStringTrimWhitespace((__bridge CFMutableStringRef)trimmed.get());
+    return trimmed;
+}
+
+NSURL *URLByTruncatingOneCharacterBeforeComponent(NSURL *URL, CFURLComponentType component)
+{
+    if (!URL)
+        return nil;
+    
+    CFRange fragRg = CFURLGetByteRangeForComponent((__bridge CFURLRef)URL, component, nullptr);
+    if (fragRg.location == kCFNotFound)
+        return URL;
+
+    Vector<UInt8, URL_BYTES_BUFFER_LENGTH> urlBytes(URL_BYTES_BUFFER_LENGTH);
+    CFIndex numBytes = CFURLGetBytes((__bridge CFURLRef)URL, urlBytes.data(), urlBytes.size());
+    if (numBytes == -1) {
+        numBytes = CFURLGetBytes((__bridge CFURLRef)URL, nullptr, 0);
+        urlBytes.grow(numBytes);
+        CFURLGetBytes((__bridge CFURLRef)URL, urlBytes.data(), numBytes);
+    }
+
+    CFURLRef result = CFURLCreateWithBytes(nullptr, urlBytes.data(), fragRg.location - 1, kCFStringEncodingUTF8, nullptr);
+    if (!result)
+        result = CFURLCreateWithBytes(nullptr, urlBytes.data(), fragRg.location - 1, kCFStringEncodingISOLatin1, nullptr);
+        
+    return result ? CFBridgingRelease(result) : URL;
+}
+
+static NSURL *URLByRemovingResourceSpecifier(NSURL *URL)
+{
+    return URLByTruncatingOneCharacterBeforeComponent(URL, kCFURLComponentResourceSpecifier);
+}
+
+NSURL *URLWithData(NSData *data, NSURL *baseURL)
+{
+    if (!data)
+        return nil;
+    
+    NSURL *result = nil;
+    size_t length = [data length];
+    if (length > 0) {
+        // work around <rdar://4470771>: CFURLCreateAbsoluteURLWithBytes(.., TRUE) doesn't remove non-path components.
+        baseURL = URLByRemovingResourceSpecifier(baseURL);
+        
+        const UInt8 *bytes = static_cast<const UInt8*>([data bytes]);
+        
+        // CFURLCreateAbsoluteURLWithBytes would complain to console if we passed a path to it.
+        if (bytes[0] == '/' && !baseURL)
+            return nil;
+        
+        // NOTE: We use UTF-8 here since this encoding is used when computing strings when returning URL components
+        // (e.g calls to NSURL -path). However, this function is not tolerant of illegal UTF-8 sequences, which
+        // could either be a malformed string or bytes in a different encoding, like shift-jis, so we fall back
+        // onto using ISO Latin 1 in those cases.
+        result = CFBridgingRelease(CFURLCreateAbsoluteURLWithBytes(nullptr, bytes, length, kCFStringEncodingUTF8, (__bridge CFURLRef)baseURL, YES));
+        if (!result)
+            result = CFBridgingRelease(CFURLCreateAbsoluteURLWithBytes(nullptr, bytes, length, kCFStringEncodingISOLatin1, (__bridge CFURLRef)baseURL, YES));
+    } else
+        result = [NSURL URLWithString:@""];
+
+    return result;
+}
+static NSData *dataWithUserTypedString(NSString *string)
+{
+    NSData *userTypedData = [string dataUsingEncoding:NSUTF8StringEncoding];
+    ASSERT(userTypedData);
+    
+    const UInt8* inBytes = static_cast<const UInt8 *>([userTypedData bytes]);
+    int inLength = [userTypedData length];
+    if (!inLength)
+        return nil;
+    
+    char* outBytes = static_cast<char *>(malloc(inLength * 3)); // large enough to %-escape every character
+    char* p = outBytes;
+    int outLength = 0;
+    for (int i = 0; i < inLength; i++) {
+        UInt8 c = inBytes[i];
+        if (c <= 0x20 || c >= 0x7f) {
+            *p++ = '%';
+            *p++ = upperNibbleToASCIIHexDigit(c);
+            *p++ = lowerNibbleToASCIIHexDigit(c);
+            outLength += 3;
+        } else {
+            *p++ = c;
+            outLength++;
+        }
+    }
+    
+    return [NSData dataWithBytesNoCopy:outBytes length:outLength]; // adopts outBytes
+}
+
+NSURL *URLWithUserTypedString(NSString *string, NSURL *nsURL)
+{
+    if (!string)
+        return nil;
+
+    auto mappedString = mapHostNames(stringByTrimmingWhitespace(string).get(), YES);
+    if (!mappedString)
+        return nil;
+
+    // Let's check whether the URL is bogus.
+    URL url { URL { nsURL }, mappedString.get() };
+    if (!url.createCFURL())
+        return nil;
+
+    // FIXME: https://bugs.webkit.org/show_bug.cgi?id=186057
+    // We should be able to use url.createCFURL instead of using directly CFURL parsing routines.
+    NSData *data = dataWithUserTypedString(mappedString.get());
+    if (!data)
+        return [NSURL URLWithString:@""];
+
+    return URLWithData(data, nsURL);
+}
+
+NSURL *URLWithUserTypedStringDeprecated(NSString *string, NSURL *URL)
+{
+    if (!string)
+        return nil;
+
+    NSURL *result = URLWithUserTypedString(string, URL);
+    if (!result) {
+        NSData *resultData = dataWithUserTypedString(string);
+        if (!resultData)
+            return [NSURL URLWithString:@""];
+        result = URLWithData(resultData, URL);
+    }
+
+    return result;
+}
+
+static BOOL hasQuestionMarkOnlyQueryString(NSURL *URL)
+{
+    CFRange rangeWithSeparators;
+    CFURLGetByteRangeForComponent((__bridge CFURLRef)URL, kCFURLComponentQuery, &rangeWithSeparators);
+    if (rangeWithSeparators.location != kCFNotFound && rangeWithSeparators.length == 1)
+        return YES;
+
+    return NO;
+}
+
+NSData *dataForURLComponentType(NSURL *URL, CFURLComponentType componentType)
+{
+    Vector<UInt8, URL_BYTES_BUFFER_LENGTH> allBytesBuffer(URL_BYTES_BUFFER_LENGTH);
+    CFIndex bytesFilled = CFURLGetBytes((__bridge CFURLRef)URL, allBytesBuffer.data(), allBytesBuffer.size());
+    if (bytesFilled == -1) {
+        CFIndex bytesToAllocate = CFURLGetBytes((__bridge CFURLRef)URL, nullptr, 0);
+        allBytesBuffer.grow(bytesToAllocate);
+        bytesFilled = CFURLGetBytes((__bridge CFURLRef)URL, allBytesBuffer.data(), bytesToAllocate);
+    }
+    
+    const CFURLComponentType completeURL = (CFURLComponentType)-1;
+    CFRange range;
+    if (componentType != completeURL) {
+        range = CFURLGetByteRangeForComponent((__bridge CFURLRef)URL, componentType, nullptr);
+        if (range.location == kCFNotFound)
+            return nil;
+    } else {
+        range.location = 0;
+        range.length = bytesFilled;
+    }
+    
+    NSData *componentData = [NSData dataWithBytes:allBytesBuffer.data() + range.location length:range.length]; 
+    
+    const unsigned char *bytes = static_cast<const unsigned char *>([componentData bytes]);
+    NSMutableData *resultData = [NSMutableData data];
+    // NOTE: add leading '?' to query strings non-zero length query strings.
+    // NOTE: retain question-mark only query strings.
+    if (componentType == kCFURLComponentQuery) {
+        if (range.length > 0 || hasQuestionMarkOnlyQueryString(URL))
+            [resultData appendBytes:"?" length:1];    
+    }
+    for (int i = 0; i < range.length; i++) {
+        unsigned char c = bytes[i];
+        if (c <= 0x20 || c >= 0x7f) {
+            char escaped[3];
+            escaped[0] = '%';
+            escaped[1] = upperNibbleToASCIIHexDigit(c);
+            escaped[2] = lowerNibbleToASCIIHexDigit(c);
+            [resultData appendBytes:escaped length:3];    
+        } else {
+            char b[1];
+            b[0] = c;
+            [resultData appendBytes:b length:1];    
+        }               
+    }
+    
+    return resultData;
+}
+
+static NSURL *URLByRemovingComponentAndSubsequentCharacter(NSURL *URL, CFURLComponentType component)
+{
+    CFRange range = CFURLGetByteRangeForComponent((__bridge CFURLRef)URL, component, 0);
+    if (range.location == kCFNotFound)
+        return URL;
+    
+    // Remove one subsequent character.
+    range.length++;
+
+    Vector<UInt8, URL_BYTES_BUFFER_LENGTH> buffer(URL_BYTES_BUFFER_LENGTH);
+    CFIndex numBytes = CFURLGetBytes((__bridge CFURLRef)URL, buffer.data(), buffer.size());
+    if (numBytes == -1) {
+        numBytes = CFURLGetBytes((__bridge CFURLRef)URL, nullptr, 0);
+        buffer.grow(numBytes);
+        CFURLGetBytes((__bridge CFURLRef)URL, buffer.data(), numBytes);
+    }
+    UInt8* urlBytes = buffer.data();
+        
+    if (numBytes < range.location)
+        return URL;
+    if (numBytes < range.location + range.length)
+        range.length = numBytes - range.location;
+        
+    memmove(urlBytes + range.location, urlBytes + range.location + range.length, numBytes - range.location + range.length);
+    
+    CFURLRef result = CFURLCreateWithBytes(nullptr, urlBytes, numBytes - range.length, kCFStringEncodingUTF8, nullptr);
+    if (!result)
+        result = CFURLCreateWithBytes(nullptr, urlBytes, numBytes - range.length, kCFStringEncodingISOLatin1, nullptr);
+                
+    return result ? CFBridgingRelease(result) : URL;
+}
+
+NSURL *URLByRemovingUserInfo(NSURL *URL)
+{
+    return URLByRemovingComponentAndSubsequentCharacter(URL, kCFURLComponentUserInfo);
+}
+
+NSData *originalURLData(NSURL *URL)
+{
+    UInt8 *buffer = (UInt8 *)malloc(URL_BYTES_BUFFER_LENGTH);
+    CFIndex bytesFilled = CFURLGetBytes((__bridge CFURLRef)URL, buffer, URL_BYTES_BUFFER_LENGTH);
+    if (bytesFilled == -1) {
+        CFIndex bytesToAllocate = CFURLGetBytes((__bridge CFURLRef)URL, nullptr, 0);
+        buffer = (UInt8 *)realloc(buffer, bytesToAllocate);
+        bytesFilled = CFURLGetBytes((__bridge CFURLRef)URL, buffer, bytesToAllocate);
+        ASSERT(bytesFilled == bytesToAllocate);
+    }
+    
+    // buffer is adopted by the NSData
+    NSData *data = [NSData dataWithBytesNoCopy:buffer length:bytesFilled freeWhenDone:YES];
+    
+    NSURL *baseURL = (__bridge NSURL *)CFURLGetBaseURL((__bridge CFURLRef)URL);
+    if (baseURL)
+        return originalURLData(URLWithData(data, baseURL));
+    return data;
+}
+
+static CFStringRef createStringWithEscapedUnsafeCharacters(CFStringRef string)
+{
+    CFIndex length = CFStringGetLength(string);
+    Vector<UChar, URL_BYTES_BUFFER_LENGTH> sourceBuffer(length);
+    CFStringGetCharacters(string, CFRangeMake(0, length), sourceBuffer.data());
+    
+    Vector<UChar, URL_BYTES_BUFFER_LENGTH> outBuffer;
+    
+    std::optional<UChar32> previousCodePoint;
+    CFIndex i = 0;
+    while (i < length) {
+        UChar32 c;
+        U16_NEXT(sourceBuffer, i, length, c)
+        
+        if (isLookalikeCharacter(previousCodePoint, c)) {
+            uint8_t utf8Buffer[4];
+            CFIndex offset = 0;
+            UBool failure = false;
+            U8_APPEND(utf8Buffer, offset, 4, c, failure)
+            ASSERT(!failure);
+            
+            for (CFIndex j = 0; j < offset; ++j) {
+                outBuffer.append('%');
+                outBuffer.append(upperNibbleToASCIIHexDigit(utf8Buffer[j]));
+                outBuffer.append(lowerNibbleToASCIIHexDigit(utf8Buffer[j]));
+            }
+        } else {
+            UChar utf16Buffer[2];
+            CFIndex offset = 0;
+            UBool failure = false;
+            U16_APPEND(utf16Buffer, offset, 2, c, failure)
+            ASSERT(!failure);
+            for (CFIndex j = 0; j < offset; ++j)
+                outBuffer.append(utf16Buffer[j]);
+        }
+        previousCodePoint = c;
+    }
+    
+    return CFStringCreateWithCharacters(nullptr, outBuffer.data(), outBuffer.size());
+}
+
+NSString *userVisibleString(NSURL *URL)
+{
+    NSData *data = originalURLData(URL);
+    const unsigned char *before = static_cast<const unsigned char*>([data bytes]);
+    int length = [data length];
+    
+    bool mayNeedHostNameDecoding = false;
+    
+    const unsigned char *p = before;
+    int bufferLength = (length * 3) + 1;
+    Vector<char, URL_BYTES_BUFFER_LENGTH> after(bufferLength); // large enough to %-escape every character
+    char *q = after.data();
+    for (int i = 0; i < length; i++) {
+        unsigned char c = p[i];
+        // unescape escape sequences that indicate bytes greater than 0x7f
+        if (c == '%' && (i + 1 < length && isASCIIHexDigit(p[i + 1])) && i + 2 < length && isASCIIHexDigit(p[i + 2])) {
+            auto u = toASCIIHexValue(p[i + 1], p[i + 2]);
+            if (u > 0x7f) {
+                // unescape
+                *q++ = u;
+            } else {
+                // do not unescape
+                *q++ = p[i];
+                *q++ = p[i + 1];
+                *q++ = p[i + 2];
+            }
+            i += 2;
+        } else {
+            *q++ = c;
+            
+            // Check for "xn--" in an efficient, non-case-sensitive, way.
+            if (c == '-' && i >= 3 && !mayNeedHostNameDecoding && (q[-4] | 0x20) == 'x' && (q[-3] | 0x20) == 'n' && q[-2] == '-')
+                mayNeedHostNameDecoding = true;
+        }
+    }
+    *q = '\0';
+    
+    // Check string to see if it can be converted to display using UTF-8  
+    RetainPtr<NSString> result = [NSString stringWithUTF8String:after.data()];
+    if (!result) {
+        // Could not convert to UTF-8.
+        // Convert characters greater than 0x7f to escape sequences.
+        // Shift current string to the end of the buffer
+        // then we will copy back bytes to the start of the buffer 
+        // as we convert.
+        int afterlength = q - after.data();
+        char *p = after.data() + bufferLength - afterlength - 1;
+        memmove(p, after.data(), afterlength + 1); // copies trailing '\0'
+        char *q = after.data();
+        while (*p) {
+            unsigned char c = *p;
+            if (c > 0x7f) {
+                *q++ = '%';
+                *q++ = upperNibbleToASCIIHexDigit(c);
+                *q++ = lowerNibbleToASCIIHexDigit(c);
+            } else
+                *q++ = *p;
+            p++;
+        }
+        *q = '\0';
+        result = [NSString stringWithUTF8String:after.data()];
+    }
+    
+    if (mayNeedHostNameDecoding) {
+        // FIXME: Is it good to ignore the failure of mapHostNames and keep result intact?
+        auto mappedResult = mapHostNames(result.get(), NO);
+        if (mappedResult)
+            result = mappedResult;
+    }
+
+    result = [result precomposedStringWithCanonicalMapping];
+    return CFBridgingRelease(createStringWithEscapedUnsafeCharacters((__bridge CFStringRef)result.get()));
+}
+
+BOOL isUserVisibleURL(NSString *string)
+{
+    BOOL valid = YES;
+    // get buffer
+    
+    char static_buffer[1024];
+    const char *p;
+    BOOL success = CFStringGetCString((__bridge CFStringRef)string, static_buffer, 1023, kCFStringEncodingUTF8);
+    p = success ? static_buffer : [string UTF8String];
+    
+    int length = strlen(p);
+    
+    // check for characters <= 0x20 or >=0x7f, %-escape sequences of %7f, and xn--, these
+    // are the things that will lead _web_userVisibleString to actually change things.
+    for (int i = 0; i < length; i++) {
+        unsigned char c = p[i];
+        // escape control characters, space, and delete
+        if (c <= 0x20 || c == 0x7f) {
+            valid = NO;
+            break;
+        } else if (c == '%' && (i + 1 < length && isASCIIHexDigit(p[i + 1])) && i + 2 < length && isASCIIHexDigit(p[i + 2])) {
+            auto u = toASCIIHexValue(p[i + 1], p[i + 2]);
+            if (u > 0x7f) {
+                valid = NO;
+                break;
+            }
+            i += 2;
+        } else {
+            // Check for "xn--" in an efficient, non-case-sensitive, way.
+            if (c == '-' && i >= 3 && (p[i - 3] | 0x20) == 'x' && (p[i - 2] | 0x20) == 'n' && p[i - 1] == '-') {
+                valid = NO;
+                break;
+            }
+        }
+    }
+    
+    return valid;
+}
+
+NSRange rangeOfURLScheme(NSString *string)
+{
+    NSRange colon = [string rangeOfString:@":"];
+    if (colon.location != NSNotFound && colon.location > 0) {
+        NSRange scheme = {0, colon.location};
+        /*
+         This stuff is very expensive.  10-15 msec on a 2x1.2GHz.  If not cached it swamps
+         everything else when adding items to the autocomplete DB.  Makes me wonder if we
+         even need to enforce the character set here.
+         */
+        NSString *acceptableCharacters = @"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+.-";
+        static NeverDestroyed<RetainPtr<NSCharacterSet>> InverseSchemeCharacterSet([[NSCharacterSet characterSetWithCharactersInString:acceptableCharacters] invertedSet]);
+        NSRange illegals = [string rangeOfCharacterFromSet:InverseSchemeCharacterSet.get().get() options:0 range:scheme];
+        if (illegals.location == NSNotFound)
+            return scheme;
+    }
+    return NSMakeRange(NSNotFound, 0);
+}
+
+BOOL looksLikeAbsoluteURL(NSString *string)
+{
+    // Trim whitespace because _web_URLWithString allows whitespace.
+    return rangeOfURLScheme(stringByTrimmingWhitespace(string).get()).location != NSNotFound;
+}
+
+} // namespace WebCore
similarity index 84%
rename from Source/WebCore/platform/mac/URLMac.mm
rename to Source/WTF/wtf/cocoa/URLCocoa.mm
index f312f82..5161c3a 100644 (file)
  */
 
 #import "config.h"
-#import "URL.h"
+#import <wtf/URL.h>
 
 #import "CFURLExtras.h"
-#import "URLParser.h"
-#import "WebCoreNSURLExtras.h"
+#import "NSURLExtras.h"
 #import <wtf/ObjCRuntimeExtras.h>
+#import <wtf/URLParser.h>
 #import <wtf/text/CString.h>
 
-@interface NSString (WebCoreNSURLExtras)
+@interface NSString (WTFNSURLExtras)
 - (BOOL)_web_looksLikeIPAddress;
 @end
 
-namespace WebCore {
+namespace WTF {
 
 URL::URL(NSURL *url)
 {
@@ -47,7 +47,7 @@ URL::URL(NSURL *url)
 
     // FIXME: Why is it OK to ignore base URL here?
     CString urlBytes;
-    getURLBytes((__bridge CFURLRef)url, urlBytes);
+    WTF::getURLBytes((__bridge CFURLRef)url, urlBytes);
     URLParser parser(urlBytes.data());
     *this = parser.result();
 }
@@ -73,15 +73,15 @@ RetainPtr<CFURLRef> URL::createCFURL() const
 
     // Fast path if the input data is 8-bit to avoid copying into a temporary buffer.
     if (LIKELY(m_string.is8Bit()))
-        cfURL = createCFURLFromBuffer(reinterpret_cast<const char*>(m_string.characters8()), m_string.length());
+        cfURL = WTF::createCFURLFromBuffer(reinterpret_cast<const char*>(m_string.characters8()), m_string.length());
     else {
         // Slower path.
-        URLCharBuffer buffer;
+        WTF::URLCharBuffer buffer;
         copyToBuffer(buffer);
-        cfURL = createCFURLFromBuffer(buffer.data(), buffer.size());
+        cfURL = WTF::createCFURLFromBuffer(buffer.data(), buffer.size());
     }
 
-    if (protocolIsInHTTPFamily() && !isCFURLSameOrigin(cfURL.get(), *this))
+    if (protocolIsInHTTPFamily() && !WTF::isCFURLSameOrigin(cfURL.get(), *this))
         return nullptr;
 
     return cfURL;
similarity index 93%
rename from Source/WebCore/platform/network/soup/GUniquePtrSoup.h
rename to Source/WTF/wtf/glib/GUniquePtrSoup.h
index 86dc637..0b4fb34 100644 (file)
  *  Boston, MA 02110-1301, USA.
  */
 
-#ifndef GUniquePtrSoup_h
-#define GUniquePtrSoup_h
+#pragma once
+
+#include <wtf/Platform.h>
+
+#if USE(SOUP)
 
 #include <libsoup/soup.h>
 #include <wtf/glib/GUniquePtr.h>
@@ -32,4 +35,4 @@ WTF_DEFINE_GPTR_DELETER(SoupBuffer, soup_buffer_free)
 
 } // namespace WTF
 
-#endif
+#endif // USE(SOUP)
similarity index 96%
rename from Source/WebCore/platform/soup/URLSoup.cpp
rename to Source/WTF/wtf/glib/URLSoup.cpp
index 97dba32..55dbc7e 100644 (file)
 
 #if USE(SOUP)
 
-#include "URL.h"
-
-#include "URLParser.h"
 #include <libsoup/soup.h>
+#include <wtf/URL.h>
+#include <wtf/URLParser.h>
 #include <wtf/text/CString.h>
 
-namespace WebCore {
+namespace WTF {
 
 URL::URL(SoupURI* soupURI)
 {
@@ -71,6 +70,6 @@ bool URL::hostIsIPAddress(StringView host)
     return !host.isEmpty() && g_hostname_is_ip_address(host.utf8().data());
 }
 
-} // namespace WebCore
+} // namespace WTF
 
 #endif
index e0d3470..298cb28 100644 (file)
@@ -1,3 +1,557 @@
+2018-11-30  Alex Christensen  <achristensen@webkit.org>
+
+        Move URL from WebCore to WTF
+        https://bugs.webkit.org/show_bug.cgi?id=190234
+
+        Reviewed by Keith Miller.
+
+        A URL is a low-level concept that does not depend on other classes in WebCore.
+        We are starting to use URLs in JavaScriptCore for modules.
+        I need URL and URLParser in a place with fewer dependencies for rdar://problem/44119696
+
+        * Modules/applepay/ApplePaySession.h:
+        * Modules/applepay/ApplePayValidateMerchantEvent.h:
+        * Modules/applepay/PaymentCoordinator.cpp:
+        * Modules/applepay/PaymentCoordinator.h:
+        * Modules/applepay/PaymentCoordinatorClient.h:
+        * Modules/applepay/PaymentSession.h:
+        * Modules/applicationmanifest/ApplicationManifest.h:
+        * Modules/beacon/NavigatorBeacon.cpp:
+        * Modules/cache/DOMCache.cpp:
+        * Modules/fetch/FetchLoader.h:
+        * Modules/mediasession/MediaSessionMetadata.h:
+        * Modules/mediasource/MediaSourceRegistry.cpp:
+        * Modules/mediasource/MediaSourceRegistry.h:
+        * Modules/mediastream/MediaStream.cpp:
+        * Modules/mediastream/MediaStreamRegistry.cpp:
+        * Modules/mediastream/MediaStreamRegistry.h:
+        * Modules/navigatorcontentutils/NavigatorContentUtilsClient.h:
+        * Modules/notifications/Notification.h:
+        * Modules/paymentrequest/MerchantValidationEvent.h:
+        * Modules/paymentrequest/PaymentRequest.h:
+        * Modules/plugins/PluginReplacement.h:
+        * Modules/webaudio/AudioContext.h:
+        * Modules/websockets/ThreadableWebSocketChannel.h:
+        * Modules/websockets/WebSocket.h:
+        * Modules/websockets/WebSocketHandshake.cpp:
+        * Modules/websockets/WebSocketHandshake.h:
+        * Modules/websockets/WorkerThreadableWebSocketChannel.h:
+        * PlatformMac.cmake:
+        * PlatformWin.cmake:
+        * Sources.txt:
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/CachedModuleScriptLoader.h:
+        * bindings/js/CachedScriptFetcher.h:
+        * bindings/js/ScriptController.cpp:
+        (WebCore::ScriptController::executeIfJavaScriptURL):
+        * bindings/js/ScriptController.h:
+        * bindings/js/ScriptModuleLoader.h:
+        * bindings/js/ScriptSourceCode.h:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+        * bindings/scripts/test/JS/JSInterfaceName.cpp:
+        * bindings/scripts/test/JS/JSMapLike.cpp:
+        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
+        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
+        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
+        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
+        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
+        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
+        * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
+        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
+        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
+        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
+        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
+        * bindings/scripts/test/JS/JSTestException.cpp:
+        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
+        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
+        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
+        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
+        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
+        * bindings/scripts/test/JS/JSTestInterface.cpp:
+        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
+        * bindings/scripts/test/JS/JSTestIterable.cpp:
+        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
+        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
+        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
+        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
+        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
+        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
+        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
+        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
+        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
+        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
+        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
+        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
+        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
+        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
+        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
+        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
+        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
+        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
+        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
+        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
+        * bindings/scripts/test/JS/JSTestNode.cpp:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
+        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
+        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
+        * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
+        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
+        * bindings/scripts/test/JS/JSTestSerialization.cpp:
+        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
+        * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
+        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+        * bindings/scripts/test/JS/JSTestStringifier.cpp:
+        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
+        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
+        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
+        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
+        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
+        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
+        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+        * contentextensions/ContentExtensionsBackend.cpp:
+        (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
+        (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForPingLoad):
+        (WebCore::ContentExtensions::applyBlockedStatusToRequest):
+        * contentextensions/ContentExtensionsBackend.h:
+        * css/CSSValue.h:
+        * css/StyleProperties.h:
+        * css/StyleResolver.h:
+        * css/StyleSheet.h:
+        * css/StyleSheetContents.h:
+        * css/parser/CSSParserContext.h:
+        (WebCore::CSSParserContextHash::hash):
+        (WTF::HashTraits<WebCore::CSSParserContext>::constructDeletedValue):
+        * css/parser/CSSParserIdioms.h:
+        * dom/DataTransfer.cpp:
+        (WebCore::DataTransfer::setDataFromItemList):
+        * dom/Document.cpp:
+        (WebCore::Document::setURL):
+        (WebCore::Document::processHttpEquiv):
+        (WebCore::Document::completeURL const):
+        (WebCore::Document::ensureTemplateDocument):
+        * dom/Document.h:
+        (WebCore::Document::urlForBindings const):
+        * dom/Element.cpp:
+        (WebCore::Element::isJavaScriptURLAttribute const):
+        * dom/InlineStyleSheetOwner.cpp:
+        (WebCore::parserContextForElement):
+        * dom/Node.cpp:
+        (WebCore::Node::baseURI const):
+        * dom/Node.h:
+        * dom/ScriptElement.h:
+        * dom/ScriptExecutionContext.h:
+        * dom/SecurityContext.h:
+        * editing/Editor.cpp:
+        (WebCore::Editor::pasteboardWriterURL):
+        * editing/Editor.h:
+        * editing/MarkupAccumulator.cpp:
+        (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
+        * editing/cocoa/DataDetection.h:
+        * editing/cocoa/EditorCocoa.mm:
+        (WebCore::Editor::userVisibleString):
+        * editing/cocoa/WebContentReaderCocoa.mm:
+        (WebCore::replaceRichContentWithAttachments):
+        (WebCore::WebContentReader::readWebArchive):
+        * editing/mac/EditorMac.mm:
+        (WebCore::Editor::plainTextFromPasteboard):
+        (WebCore::Editor::writeImageToPasteboard):
+        * editing/markup.cpp:
+        (WebCore::removeSubresourceURLAttributes):
+        (WebCore::createFragmentFromMarkup):
+        * editing/markup.h:
+        * fileapi/AsyncFileStream.cpp:
+        * fileapi/AsyncFileStream.h:
+        * fileapi/Blob.h:
+        * fileapi/BlobURL.cpp:
+        * fileapi/BlobURL.h:
+        * fileapi/File.h:
+        * fileapi/FileReaderLoader.h:
+        * fileapi/ThreadableBlobRegistry.h:
+        * history/CachedFrame.h:
+        * history/HistoryItem.h:
+        * html/DOMURL.cpp:
+        (WebCore::DOMURL::create):
+        * html/DOMURL.h:
+        * html/HTMLAttachmentElement.cpp:
+        (WebCore::HTMLAttachmentElement::archiveResourceURL):
+        * html/HTMLFrameElementBase.cpp:
+        (WebCore::HTMLFrameElementBase::isURLAllowed const):
+        (WebCore::HTMLFrameElementBase::openURL):
+        (WebCore::HTMLFrameElementBase::setLocation):
+        * html/HTMLInputElement.h:
+        * html/HTMLLinkElement.h:
+        * html/HTMLMediaElement.cpp:
+        (WTF::LogArgument<URL>::toString):
+        (WTF::LogArgument<WebCore::URL>::toString): Deleted.
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::HTMLPlugInImageElement::allowedToLoadFrameURL):
+        * html/ImageBitmap.h:
+        * html/MediaFragmentURIParser.h:
+        * html/PublicURLManager.cpp:
+        * html/PublicURLManager.h:
+        * html/URLInputType.cpp:
+        * html/URLRegistry.h:
+        * html/URLSearchParams.cpp:
+        (WebCore::URLSearchParams::URLSearchParams):
+        (WebCore::URLSearchParams::toString const):
+        (WebCore::URLSearchParams::updateURL):
+        (WebCore::URLSearchParams::updateFromAssociatedURL):
+        * html/URLUtils.h:
+        (WebCore::URLUtils<T>::setHost):
+        (WebCore::URLUtils<T>::setPort):
+        * html/canvas/CanvasRenderingContext.cpp:
+        * html/canvas/CanvasRenderingContext.h:
+        * html/parser/HTMLParserIdioms.cpp:
+        * html/parser/XSSAuditor.cpp:
+        (WebCore::semicolonSeparatedValueContainsJavaScriptURL):
+        (WebCore::XSSAuditor::filterScriptToken):
+        (WebCore::XSSAuditor::filterObjectToken):
+        (WebCore::XSSAuditor::filterParamToken):
+        (WebCore::XSSAuditor::filterEmbedToken):
+        (WebCore::XSSAuditor::filterFormToken):
+        (WebCore::XSSAuditor::filterInputToken):
+        (WebCore::XSSAuditor::filterButtonToken):
+        (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
+        (WebCore::XSSAuditor::isLikelySafeResource):
+        * html/parser/XSSAuditor.h:
+        * html/parser/XSSAuditorDelegate.h:
+        * inspector/InspectorFrontendHost.cpp:
+        (WebCore::InspectorFrontendHost::openInNewTab):
+        * inspector/InspectorInstrumentation.h:
+        * inspector/agents/InspectorNetworkAgent.cpp:
+        * inspector/agents/InspectorNetworkAgent.h:
+        * inspector/agents/InspectorPageAgent.h:
+        * inspector/agents/InspectorWorkerAgent.h:
+        * loader/ApplicationManifestLoader.h:
+        * loader/CookieJar.h:
+        * loader/CrossOriginAccessControl.h:
+        * loader/CrossOriginPreflightResultCache.h:
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::willSendRequest):
+        (WebCore::DocumentLoader::maybeLoadEmpty):
+        * loader/DocumentLoader.h:
+        (WebCore::DocumentLoader::serverRedirectSourceForHistory const):
+        * loader/DocumentWriter.h:
+        * loader/FormSubmission.h:
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::submitForm):
+        (WebCore::FrameLoader::receivedFirstData):
+        (WebCore::FrameLoader::loadWithDocumentLoader):
+        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
+        (WebCore::createWindow):
+        * loader/FrameLoaderClient.h:
+        * loader/HistoryController.cpp:
+        (WebCore::HistoryController::currentItemShouldBeReplaced const):
+        (WebCore::HistoryController::initializeItem):
+        * loader/LinkLoader.h:
+        * loader/LoadTiming.h:
+        * loader/LoaderStrategy.h:
+        * loader/MixedContentChecker.cpp:
+        (WebCore::MixedContentChecker::checkFormForMixedContent const):
+        * loader/MixedContentChecker.h:
+        * loader/NavigationScheduler.cpp:
+        (WebCore::NavigationScheduler::shouldScheduleNavigation const):
+        * loader/NavigationScheduler.h:
+        * loader/PingLoader.h:
+        * loader/PolicyChecker.cpp:
+        (WebCore::PolicyChecker::checkNavigationPolicy):
+        * loader/ResourceLoadInfo.h:
+        * loader/ResourceLoadObserver.cpp:
+        (WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener):
+        * loader/ResourceLoadObserver.h:
+        * loader/ResourceLoadStatistics.h:
+        * loader/ResourceLoader.h:
+        * loader/ResourceTiming.h:
+        * loader/SubframeLoader.cpp:
+        (WebCore::SubframeLoader::requestFrame):
+        * loader/SubframeLoader.h:
+        * loader/SubstituteData.h:
+        * loader/appcache/ApplicationCache.h:
+        * loader/appcache/ApplicationCacheGroup.h:
+        * loader/appcache/ApplicationCacheHost.h:
+        * loader/appcache/ApplicationCacheStorage.cpp:
+        * loader/appcache/ApplicationCacheStorage.h:
+        * loader/appcache/ManifestParser.cpp:
+        * loader/appcache/ManifestParser.h:
+        * loader/archive/ArchiveResourceCollection.h:
+        * loader/archive/cf/LegacyWebArchive.cpp:
+        (WebCore::LegacyWebArchive::createFromSelection):
+        * loader/cache/CachedResource.cpp:
+        * loader/cache/CachedResourceLoader.h:
+        * loader/cache/CachedStyleSheetClient.h:
+        * loader/cache/MemoryCache.h:
+        * loader/icon/IconLoader.h:
+        * loader/mac/LoaderNSURLExtras.mm:
+        * page/CaptionUserPreferencesMediaAF.cpp:
+        * page/ChromeClient.h:
+        * page/ClientOrigin.h:
+        * page/ContextMenuClient.h:
+        * page/ContextMenuController.cpp:
+        (WebCore::ContextMenuController::checkOrEnableIfNeeded const):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::isInsecureScriptAccess):
+        * page/DragController.cpp:
+        (WebCore::DragController::startDrag):
+        * page/DragController.h:
+        * page/EventSource.h:
+        * page/Frame.h:
+        * page/FrameView.h:
+        * page/History.h:
+        * page/Location.cpp:
+        (WebCore::Location::url const):
+        (WebCore::Location::reload):
+        * page/Location.h:
+        * page/Page.h:
+        * page/PageSerializer.h:
+        * page/Performance.h:
+        * page/PerformanceResourceTiming.cpp:
+        * page/SecurityOrigin.cpp:
+        (WebCore::SecurityOrigin::SecurityOrigin):
+        (WebCore::SecurityOrigin::create):
+        * page/SecurityOrigin.h:
+        * page/SecurityOriginData.h:
+        * page/SecurityOriginHash.h:
+        * page/SecurityPolicy.cpp:
+        (WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):
+        * page/SecurityPolicy.h:
+        * page/SettingsBase.h:
+        * page/ShareData.h:
+        * page/SocketProvider.h:
+        * page/UserContentProvider.h:
+        * page/UserContentURLPattern.cpp:
+        * page/UserContentURLPattern.h:
+        * page/UserScript.h:
+        * page/UserStyleSheet.h:
+        * page/VisitedLinkStore.h:
+        * page/csp/ContentSecurityPolicy.h:
+        * page/csp/ContentSecurityPolicyClient.h:
+        * page/csp/ContentSecurityPolicyDirectiveList.h:
+        * page/csp/ContentSecurityPolicySource.cpp:
+        (WebCore::ContentSecurityPolicySource::portMatches const):
+        * page/csp/ContentSecurityPolicySource.h:
+        * page/csp/ContentSecurityPolicySourceList.cpp:
+        * page/csp/ContentSecurityPolicySourceList.h:
+        * page/csp/ContentSecurityPolicySourceListDirective.cpp:
+        * platform/ContentFilterUnblockHandler.h:
+        * platform/ContextMenuItem.h:
+        * platform/Cookie.h:
+        * platform/CookiesStrategy.h:
+        * platform/DragData.h:
+        * platform/DragImage.h:
+        * platform/FileStream.h:
+        * platform/LinkIcon.h:
+        * platform/Pasteboard.cpp:
+        (WebCore::Pasteboard::canExposeURLToDOMWhenPasteboardContainsFiles):
+        * platform/Pasteboard.h:
+        * platform/PasteboardStrategy.h:
+        * platform/PasteboardWriterData.cpp:
+        (WebCore::PasteboardWriterData::setURLData):
+        (WebCore::PasteboardWriterData::setURL): Deleted.
+        * platform/PasteboardWriterData.h:
+        * platform/PlatformPasteboard.h:
+        * platform/PromisedAttachmentInfo.h:
+        * platform/SSLKeyGenerator.h:
+        * platform/SchemeRegistry.cpp:
+        (WebCore::SchemeRegistry::isBuiltinScheme):
+        * platform/SharedBuffer.h:
+        * platform/SharedStringHash.cpp:
+        * platform/SharedStringHash.h:
+        * platform/SourcesSoup.txt:
+        * platform/UserAgent.h:
+        * platform/UserAgentQuirks.cpp:
+        * platform/UserAgentQuirks.h:
+        * platform/cocoa/NetworkExtensionContentFilter.h:
+        * platform/cocoa/NetworkExtensionContentFilter.mm:
+        (WebCore::NetworkExtensionContentFilter::willSendRequest):
+        * platform/glib/SSLKeyGeneratorGLib.cpp: Copied from Source/WebCore/page/ShareData.h.
+        (WebCore::getSupportedKeySizes):
+        (WebCore::signedPublicKeyAndChallengeString):
+        * platform/glib/UserAgentGLib.cpp:
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/Image.cpp:
+        * platform/graphics/Image.h:
+        * platform/graphics/ImageObserver.h:
+        * platform/graphics/ImageSource.cpp:
+        * platform/graphics/ImageSource.h:
+        * platform/graphics/MediaPlayer.h:
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
+        * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
+        (webKitMediaSrcSetUri):
+        * platform/graphics/iso/ISOVTTCue.cpp:
+        * platform/graphics/win/GraphicsContextDirect2D.cpp:
+        * platform/gtk/DragImageGtk.cpp:
+        * platform/gtk/PasteboardGtk.cpp:
+        * platform/gtk/PlatformPasteboardGtk.cpp:
+        * platform/gtk/SelectionData.h:
+        * platform/ios/PasteboardIOS.mm:
+        * platform/ios/PlatformPasteboardIOS.mm:
+        (WebCore::PlatformPasteboard::write):
+        * platform/ios/QuickLook.h:
+        * platform/mac/DragDataMac.mm:
+        (WebCore::DragData::asPlainText const):
+        * platform/mac/DragImageMac.mm:
+        * platform/mac/FileSystemMac.mm:
+        (WebCore::FileSystem::setMetadataURL):
+        * platform/mac/PasteboardMac.mm:
+        * platform/mac/PasteboardWriter.mm:
+        (WebCore::createPasteboardWriter):
+        * platform/mac/PlatformPasteboardMac.mm:
+        * platform/mac/PublicSuffixMac.mm:
+        (WebCore::decodeHostName):
+        * platform/mac/SSLKeyGeneratorMac.mm:
+        * platform/mac/WebCoreNSURLExtras.h:
+        * platform/mac/WebCoreNSURLExtras.mm:
+        (WebCore::isArmenianLookalikeCharacter): Deleted.
+        (WebCore::isArmenianScriptCharacter): Deleted.
+        (WebCore::isASCIIDigitOrValidHostCharacter): Deleted.
+        (WebCore::isLookalikeCharacter): Deleted.
+        (WebCore::whiteListIDNScript): Deleted.
+        (WebCore::readIDNScriptWhiteListFile): Deleted.
+        (WebCore::allCharactersInIDNScriptWhiteList): Deleted.
+        (WebCore::isSecondLevelDomainNameAllowedByTLDRules): Deleted.
+        (WebCore::isRussianDomainNameCharacter): Deleted.
+        (WebCore::allCharactersAllowedByTLDRules): Deleted.
+        (WebCore::mapHostNameWithRange): Deleted.
+        (WebCore::hostNameNeedsDecodingWithRange): Deleted.
+        (WebCore::hostNameNeedsEncodingWithRange): Deleted.
+        (WebCore::decodeHostNameWithRange): Deleted.
+        (WebCore::encodeHostNameWithRange): Deleted.
+        (WebCore::decodeHostName): Deleted.
+        (WebCore::encodeHostName): Deleted.
+        (WebCore::collectRangesThatNeedMapping): Deleted.
+        (WebCore::collectRangesThatNeedEncoding): Deleted.
+        (WebCore::collectRangesThatNeedDecoding): Deleted.
+        (WebCore::applyHostNameFunctionToMailToURLString): Deleted.
+        (WebCore::applyHostNameFunctionToURLString): Deleted.
+        (WebCore::mapHostNames): Deleted.
+        (WebCore::stringByTrimmingWhitespace): Deleted.
+        (WebCore::URLByTruncatingOneCharacterBeforeComponent): Deleted.
+        (WebCore::URLByRemovingResourceSpecifier): Deleted.
+        (WebCore::URLWithData): Deleted.
+        (WebCore::dataWithUserTypedString): Deleted.
+        (WebCore::URLWithUserTypedString): Deleted.
+        (WebCore::URLWithUserTypedStringDeprecated): Deleted.
+        (WebCore::hasQuestionMarkOnlyQueryString): Deleted.
+        (WebCore::dataForURLComponentType): Deleted.
+        (WebCore::URLByRemovingComponentAndSubsequentCharacter): Deleted.
+        (WebCore::URLByRemovingUserInfo): Deleted.
+        (WebCore::originalURLData): Deleted.
+        (WebCore::createStringWithEscapedUnsafeCharacters): Deleted.
+        (WebCore::userVisibleString): Deleted.
+        (WebCore::isUserVisibleURL): Deleted.
+        (WebCore::rangeOfURLScheme): Deleted.
+        (WebCore::looksLikeAbsoluteURL): Deleted.
+        * platform/mediastream/MediaEndpointConfiguration.h:
+        * platform/network/BlobPart.h:
+        * platform/network/BlobRegistry.h:
+        * platform/network/BlobRegistryImpl.h:
+        * platform/network/BlobResourceHandle.cpp:
+        * platform/network/CookieRequestHeaderFieldProxy.h:
+        * platform/network/CredentialStorage.cpp:
+        * platform/network/CredentialStorage.h:
+        * platform/network/DataURLDecoder.cpp:
+        * platform/network/DataURLDecoder.h:
+        * platform/network/FormData.h:
+        * platform/network/ProxyServer.h:
+        * platform/network/ResourceErrorBase.h:
+        * platform/network/ResourceHandle.cpp:
+        (WebCore::ResourceHandle::didReceiveResponse):
+        * platform/network/ResourceHandle.h:
+        * platform/network/ResourceHandleClient.h:
+        * platform/network/ResourceRequestBase.cpp:
+        (WebCore::ResourceRequestBase::redirectedRequest const):
+        * platform/network/ResourceRequestBase.h:
+        * platform/network/ResourceResponseBase.h:
+        * platform/network/SocketStreamHandle.h:
+        * platform/network/cf/DNSResolveQueueCFNet.cpp:
+        * platform/network/cf/NetworkStorageSessionCFNet.cpp:
+        * platform/network/cf/ProxyServerCFNet.cpp:
+        * platform/network/cf/ResourceErrorCF.cpp:
+        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
+        * platform/network/curl/CookieJarCurlDatabase.cpp: Added.
+        (WebCore::cookiesForSession):
+        (WebCore::CookieJarCurlDatabase::setCookiesFromDOM const):
+        (WebCore::CookieJarCurlDatabase::setCookiesFromHTTPResponse const):
+        (WebCore::CookieJarCurlDatabase::cookiesForDOM const):
+        (WebCore::CookieJarCurlDatabase::cookieRequestHeaderFieldValue const):
+        (WebCore::CookieJarCurlDatabase::cookiesEnabled const):
+        (WebCore::CookieJarCurlDatabase::getRawCookies const):
+        (WebCore::CookieJarCurlDatabase::deleteCookie const):
+        (WebCore::CookieJarCurlDatabase::getHostnamesWithCookies const):
+        (WebCore::CookieJarCurlDatabase::deleteCookiesForHostnames const):
+        (WebCore::CookieJarCurlDatabase::deleteAllCookies const):
+        (WebCore::CookieJarCurlDatabase::deleteAllCookiesModifiedSince const):
+        * platform/network/curl/CookieJarDB.cpp:
+        * platform/network/curl/CookieUtil.h:
+        * platform/network/curl/CurlContext.h:
+        * platform/network/curl/CurlProxySettings.h:
+        * platform/network/curl/CurlResponse.h:
+        * platform/network/curl/NetworkStorageSessionCurl.cpp:
+        * platform/network/curl/ProxyServerCurl.cpp:
+        * platform/network/curl/SocketStreamHandleImplCurl.cpp:
+        * platform/network/mac/ResourceErrorMac.mm:
+        * platform/network/soup/NetworkStorageSessionSoup.cpp:
+        * platform/network/soup/ProxyServerSoup.cpp:
+        * platform/network/soup/ResourceHandleSoup.cpp:
+        * platform/network/soup/ResourceRequest.h:
+        * platform/network/soup/ResourceRequestSoup.cpp:
+        * platform/network/soup/SocketStreamHandleImplSoup.cpp:
+        * platform/network/soup/SoupNetworkSession.cpp:
+        * platform/network/soup/SoupNetworkSession.h:
+        * platform/text/TextEncoding.h:
+        * platform/win/BString.cpp:
+        * platform/win/BString.h:
+        * platform/win/ClipboardUtilitiesWin.cpp:
+        (WebCore::markupToCFHTML):
+        * platform/win/ClipboardUtilitiesWin.h:
+        * platform/win/DragImageWin.cpp:
+        * platform/win/PasteboardWin.cpp:
+        * plugins/PluginData.h:
+        * rendering/HitTestResult.h:
+        * rendering/RenderAttachment.cpp:
+        * svg/SVGImageLoader.cpp:
+        (WebCore::SVGImageLoader::sourceURI const):
+        * svg/SVGURIReference.cpp:
+        * svg/graphics/SVGImage.h:
+        * svg/graphics/SVGImageCache.h:
+        * svg/graphics/SVGImageForContainer.h:
+        * testing/Internals.cpp:
+        (WebCore::Internals::resetToConsistentState):
+        * testing/Internals.mm:
+        (WebCore::Internals::userVisibleString):
+        * testing/MockContentFilter.cpp:
+