haikuwebkit/Source/WTF/wtf/URLParser.h

158 lines
8.6 KiB
C
Raw Permalink Normal View History

/*
Use some C++17 features https://bugs.webkit.org/show_bug.cgi?id=185135 Reviewed by Alex Christensen. .: As discussed here [0] let's move WebKit to a subset of C++17. We now require GCC 6 [1] which means that, according to [2] we can use the following C++17 language features (I removed some uninteresting ones): - New auto rules for direct-list-initialization - static_assert with no message - typename in a template template parameter - Nested namespace definition - Attributes for namespaces and enumerators - u8 character literals - Allow constant evaluation for all non-type template arguments - Fold Expressions - Unary fold expressions and empty parameter packs - __has_include in preprocessor conditional - Differing begin and end types in range-based for - Improving std::pair and std::tuple Consult the Tony Tables [3] to see before / after examples. Of course we can use any library feature if we're willing to import them to WTF (and they don't require language support). [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html [1]: https://trac.webkit.org/changeset/231152/webkit [2]: https://en.cppreference.com/w/cpp/compiler_support [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md * Source/cmake/WebKitCompilerFlags.cmake: Source/WebCore: As discussed here [0] let's move WebKit to a subset of C++17. We now require GCC 6 [1] which means that, according to [2] we can use the following C++17 language features (I removed some uninteresting ones): - New auto rules for direct-list-initialization - static_assert with no message - typename in a template template parameter - Nested namespace definition - Attributes for namespaces and enumerators - u8 character literals - Allow constant evaluation for all non-type template arguments - Fold Expressions - Unary fold expressions and empty parameter packs - __has_include in preprocessor conditional - Differing begin and end types in range-based for - Improving std::pair and std::tuple Consult the Tony Tables [3] to see before / after examples. Of course we can use any library feature if we're willing to import them to WTF (and they don't require language support). [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html [1]: https://trac.webkit.org/changeset/231152/webkit [2]: https://en.cppreference.com/w/cpp/compiler_support [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md * DerivedSources.make: * platform/URLParser.cpp: work around an odd GCC 6 bug with class static value as a template parameter. (WebCore::URLParser::percentDecode): (WebCore::URLParser::domainToASCII): (WebCore::URLParser::hasForbiddenHostCodePoint): (WebCore::URLParser::parseHostAndPort): * platform/URLParser.h: Source/WebKit: As discussed here [0] let's move WebKit to a subset of C++17. We now require GCC 6 [1] which means that, according to [2] we can use the following C++17 language features (I removed some uninteresting ones): - New auto rules for direct-list-initialization - static_assert with no message - typename in a template template parameter - Nested namespace definition - Attributes for namespaces and enumerators - u8 character literals - Allow constant evaluation for all non-type template arguments - Fold Expressions - Unary fold expressions and empty parameter packs - __has_include in preprocessor conditional - Differing begin and end types in range-based for - Improving std::pair and std::tuple Consult the Tony Tables [3] to see before / after examples. Of course we can use any library feature if we're willing to import them to WTF (and they don't require language support). [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html [1]: https://trac.webkit.org/changeset/231152/webkit [2]: https://en.cppreference.com/w/cpp/compiler_support [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md * Configurations/Base.xcconfig: * DerivedSources.make: * PlatformMac.cmake: Source/WebKitLegacy: * PlatformMac.cmake: Source/WebKitLegacy/mac: * Configurations/WebKitLegacy.xcconfig: Source/WTF: * wtf/StdLibExtras.h: libstdc++ doesn't say it's C++17 when it defines std::conjunction. Use the feature test macro instead. Tools: * DumpRenderTree/PlatformMac.cmake: * gtk/ycm_extra_conf.py: (FlagsForFile): Canonical link: https://commits.webkit.org/200630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-04-30 21:17:59 +00:00
* Copyright (C) 2016-2018 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.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
*/
#pragma once
Check for "xn--" in any subdomain when parsing URL hosts https://bugs.webkit.org/show_bug.cgi?id=226912 Reviewed by Darin Adler. LayoutTests/imported/w3c: * web-platform-tests/url/a-element-expected.txt: * web-platform-tests/url/a-element-xhtml-expected.txt: * web-platform-tests/url/failure-expected.txt: * web-platform-tests/url/resources/urltestdata.json: * web-platform-tests/url/toascii.window-expected.txt: * web-platform-tests/url/url-constructor-expected.txt: Source/WTF: We have a fast path that doesn't call uidna_nameToASCII if the host is already ASCII. We need to check if the host is properly-punycode-encoded if it starts with "xn--" but we also need to check if any subdomain starts with "xn--" (not just the first one). In order to not regress tests, I needed to also take the fix I did in r256629 and apply it to all use of uidna_nameToASCII. * wtf/URL.cpp: (WTF::appendEncodedHostname): * wtf/URLHelpers.cpp: (WTF::URLHelpers::mapHostName): * wtf/URLParser.cpp: (WTF::URLParser::domainToASCII): (WTF::URLParser::subdomainStartsWithXNDashDash): (WTF::URLParser::parseHostAndPort): (WTF::URLParser::startsWithXNDashDash): Deleted. * wtf/URLParser.h: Tools: * TestWebKitAPI/Tests/WTF/URLParser.cpp: (TestWebKitAPI::TEST_F): These tests used to hit UIDNA_ERROR_LABEL_TOO_LONG which is allowed now. * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm: (TestWebKitAPI::TEST): This test, from r262171, needs to verify that non-ASCII characters are not truncated to ASCII values when converting to NSURL. It used to use an invalid URL that had a host that ended in U+FE63 (SMALL HYPHEN-MINUS) which would fail because of UIDNA_ERROR_TRAILING_HYPHEN. Now that trailing hyphens are allowed, we end in U+0661 and U+06F1 which fail because of UIDNA_ERROR_BIDI which makes this test still verify the non-truncated values of an invalid host converted to an NSURL. LayoutTests: * fast/dom/DOMURL/parsing-expected.txt: * fast/dom/DOMURL/parsing.html: Update the test I added in r236527 to reflect this relaxation. This matches the behavior of Chrome Canary. Canonical link: https://commits.webkit.org/238822@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-15 16:59:15 +00:00
#include <unicode/uidna.h>
#include <wtf/Expected.h>
#include <wtf/Forward.h>
Move URL from WebCore to WTF 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. Canonical link: https://commits.webkit.org/206915@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-12-01 03:28:36 +00:00
#include <wtf/URL.h>
Support IDN2008 with UTS #46 instead of IDN2003 https://bugs.webkit.org/show_bug.cgi?id=144194 Reviewed by Darin Adler. Source/WebCore: Use uidna_nameToASCII instead of the deprecated uidna_IDNToASCII. It uses IDN2008 instead of IDN2003, and it uses UTF #46 when used with a UIDNA opened with uidna_openUTS46. This follows https://url.spec.whatwg.org/#concept-domain-to-ascii except we do not use Transitional_Processing to prevent homograph attacks on german domain names with "ß" and "ss" in them. These are now treated as separate domains. Firefox also doesn't use Transitional_Processing. Chrome and the current specification use Transitional_processing, but https://github.com/whatwg/url/issues/110 might change the spec. In addition, http://unicode.org/reports/tr46/ says: "implementations are encouraged to apply the Bidi and ContextJ validity criteria" Bidi checks prevent domain names with bidirectional text, such as latin and hebrew characters in the same domain. Chrome and Firefox do this. ContextJ checks prevent code points such as U+200D, which is a zero-width joiner which users would not see when looking at the domain name. Firefox currently enables ContextJ checks and it is suggested by UTS #46, so we'll do it. ContextO checks, which we do not use and neither does any other browser nor the spec, would fail if a domain contains code points such as U+30FB, which looks somewhat like a dot. We can investigate enabling these checks later. Covered by new API tests and rebased LayoutTests. The new API tests verify that we do not use transitional processing, that we do apply the Bidi and ContextJ checks, but not ContextO checks. * platform/URLParser.cpp: (WebCore::URLParser::domainToASCII): (WebCore::URLParser::internationalDomainNameTranscoder): * platform/URLParser.h: * platform/mac/WebCoreNSURLExtras.mm: (WebCore::mapHostNameWithRange): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): Add some tests from http://unicode.org/faq/idn.html verifying that we follow UTS46's deviations from IDN2008. Add some tests based on https://tools.ietf.org/html/rfc5893 verifying that we check for bidirectional text. Add a test based on https://tools.ietf.org/html/rfc5892 verifying that we do not do ContextO check. Add a test for U+321D and U+321E which have particularly interesting punycode encodings. We match Firefox here now. Also add a test from http://www.unicode.org/reports/tr46/#IDNAComparison verifying we are not using IDN2003. We should consider importing all of http://www.unicode.org/Public/idna/9.0.0/IdnaTest.txt as URL domain tests. LayoutTests: * fast/encoding/idn-security.html: Move some characters with changed IDN encodings to inside the check for old ICU. * fast/url/idna2003-expected.txt: * fast/url/idna2008-expected.txt: Update expected results. We are now more compliant with IDN2008. Canonical link: https://commits.webkit.org/182613@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-18 22:47:24 +00:00
struct UIDNA;
Move URL from WebCore to WTF 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. Canonical link: https://commits.webkit.org/206915@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-12-01 03:28:36 +00:00
namespace WTF {
URLParser should parse relative URLs https://bugs.webkit.org/show_bug.cgi?id=161282 Patch by Alex Christensen <achristensen@webkit.org> on 2016-08-27 Reviewed by Darin Adler. Source/WebCore: Partially covered by new API tests, but once the parser is complete enough we can use the url web platform tests to more fully test this. It's still a work in progress only used by tests. * platform/URLParser.cpp: (WebCore::URLParser::urlLengthUntilPart): (WebCore::URLParser::copyURLPartsUntil): Added some helper functions to reduce redundant code. When parsing relative URLs, we often want to copy large parts of the base URL, but the stopping point differs. (WebCore::URLParser::parse): The parser now returns a URL instead of an Optional<URL> because a URL has a m_isValid which behaves like Optional. * platform/URLParser.h: (WebCore::URLParser::parse): Source/WTF: * wtf/text/StringView.h: Use a std::reference_wrapper for the StringView& to make it reassignable so we can add an operator=. Tools: * TestWebKitAPI/Tests/WTF/StringView.cpp: (TestWebKitAPI::TEST): Added some tests for the new operator=. Test saving iterators, restoring iterators, and even assigning iterators to new CodePoints objects. Using the same iterator to iterate multiple objects is bad practice, but it's possible and now tested. * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): (TestWebKitAPI::checkRelativeURL): (TestWebKitAPI::checkURLDifferences): (TestWebKitAPI::shouldFail): Add some relative URL tests. Canonical link: https://commits.webkit.org/179471@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-28 05:55:17 +00:00
Use efficient iterators in URLParser https://bugs.webkit.org/show_bug.cgi?id=162007 Reviewed by Tim Horton. URLParser used to use StringView::CodePoints::Iterator, which needs to check if the StringView is 8-bit or 16-bit every time it does anything. I wrote a new CodePointIterator template which already knows whether it is iterating 8-bit or 16-bit characters, so it does not need to do the checks each time it gets a code point or advances to the next code point. No change in behavior except a performance increase. Covered by existing tests. * platform/URLParser.cpp: (WebCore::CodePointIterator::CodePointIterator): (WebCore::CodePointIterator::operator==): (WebCore::CodePointIterator::operator!=): (WebCore::CodePointIterator::operator=): (WebCore::CodePointIterator::atEnd): (WebCore::CodePointIterator<LChar>::operator): (WebCore::CodePointIterator<UChar>::operator): (WebCore::isWindowsDriveLetter): (WebCore::shouldCopyFileURL): (WebCore::isPercentEncodedDot): (WebCore::isSingleDotPathSegment): (WebCore::isDoubleDotPathSegment): (WebCore::consumeSingleDotPathSegment): (WebCore::consumeDoubleDotPathSegment): (WebCore::URLParser::failure): (WebCore::URLParser::parse): (WebCore::URLParser::parseAuthority): (WebCore::parseIPv4Number): (WebCore::parseIPv4Host): (WebCore::parseIPv6Host): (WebCore::URLParser::parsePort): (WebCore::URLParser::parseHost): * platform/URLParser.h: Canonical link: https://commits.webkit.org/180162@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-15 18:12:09 +00:00
template<typename CharacterType> class CodePointIterator;
class URLParser {
[WTF][JSC] Make JSC and WTF aggressively-fast-malloced https://bugs.webkit.org/show_bug.cgi?id=200611 Reviewed by Saam Barati. Source/JavaScriptCore: This patch aggressively puts many classes into FastMalloc. In JSC side, we grep `std::make_unique` etc. to find potentially system-malloc-allocated classes. After this patch, all the JSC related allocations in JetStream2 cli is done from bmalloc. In the future, it would be nice that we add `WTF::makeUnique<T>` helper function and throw a compile error if `T` is not FastMalloc annotated[1]. Putting WebKit classes in FastMalloc has many benefits. 1. Simply, it is fast. 2. vmmap can tell the amount of memory used for WebKit. 3. bmalloc can isolate WebKit memory allocation from the rest of the world. This is useful since we can know more about what component is corrupting the memory from the memory corruption crash. [1]: https://bugs.webkit.org/show_bug.cgi?id=200620 * API/ObjCCallbackFunction.mm: * assembler/AbstractMacroAssembler.h: * b3/B3PhiChildren.h: * b3/air/AirAllocateRegistersAndStackAndGenerateCode.h: * b3/air/AirDisassembler.h: * bytecode/AccessCaseSnippetParams.h: * bytecode/CallVariant.h: * bytecode/DeferredSourceDump.h: * bytecode/ExecutionCounter.h: * bytecode/GetByIdStatus.h: * bytecode/GetByIdVariant.h: * bytecode/InByIdStatus.h: * bytecode/InByIdVariant.h: * bytecode/InstanceOfStatus.h: * bytecode/InstanceOfVariant.h: * bytecode/PutByIdStatus.h: * bytecode/PutByIdVariant.h: * bytecode/ValueProfile.h: * dfg/DFGAbstractInterpreter.h: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::newVariableAccessData): * dfg/DFGFlowIndexing.h: * dfg/DFGFlowMap.h: * dfg/DFGLiveCatchVariablePreservationPhase.cpp: (JSC::DFG::LiveCatchVariablePreservationPhase::newVariableAccessData): * dfg/DFGMaximalFlushInsertionPhase.cpp: (JSC::DFG::MaximalFlushInsertionPhase::newVariableAccessData): * dfg/DFGOSRExit.h: * dfg/DFGSpeculativeJIT.h: * dfg/DFGVariableAccessData.h: * disassembler/ARM64/A64DOpcode.h: * inspector/remote/socket/RemoteInspectorMessageParser.h: * inspector/remote/socket/RemoteInspectorSocket.h: * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * jit/PCToCodeOriginMap.h: * runtime/BasicBlockLocation.h: * runtime/DoublePredictionFuzzerAgent.h: * runtime/JSRunLoopTimer.h: * runtime/PromiseDeferredTimer.h: (JSC::PromiseDeferredTimer::create): PromiseDeferredTimer should be allocated as `Ref<>` instead of `std::unique_ptr` since it is inheriting ThreadSafeRefCounted<>. Holding such a class with std::unique_ptr could lead to potentially dangerous operations (like, someone holds it with Ref<> while it is deleted by std::unique_ptr<>). * runtime/RandomizingFuzzerAgent.h: * runtime/SymbolTable.h: * runtime/VM.cpp: (JSC::VM::VM): * runtime/VM.h: * tools/JSDollarVM.cpp: * tools/SigillCrashAnalyzer.cpp: * wasm/WasmFormat.h: * wasm/WasmMemory.cpp: * wasm/WasmSignature.h: * yarr/YarrJIT.h: Source/WebCore: Changed the accessor since we changed std::unique_ptr to Ref for this field. No behavior change. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::addTimerSetNotification): (WebCore::WorkerScriptController::removeTimerSetNotification): Source/WTF: WTF has many data structures, in particular, containers. And these containers can be allocated like `std::make_unique<Container>()`. Without WTF_MAKE_FAST_ALLOCATED, this container itself is allocated from the system malloc. This patch attaches WTF_MAKE_FAST_ALLOCATED more aggressively not to allocate them from the system malloc. And we add some `final` to containers and classes that would be never inherited. * wtf/Assertions.cpp: * wtf/Atomics.h: * wtf/AutodrainedPool.h: * wtf/Bag.h: (WTF::Bag::Bag): Deleted. (WTF::Bag::~Bag): Deleted. (WTF::Bag::clear): Deleted. (WTF::Bag::add): Deleted. (WTF::Bag::iterator::iterator): Deleted. (WTF::Bag::iterator::operator! const): Deleted. (WTF::Bag::iterator::operator* const): Deleted. (WTF::Bag::iterator::operator++): Deleted. (WTF::Bag::iterator::operator== const): Deleted. (WTF::Bag::iterator::operator!= const): Deleted. (WTF::Bag::begin): Deleted. (WTF::Bag::begin const): Deleted. (WTF::Bag::end const): Deleted. (WTF::Bag::isEmpty const): Deleted. (WTF::Bag::unwrappedHead const): Deleted. * wtf/BitVector.h: (WTF::BitVector::BitVector): Deleted. (WTF::BitVector::~BitVector): Deleted. (WTF::BitVector::operator=): Deleted. (WTF::BitVector::size const): Deleted. (WTF::BitVector::ensureSize): Deleted. (WTF::BitVector::quickGet const): Deleted. (WTF::BitVector::quickSet): Deleted. (WTF::BitVector::quickClear): Deleted. (WTF::BitVector::get const): Deleted. (WTF::BitVector::contains const): Deleted. (WTF::BitVector::set): Deleted. (WTF::BitVector::add): Deleted. (WTF::BitVector::ensureSizeAndSet): Deleted. (WTF::BitVector::clear): Deleted. (WTF::BitVector::remove): Deleted. (WTF::BitVector::merge): Deleted. (WTF::BitVector::filter): Deleted. (WTF::BitVector::exclude): Deleted. (WTF::BitVector::bitCount const): Deleted. (WTF::BitVector::isEmpty const): Deleted. (WTF::BitVector::findBit const): Deleted. (WTF::BitVector::isEmptyValue const): Deleted. (WTF::BitVector::isDeletedValue const): Deleted. (WTF::BitVector::isEmptyOrDeletedValue const): Deleted. (WTF::BitVector::operator== const): Deleted. (WTF::BitVector::hash const): Deleted. (WTF::BitVector::iterator::iterator): Deleted. (WTF::BitVector::iterator::operator* const): Deleted. (WTF::BitVector::iterator::operator++): Deleted. (WTF::BitVector::iterator::isAtEnd const): Deleted. (WTF::BitVector::iterator::operator== const): Deleted. (WTF::BitVector::iterator::operator!= const): Deleted. (WTF::BitVector::begin const): Deleted. (WTF::BitVector::end const): Deleted. (WTF::BitVector::bitsInPointer): Deleted. (WTF::BitVector::maxInlineBits): Deleted. (WTF::BitVector::byteCount): Deleted. (WTF::BitVector::makeInlineBits): Deleted. (WTF::BitVector::cleanseInlineBits): Deleted. (WTF::BitVector::bitCount): Deleted. (WTF::BitVector::findBitFast const): Deleted. (WTF::BitVector::findBitSimple const): Deleted. (WTF::BitVector::OutOfLineBits::numBits const): Deleted. (WTF::BitVector::OutOfLineBits::numWords const): Deleted. (WTF::BitVector::OutOfLineBits::bits): Deleted. (WTF::BitVector::OutOfLineBits::bits const): Deleted. (WTF::BitVector::OutOfLineBits::OutOfLineBits): Deleted. (WTF::BitVector::isInline const): Deleted. (WTF::BitVector::outOfLineBits const): Deleted. (WTF::BitVector::outOfLineBits): Deleted. (WTF::BitVector::bits): Deleted. (WTF::BitVector::bits const): Deleted. * wtf/Bitmap.h: (WTF::Bitmap::size): Deleted. (WTF::Bitmap::iterator::iterator): Deleted. (WTF::Bitmap::iterator::operator* const): Deleted. (WTF::Bitmap::iterator::operator++): Deleted. (WTF::Bitmap::iterator::operator== const): Deleted. (WTF::Bitmap::iterator::operator!= const): Deleted. (WTF::Bitmap::begin const): Deleted. (WTF::Bitmap::end const): Deleted. * wtf/Box.h: * wtf/BumpPointerAllocator.h: * wtf/CPUTime.h: * wtf/CheckedBoolean.h: * wtf/CommaPrinter.h: (WTF::CommaPrinter::CommaPrinter): Deleted. (WTF::CommaPrinter::dump const): Deleted. (WTF::CommaPrinter::didPrint const): Deleted. * wtf/CompactPointerTuple.h: (WTF::CompactPointerTuple::encodeType): Deleted. (WTF::CompactPointerTuple::decodeType): Deleted. (WTF::CompactPointerTuple::CompactPointerTuple): Deleted. (WTF::CompactPointerTuple::pointer const): Deleted. (WTF::CompactPointerTuple::setPointer): Deleted. (WTF::CompactPointerTuple::type const): Deleted. (WTF::CompactPointerTuple::setType): Deleted. * wtf/CompilationThread.h: (WTF::CompilationScope::CompilationScope): Deleted. (WTF::CompilationScope::~CompilationScope): Deleted. (WTF::CompilationScope::leaveEarly): Deleted. * wtf/CompletionHandler.h: (WTF::CompletionHandler<Out): (WTF::Detail::CallableWrapper<CompletionHandler<Out): (WTF::CompletionHandlerCallingScope::CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::CompletionHandler<void): Deleted. * wtf/ConcurrentBuffer.h: (WTF::ConcurrentBuffer::ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::~ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::growExact): Deleted. (WTF::ConcurrentBuffer::grow): Deleted. (WTF::ConcurrentBuffer::array const): Deleted. (WTF::ConcurrentBuffer::operator[]): Deleted. (WTF::ConcurrentBuffer::operator[] const): Deleted. (WTF::ConcurrentBuffer::createArray): Deleted. * wtf/ConcurrentPtrHashSet.h: (WTF::ConcurrentPtrHashSet::contains): Deleted. (WTF::ConcurrentPtrHashSet::add): Deleted. (WTF::ConcurrentPtrHashSet::size const): Deleted. (WTF::ConcurrentPtrHashSet::Table::maxLoad const): Deleted. (WTF::ConcurrentPtrHashSet::hash): Deleted. (WTF::ConcurrentPtrHashSet::cast): Deleted. (WTF::ConcurrentPtrHashSet::containsImpl const): Deleted. (WTF::ConcurrentPtrHashSet::addImpl): Deleted. * wtf/ConcurrentVector.h: (WTF::ConcurrentVector::~ConcurrentVector): Deleted. (WTF::ConcurrentVector::size const): Deleted. (WTF::ConcurrentVector::isEmpty const): Deleted. (WTF::ConcurrentVector::at): Deleted. (WTF::ConcurrentVector::at const): Deleted. (WTF::ConcurrentVector::operator[]): Deleted. (WTF::ConcurrentVector::operator[] const): Deleted. (WTF::ConcurrentVector::first): Deleted. (WTF::ConcurrentVector::first const): Deleted. (WTF::ConcurrentVector::last): Deleted. (WTF::ConcurrentVector::last const): Deleted. (WTF::ConcurrentVector::takeLast): Deleted. (WTF::ConcurrentVector::append): Deleted. (WTF::ConcurrentVector::alloc): Deleted. (WTF::ConcurrentVector::removeLast): Deleted. (WTF::ConcurrentVector::grow): Deleted. (WTF::ConcurrentVector::begin): Deleted. (WTF::ConcurrentVector::end): Deleted. (WTF::ConcurrentVector::segmentExistsFor): Deleted. (WTF::ConcurrentVector::segmentFor): Deleted. (WTF::ConcurrentVector::subscriptFor): Deleted. (WTF::ConcurrentVector::ensureSegmentsFor): Deleted. (WTF::ConcurrentVector::ensureSegment): Deleted. (WTF::ConcurrentVector::allocateSegment): Deleted. * wtf/Condition.h: (WTF::Condition::waitUntil): Deleted. (WTF::Condition::waitFor): Deleted. (WTF::Condition::wait): Deleted. (WTF::Condition::notifyOne): Deleted. (WTF::Condition::notifyAll): Deleted. * wtf/CountingLock.h: (WTF::CountingLock::LockHooks::lockHook): Deleted. (WTF::CountingLock::LockHooks::unlockHook): Deleted. (WTF::CountingLock::LockHooks::parkHook): Deleted. (WTF::CountingLock::LockHooks::handoffHook): Deleted. (WTF::CountingLock::tryLock): Deleted. (WTF::CountingLock::lock): Deleted. (WTF::CountingLock::unlock): Deleted. (WTF::CountingLock::isHeld const): Deleted. (WTF::CountingLock::isLocked const): Deleted. (WTF::CountingLock::Count::operator bool const): Deleted. (WTF::CountingLock::Count::operator== const): Deleted. (WTF::CountingLock::Count::operator!= const): Deleted. (WTF::CountingLock::tryOptimisticRead): Deleted. (WTF::CountingLock::validate): Deleted. (WTF::CountingLock::doOptimizedRead): Deleted. (WTF::CountingLock::tryOptimisticFencelessRead): Deleted. (WTF::CountingLock::fencelessValidate): Deleted. (WTF::CountingLock::doOptimizedFencelessRead): Deleted. (WTF::CountingLock::getCount): Deleted. * wtf/CrossThreadQueue.h: * wtf/CrossThreadTask.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/DataMutex.h: * wtf/DateMath.h: * wtf/Deque.h: (WTF::Deque::size const): Deleted. (WTF::Deque::isEmpty const): Deleted. (WTF::Deque::begin): Deleted. (WTF::Deque::end): Deleted. (WTF::Deque::begin const): Deleted. (WTF::Deque::end const): Deleted. (WTF::Deque::rbegin): Deleted. (WTF::Deque::rend): Deleted. (WTF::Deque::rbegin const): Deleted. (WTF::Deque::rend const): Deleted. (WTF::Deque::first): Deleted. (WTF::Deque::first const): Deleted. (WTF::Deque::last): Deleted. (WTF::Deque::last const): Deleted. (WTF::Deque::append): Deleted. * wtf/Dominators.h: * wtf/DoublyLinkedList.h: * wtf/Expected.h: * wtf/FastBitVector.h: * wtf/FileMetadata.h: * wtf/FileSystem.h: * wtf/GraphNodeWorklist.h: * wtf/GregorianDateTime.h: (WTF::GregorianDateTime::GregorianDateTime): Deleted. (WTF::GregorianDateTime::year const): Deleted. (WTF::GregorianDateTime::month const): Deleted. (WTF::GregorianDateTime::yearDay const): Deleted. (WTF::GregorianDateTime::monthDay const): Deleted. (WTF::GregorianDateTime::weekDay const): Deleted. (WTF::GregorianDateTime::hour const): Deleted. (WTF::GregorianDateTime::minute const): Deleted. (WTF::GregorianDateTime::second const): Deleted. (WTF::GregorianDateTime::utcOffset const): Deleted. (WTF::GregorianDateTime::isDST const): Deleted. (WTF::GregorianDateTime::setYear): Deleted. (WTF::GregorianDateTime::setMonth): Deleted. (WTF::GregorianDateTime::setYearDay): Deleted. (WTF::GregorianDateTime::setMonthDay): Deleted. (WTF::GregorianDateTime::setWeekDay): Deleted. (WTF::GregorianDateTime::setHour): Deleted. (WTF::GregorianDateTime::setMinute): Deleted. (WTF::GregorianDateTime::setSecond): Deleted. (WTF::GregorianDateTime::setUtcOffset): Deleted. (WTF::GregorianDateTime::setIsDST): Deleted. (WTF::GregorianDateTime::operator tm const): Deleted. (WTF::GregorianDateTime::copyFrom): Deleted. * wtf/HashTable.h: * wtf/Hasher.h: * wtf/HexNumber.h: * wtf/Indenter.h: * wtf/IndexMap.h: * wtf/IndexSet.h: * wtf/IndexSparseSet.h: * wtf/IndexedContainerIterator.h: * wtf/Insertion.h: * wtf/IteratorAdaptors.h: * wtf/IteratorRange.h: * wtf/KeyValuePair.h: * wtf/ListHashSet.h: (WTF::ListHashSet::begin): Deleted. (WTF::ListHashSet::end): Deleted. (WTF::ListHashSet::begin const): Deleted. (WTF::ListHashSet::end const): Deleted. (WTF::ListHashSet::random): Deleted. (WTF::ListHashSet::random const): Deleted. (WTF::ListHashSet::rbegin): Deleted. (WTF::ListHashSet::rend): Deleted. (WTF::ListHashSet::rbegin const): Deleted. (WTF::ListHashSet::rend const): Deleted. * wtf/Liveness.h: * wtf/LocklessBag.h: (WTF::LocklessBag::LocklessBag): Deleted. (WTF::LocklessBag::add): Deleted. (WTF::LocklessBag::iterate): Deleted. (WTF::LocklessBag::consumeAll): Deleted. (WTF::LocklessBag::consumeAllWithNode): Deleted. (WTF::LocklessBag::~LocklessBag): Deleted. * wtf/LoggingHashID.h: * wtf/MD5.h: * wtf/MachSendRight.h: * wtf/MainThreadData.h: * wtf/Markable.h: * wtf/MediaTime.h: * wtf/MemoryPressureHandler.h: * wtf/MessageQueue.h: (WTF::MessageQueue::MessageQueue): Deleted. * wtf/MetaAllocator.h: * wtf/MonotonicTime.h: (WTF::MonotonicTime::MonotonicTime): Deleted. (WTF::MonotonicTime::fromRawSeconds): Deleted. (WTF::MonotonicTime::infinity): Deleted. (WTF::MonotonicTime::nan): Deleted. (WTF::MonotonicTime::secondsSinceEpoch const): Deleted. (WTF::MonotonicTime::approximateMonotonicTime const): Deleted. (WTF::MonotonicTime::operator bool const): Deleted. (WTF::MonotonicTime::operator+ const): Deleted. (WTF::MonotonicTime::operator- const): Deleted. (WTF::MonotonicTime::operator% const): Deleted. (WTF::MonotonicTime::operator+=): Deleted. (WTF::MonotonicTime::operator-=): Deleted. (WTF::MonotonicTime::operator== const): Deleted. (WTF::MonotonicTime::operator!= const): Deleted. (WTF::MonotonicTime::operator< const): Deleted. (WTF::MonotonicTime::operator> const): Deleted. (WTF::MonotonicTime::operator<= const): Deleted. (WTF::MonotonicTime::operator>= const): Deleted. (WTF::MonotonicTime::isolatedCopy const): Deleted. (WTF::MonotonicTime::encode const): Deleted. (WTF::MonotonicTime::decode): Deleted. * wtf/NaturalLoops.h: * wtf/NoLock.h: * wtf/OSAllocator.h: * wtf/OptionSet.h: * wtf/Optional.h: * wtf/OrderMaker.h: * wtf/Packed.h: (WTF::alignof): * wtf/PackedIntVector.h: (WTF::PackedIntVector::PackedIntVector): Deleted. (WTF::PackedIntVector::operator=): Deleted. (WTF::PackedIntVector::size const): Deleted. (WTF::PackedIntVector::ensureSize): Deleted. (WTF::PackedIntVector::resize): Deleted. (WTF::PackedIntVector::clearAll): Deleted. (WTF::PackedIntVector::get const): Deleted. (WTF::PackedIntVector::set): Deleted. (WTF::PackedIntVector::mask): Deleted. * wtf/PageBlock.h: * wtf/ParallelJobsOpenMP.h: * wtf/ParkingLot.h: * wtf/PriorityQueue.h: (WTF::PriorityQueue::size const): Deleted. (WTF::PriorityQueue::isEmpty const): Deleted. (WTF::PriorityQueue::enqueue): Deleted. (WTF::PriorityQueue::peek const): Deleted. (WTF::PriorityQueue::dequeue): Deleted. (WTF::PriorityQueue::decreaseKey): Deleted. (WTF::PriorityQueue::increaseKey): Deleted. (WTF::PriorityQueue::begin const): Deleted. (WTF::PriorityQueue::end const): Deleted. (WTF::PriorityQueue::isValidHeap const): Deleted. (WTF::PriorityQueue::parentOf): Deleted. (WTF::PriorityQueue::leftChildOf): Deleted. (WTF::PriorityQueue::rightChildOf): Deleted. (WTF::PriorityQueue::siftUp): Deleted. (WTF::PriorityQueue::siftDown): Deleted. * wtf/RandomDevice.h: * wtf/Range.h: * wtf/RangeSet.h: (WTF::RangeSet::RangeSet): Deleted. (WTF::RangeSet::~RangeSet): Deleted. (WTF::RangeSet::add): Deleted. (WTF::RangeSet::contains const): Deleted. (WTF::RangeSet::overlaps const): Deleted. (WTF::RangeSet::clear): Deleted. (WTF::RangeSet::dump const): Deleted. (WTF::RangeSet::dumpRaw const): Deleted. (WTF::RangeSet::begin const): Deleted. (WTF::RangeSet::end const): Deleted. (WTF::RangeSet::addAll): Deleted. (WTF::RangeSet::compact): Deleted. (WTF::RangeSet::overlapsNonEmpty): Deleted. (WTF::RangeSet::subsumesNonEmpty): Deleted. (WTF::RangeSet::findRange const): Deleted. * wtf/RecursableLambda.h: * wtf/RedBlackTree.h: (WTF::RedBlackTree::Node::successor const): Deleted. (WTF::RedBlackTree::Node::predecessor const): Deleted. (WTF::RedBlackTree::Node::successor): Deleted. (WTF::RedBlackTree::Node::predecessor): Deleted. (WTF::RedBlackTree::Node::reset): Deleted. (WTF::RedBlackTree::Node::parent const): Deleted. (WTF::RedBlackTree::Node::setParent): Deleted. (WTF::RedBlackTree::Node::left const): Deleted. (WTF::RedBlackTree::Node::setLeft): Deleted. (WTF::RedBlackTree::Node::right const): Deleted. (WTF::RedBlackTree::Node::setRight): Deleted. (WTF::RedBlackTree::Node::color const): Deleted. (WTF::RedBlackTree::Node::setColor): Deleted. (WTF::RedBlackTree::RedBlackTree): Deleted. (WTF::RedBlackTree::insert): Deleted. (WTF::RedBlackTree::remove): Deleted. (WTF::RedBlackTree::findExact const): Deleted. (WTF::RedBlackTree::findLeastGreaterThanOrEqual const): Deleted. (WTF::RedBlackTree::findGreatestLessThanOrEqual const): Deleted. (WTF::RedBlackTree::first const): Deleted. (WTF::RedBlackTree::last const): Deleted. (WTF::RedBlackTree::size): Deleted. (WTF::RedBlackTree::isEmpty): Deleted. (WTF::RedBlackTree::treeMinimum): Deleted. (WTF::RedBlackTree::treeMaximum): Deleted. (WTF::RedBlackTree::treeInsert): Deleted. (WTF::RedBlackTree::leftRotate): Deleted. (WTF::RedBlackTree::rightRotate): Deleted. (WTF::RedBlackTree::removeFixup): Deleted. * wtf/ResourceUsage.h: * wtf/RunLoop.cpp: * wtf/RunLoopTimer.h: * wtf/SHA1.h: * wtf/Seconds.h: (WTF::Seconds::Seconds): Deleted. (WTF::Seconds::value const): Deleted. (WTF::Seconds::minutes const): Deleted. (WTF::Seconds::seconds const): Deleted. (WTF::Seconds::milliseconds const): Deleted. (WTF::Seconds::microseconds const): Deleted. (WTF::Seconds::nanoseconds const): Deleted. (WTF::Seconds::minutesAs const): Deleted. (WTF::Seconds::secondsAs const): Deleted. (WTF::Seconds::millisecondsAs const): Deleted. (WTF::Seconds::microsecondsAs const): Deleted. (WTF::Seconds::nanosecondsAs const): Deleted. (WTF::Seconds::fromMinutes): Deleted. (WTF::Seconds::fromHours): Deleted. (WTF::Seconds::fromMilliseconds): Deleted. (WTF::Seconds::fromMicroseconds): Deleted. (WTF::Seconds::fromNanoseconds): Deleted. (WTF::Seconds::infinity): Deleted. (WTF::Seconds::nan): Deleted. (WTF::Seconds::operator bool const): Deleted. (WTF::Seconds::operator+ const): Deleted. (WTF::Seconds::operator- const): Deleted. (WTF::Seconds::operator* const): Deleted. (WTF::Seconds::operator/ const): Deleted. (WTF::Seconds::operator% const): Deleted. (WTF::Seconds::operator+=): Deleted. (WTF::Seconds::operator-=): Deleted. (WTF::Seconds::operator*=): Deleted. (WTF::Seconds::operator/=): Deleted. (WTF::Seconds::operator%=): Deleted. (WTF::Seconds::operator== const): Deleted. (WTF::Seconds::operator!= const): Deleted. (WTF::Seconds::operator< const): Deleted. (WTF::Seconds::operator> const): Deleted. (WTF::Seconds::operator<= const): Deleted. (WTF::Seconds::operator>= const): Deleted. (WTF::Seconds::isolatedCopy const): Deleted. (WTF::Seconds::encode const): Deleted. (WTF::Seconds::decode): Deleted. * wtf/SegmentedVector.h: (WTF::SegmentedVector::~SegmentedVector): Deleted. (WTF::SegmentedVector::size const): Deleted. (WTF::SegmentedVector::isEmpty const): Deleted. (WTF::SegmentedVector::at): Deleted. (WTF::SegmentedVector::at const): Deleted. (WTF::SegmentedVector::operator[]): Deleted. (WTF::SegmentedVector::operator[] const): Deleted. (WTF::SegmentedVector::first): Deleted. (WTF::SegmentedVector::first const): Deleted. (WTF::SegmentedVector::last): Deleted. (WTF::SegmentedVector::last const): Deleted. (WTF::SegmentedVector::takeLast): Deleted. (WTF::SegmentedVector::append): Deleted. (WTF::SegmentedVector::alloc): Deleted. (WTF::SegmentedVector::removeLast): Deleted. (WTF::SegmentedVector::grow): Deleted. (WTF::SegmentedVector::clear): Deleted. (WTF::SegmentedVector::begin): Deleted. (WTF::SegmentedVector::end): Deleted. (WTF::SegmentedVector::shrinkToFit): Deleted. (WTF::SegmentedVector::deleteAllSegments): Deleted. (WTF::SegmentedVector::segmentExistsFor): Deleted. (WTF::SegmentedVector::segmentFor): Deleted. (WTF::SegmentedVector::subscriptFor): Deleted. (WTF::SegmentedVector::ensureSegmentsFor): Deleted. (WTF::SegmentedVector::ensureSegment): Deleted. (WTF::SegmentedVector::allocateSegment): Deleted. * wtf/SetForScope.h: * wtf/SingleRootGraph.h: * wtf/SinglyLinkedList.h: * wtf/SmallPtrSet.h: * wtf/SpanningTree.h: * wtf/Spectrum.h: * wtf/StackBounds.h: * wtf/StackShot.h: * wtf/StackShotProfiler.h: * wtf/StackStats.h: * wtf/StackTrace.h: * wtf/StreamBuffer.h: * wtf/SynchronizedFixedQueue.h: (WTF::SynchronizedFixedQueue::create): Deleted. (WTF::SynchronizedFixedQueue::open): Deleted. (WTF::SynchronizedFixedQueue::close): Deleted. (WTF::SynchronizedFixedQueue::isOpen): Deleted. (WTF::SynchronizedFixedQueue::enqueue): Deleted. (WTF::SynchronizedFixedQueue::dequeue): Deleted. (WTF::SynchronizedFixedQueue::SynchronizedFixedQueue): Deleted. * wtf/SystemTracing.h: * wtf/ThreadGroup.h: (WTF::ThreadGroup::create): Deleted. (WTF::ThreadGroup::threads const): Deleted. (WTF::ThreadGroup::getLock): Deleted. (WTF::ThreadGroup::weakFromThis): Deleted. * wtf/ThreadSpecific.h: * wtf/ThreadingPrimitives.h: (WTF::Mutex::impl): Deleted. * wtf/TimeWithDynamicClockType.h: (WTF::TimeWithDynamicClockType::TimeWithDynamicClockType): Deleted. (WTF::TimeWithDynamicClockType::fromRawSeconds): Deleted. (WTF::TimeWithDynamicClockType::secondsSinceEpoch const): Deleted. (WTF::TimeWithDynamicClockType::clockType const): Deleted. (WTF::TimeWithDynamicClockType::withSameClockAndRawSeconds const): Deleted. (WTF::TimeWithDynamicClockType::operator bool const): Deleted. (WTF::TimeWithDynamicClockType::operator+ const): Deleted. (WTF::TimeWithDynamicClockType::operator- const): Deleted. (WTF::TimeWithDynamicClockType::operator+=): Deleted. (WTF::TimeWithDynamicClockType::operator-=): Deleted. (WTF::TimeWithDynamicClockType::operator== const): Deleted. (WTF::TimeWithDynamicClockType::operator!= const): Deleted. * wtf/TimingScope.h: * wtf/TinyLRUCache.h: * wtf/TinyPtrSet.h: * wtf/URLParser.cpp: * wtf/URLParser.h: * wtf/Unexpected.h: * wtf/Variant.h: * wtf/WTFSemaphore.h: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::signal): Deleted. (WTF::Semaphore::waitUntil): Deleted. (WTF::Semaphore::waitFor): Deleted. (WTF::Semaphore::wait): Deleted. * wtf/WallTime.h: (WTF::WallTime::WallTime): Deleted. (WTF::WallTime::fromRawSeconds): Deleted. (WTF::WallTime::infinity): Deleted. (WTF::WallTime::nan): Deleted. (WTF::WallTime::secondsSinceEpoch const): Deleted. (WTF::WallTime::approximateWallTime const): Deleted. (WTF::WallTime::operator bool const): Deleted. (WTF::WallTime::operator+ const): Deleted. (WTF::WallTime::operator- const): Deleted. (WTF::WallTime::operator+=): Deleted. (WTF::WallTime::operator-=): Deleted. (WTF::WallTime::operator== const): Deleted. (WTF::WallTime::operator!= const): Deleted. (WTF::WallTime::operator< const): Deleted. (WTF::WallTime::operator> const): Deleted. (WTF::WallTime::operator<= const): Deleted. (WTF::WallTime::operator>= const): Deleted. (WTF::WallTime::isolatedCopy const): Deleted. * wtf/WeakHashSet.h: (WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::get const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator* const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator-> const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator++): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator== const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator!= const): Deleted. (WTF::WeakHashSet::WeakHashSet): Deleted. (WTF::WeakHashSet::begin const): Deleted. (WTF::WeakHashSet::end const): Deleted. (WTF::WeakHashSet::add): Deleted. (WTF::WeakHashSet::remove): Deleted. (WTF::WeakHashSet::contains const): Deleted. (WTF::WeakHashSet::capacity const): Deleted. (WTF::WeakHashSet::computesEmpty const): Deleted. (WTF::WeakHashSet::hasNullReferences const): Deleted. (WTF::WeakHashSet::computeSize const): Deleted. (WTF::WeakHashSet::checkConsistency const): Deleted. * wtf/WeakRandom.h: (WTF::WeakRandom::WeakRandom): Deleted. (WTF::WeakRandom::setSeed): Deleted. (WTF::WeakRandom::seed const): Deleted. (WTF::WeakRandom::get): Deleted. (WTF::WeakRandom::getUint32): Deleted. (WTF::WeakRandom::lowOffset): Deleted. (WTF::WeakRandom::highOffset): Deleted. (WTF::WeakRandom::nextState): Deleted. (WTF::WeakRandom::generate): Deleted. (WTF::WeakRandom::advance): Deleted. * wtf/WordLock.h: (WTF::WordLock::lock): Deleted. (WTF::WordLock::unlock): Deleted. (WTF::WordLock::isHeld const): Deleted. (WTF::WordLock::isLocked const): Deleted. (WTF::WordLock::isFullyReset const): Deleted. * wtf/generic/MainThreadGeneric.cpp: * wtf/glib/GMutexLocker.h: * wtf/linux/CurrentProcessMemoryStatus.h: * wtf/posix/ThreadingPOSIX.cpp: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::~Semaphore): Deleted. (WTF::Semaphore::wait): Deleted. (WTF::Semaphore::post): Deleted. * wtf/text/ASCIILiteral.h: (WTF::ASCIILiteral::operator const char* const): Deleted. (WTF::ASCIILiteral::fromLiteralUnsafe): Deleted. (WTF::ASCIILiteral::null): Deleted. (WTF::ASCIILiteral::characters const): Deleted. (WTF::ASCIILiteral::ASCIILiteral): Deleted. * wtf/text/AtomString.h: (WTF::AtomString::operator=): Deleted. (WTF::AtomString::isHashTableDeletedValue const): Deleted. (WTF::AtomString::existingHash const): Deleted. (WTF::AtomString::operator const String& const): Deleted. (WTF::AtomString::string const): Deleted. (WTF::AtomString::impl const): Deleted. (WTF::AtomString::is8Bit const): Deleted. (WTF::AtomString::characters8 const): Deleted. (WTF::AtomString::characters16 const): Deleted. (WTF::AtomString::length const): Deleted. (WTF::AtomString::operator[] const): Deleted. (WTF::AtomString::contains const): Deleted. (WTF::AtomString::containsIgnoringASCIICase const): Deleted. (WTF::AtomString::find const): Deleted. (WTF::AtomString::findIgnoringASCIICase const): Deleted. (WTF::AtomString::startsWith const): Deleted. (WTF::AtomString::startsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::endsWith const): Deleted. (WTF::AtomString::endsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::toInt const): Deleted. (WTF::AtomString::toDouble const): Deleted. (WTF::AtomString::toFloat const): Deleted. (WTF::AtomString::percentage const): Deleted. (WTF::AtomString::isNull const): Deleted. (WTF::AtomString::isEmpty const): Deleted. (WTF::AtomString::operator NSString * const): Deleted. * wtf/text/AtomStringImpl.h: (WTF::AtomStringImpl::lookUp): Deleted. (WTF::AtomStringImpl::add): Deleted. (WTF::AtomStringImpl::addWithStringTableProvider): Deleted. * wtf/text/CString.h: (WTF::CStringBuffer::data): Deleted. (WTF::CStringBuffer::length const): Deleted. (WTF::CStringBuffer::CStringBuffer): Deleted. (WTF::CStringBuffer::mutableData): Deleted. (WTF::CString::CString): Deleted. (WTF::CString::data const): Deleted. (WTF::CString::length const): Deleted. (WTF::CString::isNull const): Deleted. (WTF::CString::buffer const): Deleted. (WTF::CString::isHashTableDeletedValue const): Deleted. * wtf/text/ExternalStringImpl.h: (WTF::ExternalStringImpl::freeExternalBuffer): Deleted. * wtf/text/LineBreakIteratorPoolICU.h: * wtf/text/NullTextBreakIterator.h: * wtf/text/OrdinalNumber.h: * wtf/text/StringBuffer.h: * wtf/text/StringBuilder.h: * wtf/text/StringConcatenateNumbers.h: * wtf/text/StringHasher.h: * wtf/text/StringImpl.h: * wtf/text/StringView.cpp: * wtf/text/StringView.h: (WTF::StringView::left const): Deleted. (WTF::StringView::right const): Deleted. (WTF::StringView::underlyingStringIsValid const): Deleted. (WTF::StringView::setUnderlyingString): Deleted. * wtf/text/SymbolImpl.h: (WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl): Deleted. (WTF::SymbolImpl::StaticSymbolImpl::operator SymbolImpl&): Deleted. (WTF::PrivateSymbolImpl::PrivateSymbolImpl): Deleted. (WTF::RegisteredSymbolImpl::symbolRegistry const): Deleted. (WTF::RegisteredSymbolImpl::clearSymbolRegistry): Deleted. (WTF::RegisteredSymbolImpl::RegisteredSymbolImpl): Deleted. * wtf/text/SymbolRegistry.h: * wtf/text/TextBreakIterator.h: * wtf/text/TextPosition.h: * wtf/text/TextStream.h: * wtf/text/WTFString.h: (WTF::String::swap): Deleted. (WTF::String::adopt): Deleted. (WTF::String::isNull const): Deleted. (WTF::String::isEmpty const): Deleted. (WTF::String::impl const): Deleted. (WTF::String::releaseImpl): Deleted. (WTF::String::length const): Deleted. (WTF::String::characters8 const): Deleted. (WTF::String::characters16 const): Deleted. (WTF::String::is8Bit const): Deleted. (WTF::String::sizeInBytes const): Deleted. (WTF::String::operator[] const): Deleted. (WTF::String::find const): Deleted. (WTF::String::findIgnoringASCIICase const): Deleted. (WTF::String::reverseFind const): Deleted. (WTF::String::contains const): Deleted. (WTF::String::containsIgnoringASCIICase const): Deleted. (WTF::String::startsWith const): Deleted. (WTF::String::startsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixStartingAt const): Deleted. (WTF::String::endsWith const): Deleted. (WTF::String::endsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixEndingAt const): Deleted. (WTF::String::append): Deleted. (WTF::String::left const): Deleted. (WTF::String::right const): Deleted. (WTF::String::createUninitialized): Deleted. (WTF::String::fromUTF8WithLatin1Fallback): Deleted. (WTF::String::isAllASCII const): Deleted. (WTF::String::isAllLatin1 const): Deleted. (WTF::String::isSpecialCharacter const): Deleted. (WTF::String::isHashTableDeletedValue const): Deleted. (WTF::String::hash const): Deleted. (WTF::String::existingHash const): Deleted. * wtf/text/cf/TextBreakIteratorCF.h: * wtf/text/icu/TextBreakIteratorICU.h: * wtf/text/icu/UTextProviderLatin1.h: * wtf/threads/BinarySemaphore.h: (WTF::BinarySemaphore::waitFor): Deleted. (WTF::BinarySemaphore::wait): Deleted. * wtf/unicode/Collator.h: * wtf/win/GDIObject.h: * wtf/win/PathWalker.h: * wtf/win/Win32Handle.h: Canonical link: https://commits.webkit.org/214396@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-12 20:57:15 +00:00
WTF_MAKE_FAST_ALLOCATED;
public:
Check for "xn--" in any subdomain when parsing URL hosts https://bugs.webkit.org/show_bug.cgi?id=226912 Reviewed by Darin Adler. LayoutTests/imported/w3c: * web-platform-tests/url/a-element-expected.txt: * web-platform-tests/url/a-element-xhtml-expected.txt: * web-platform-tests/url/failure-expected.txt: * web-platform-tests/url/resources/urltestdata.json: * web-platform-tests/url/toascii.window-expected.txt: * web-platform-tests/url/url-constructor-expected.txt: Source/WTF: We have a fast path that doesn't call uidna_nameToASCII if the host is already ASCII. We need to check if the host is properly-punycode-encoded if it starts with "xn--" but we also need to check if any subdomain starts with "xn--" (not just the first one). In order to not regress tests, I needed to also take the fix I did in r256629 and apply it to all use of uidna_nameToASCII. * wtf/URL.cpp: (WTF::appendEncodedHostname): * wtf/URLHelpers.cpp: (WTF::URLHelpers::mapHostName): * wtf/URLParser.cpp: (WTF::URLParser::domainToASCII): (WTF::URLParser::subdomainStartsWithXNDashDash): (WTF::URLParser::parseHostAndPort): (WTF::URLParser::startsWithXNDashDash): Deleted. * wtf/URLParser.h: Tools: * TestWebKitAPI/Tests/WTF/URLParser.cpp: (TestWebKitAPI::TEST_F): These tests used to hit UIDNA_ERROR_LABEL_TOO_LONG which is allowed now. * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm: (TestWebKitAPI::TEST): This test, from r262171, needs to verify that non-ASCII characters are not truncated to ASCII values when converting to NSURL. It used to use an invalid URL that had a host that ended in U+FE63 (SMALL HYPHEN-MINUS) which would fail because of UIDNA_ERROR_TRAILING_HYPHEN. Now that trailing hyphens are allowed, we end in U+0661 and U+06F1 which fail because of UIDNA_ERROR_BIDI which makes this test still verify the non-truncated values of an invalid host converted to an NSURL. LayoutTests: * fast/dom/DOMURL/parsing-expected.txt: * fast/dom/DOMURL/parsing.html: Update the test I added in r236527 to reflect this relaxation. This matches the behavior of Chrome Canary. Canonical link: https://commits.webkit.org/238822@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-15 16:59:15 +00:00
constexpr static int allowedNameToASCIIErrors =
UIDNA_ERROR_EMPTY_LABEL
| UIDNA_ERROR_LABEL_TOO_LONG
| UIDNA_ERROR_DOMAIN_NAME_TOO_LONG
| UIDNA_ERROR_LEADING_HYPHEN
| UIDNA_ERROR_TRAILING_HYPHEN
| UIDNA_ERROR_HYPHEN_3_4;
// 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.
constexpr static size_t hostnameBufferLength = 2048;
Fix some whitespace handling issues in URL setters https://bugs.webkit.org/show_bug.cgi?id=227806 Patch by Alex Christensen <achristensen@webkit.org> on 2021-07-08 Reviewed by Chris Dumez. LayoutTests/imported/w3c: * web-platform-tests/url/a-element-expected.txt: * web-platform-tests/url/a-element-xhtml-expected.txt: * web-platform-tests/url/url-setters-stripping.any-expected.txt: * web-platform-tests/url/url-setters-stripping.any.worker-expected.txt: Source/WebCore: Covered by newly passing wpt tests. * dom/Element.cpp: (WebCore::Element::getURLAttribute const): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::href const): Don't remove whitespace before giving to completeURL, which will do that for us if it's a valid URL. If it's not a valid URL, we want the original string, not the trimmed string. * html/URLDecomposition.cpp: (WebCore::parsePort): Parse ports more like the URLParser, which ignores tabs and newlines. Source/WTF: Setters should ignore tabs and newlines like the main parser does. The protocol setter is problematic, which I reported in https://github.com/whatwg/url/issues/620 * wtf/URL.cpp: (WTF::URL::setFragmentIdentifier): * wtf/URLParser.cpp: (WTF::URLParser::isSpecialScheme): (WTF::URLParser::parse): * wtf/URLParser.h: The URL.hash setter should allow trailing C0 and control characters, which we would otherwise trim. Rather than introduce a new parameter, use a sentinel value for when we need to do this. LayoutTests: Update some old tests that failed in Chrome and Firefox to pass in all browsers after this change. * fast/dom/DOMURL/set-href-attribute-port-expected.txt: * fast/dom/DOMURL/set-href-attribute-port.html: * fast/dom/HTMLAnchorElement/set-href-attribute-port-expected.txt: * fast/dom/HTMLAnchorElement/set-href-attribute-port.html: Canonical link: https://commits.webkit.org/239531@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-08 22:59:59 +00:00
#define URLTextEncodingSentinelAllowingC0AtEndOfHash reinterpret_cast<const URLTextEncoding*>(-1)
Move URL from WebCore to WTF 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. Canonical link: https://commits.webkit.org/206915@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-12-01 03:28:36 +00:00
WTF_EXPORT_PRIVATE static bool allValuesEqual(const URL&, const URL&);
WTF_EXPORT_PRIVATE static bool internalValuesConsistent(const URL&);
Implement URLSearchParams https://bugs.webkit.org/show_bug.cgi?id=161920 Reviewed by Chris Dumez. LayoutTests/imported/w3c: * web-platform-tests/XMLHttpRequest/send-usp-expected.txt: * web-platform-tests/fetch/api/request/request-init-002-expected.txt: * web-platform-tests/fetch/api/response/response-init-002-expected.txt: * web-platform-tests/url/interfaces-expected.txt: * web-platform-tests/url/url-constructor-expected.txt: * web-platform-tests/url/urlsearchparams-append-expected.txt: * web-platform-tests/url/urlsearchparams-constructor-expected.txt: * web-platform-tests/url/urlsearchparams-delete-expected.txt: * web-platform-tests/url/urlsearchparams-get-expected.txt: * web-platform-tests/url/urlsearchparams-getall-expected.txt: * web-platform-tests/url/urlsearchparams-has-expected.txt: * web-platform-tests/url/urlsearchparams-set-expected.txt: * web-platform-tests/url/urlsearchparams-stringifier-expected.txt: Source/WebCore: Covered by newly passing web platform tests. * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * html/DOMURL.cpp: (WebCore::DOMURL::setQuery): (WebCore::DOMURL::searchParams): * html/DOMURL.h: * html/URLSearchParams.cpp: Added. (WebCore::URLSearchParams::URLSearchParams): (WebCore::URLSearchParams::get): (WebCore::URLSearchParams::has): (WebCore::URLSearchParams::set): (WebCore::URLSearchParams::append): (WebCore::URLSearchParams::getAll): (WebCore::URLSearchParams::remove): (WebCore::URLSearchParams::toString): (WebCore::URLSearchParams::updateURL): (WebCore::URLSearchParams::Iterator::Iterator): * html/URLSearchParams.h: Added. (WebCore::URLSearchParams::create): (WebCore::URLSearchParams::createIterator): * html/URLSearchParams.idl: Added. * html/URLUtils.idl: * platform/URLParser.cpp: (WebCore::percentDecode): (WebCore::URLParser::parseHost): (WebCore::formURLDecode): (WebCore::serializeURLEncodedForm): (WebCore::URLParser::serialize): * platform/URLParser.h: Source/WTF: * wtf/text/StringView.h: (WTF::StringView::split): Added. LayoutTests: * js/dom/global-constructors-attributes-dedicated-worker-expected.txt: * platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt: * platform/mac/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-content-type-expected.txt: Canonical link: https://commits.webkit.org/180087@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-14 01:34:27 +00:00
Move URL from WebCore to WTF 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. Canonical link: https://commits.webkit.org/206915@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-12-01 03:28:36 +00:00
using URLEncodedForm = Vector<WTF::KeyValuePair<String, String>>;
WTF_EXPORT_PRIVATE static URLEncodedForm parseURLEncodedForm(StringView);
WTF_EXPORT_PRIVATE static String serialize(const URLEncodedForm&);
Fix some whitespace handling issues in URL setters https://bugs.webkit.org/show_bug.cgi?id=227806 Patch by Alex Christensen <achristensen@webkit.org> on 2021-07-08 Reviewed by Chris Dumez. LayoutTests/imported/w3c: * web-platform-tests/url/a-element-expected.txt: * web-platform-tests/url/a-element-xhtml-expected.txt: * web-platform-tests/url/url-setters-stripping.any-expected.txt: * web-platform-tests/url/url-setters-stripping.any.worker-expected.txt: Source/WebCore: Covered by newly passing wpt tests. * dom/Element.cpp: (WebCore::Element::getURLAttribute const): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::href const): Don't remove whitespace before giving to completeURL, which will do that for us if it's a valid URL. If it's not a valid URL, we want the original string, not the trimmed string. * html/URLDecomposition.cpp: (WebCore::parsePort): Parse ports more like the URLParser, which ignores tabs and newlines. Source/WTF: Setters should ignore tabs and newlines like the main parser does. The protocol setter is problematic, which I reported in https://github.com/whatwg/url/issues/620 * wtf/URL.cpp: (WTF::URL::setFragmentIdentifier): * wtf/URLParser.cpp: (WTF::URLParser::isSpecialScheme): (WTF::URLParser::parse): * wtf/URLParser.h: The URL.hash setter should allow trailing C0 and control characters, which we would otherwise trim. Rather than introduce a new parameter, use a sentinel value for when we need to do this. LayoutTests: Update some old tests that failed in Chrome and Firefox to pass in all browsers after this change. * fast/dom/DOMURL/set-href-attribute-port-expected.txt: * fast/dom/DOMURL/set-href-attribute-port.html: * fast/dom/HTMLAnchorElement/set-href-attribute-port-expected.txt: * fast/dom/HTMLAnchorElement/set-href-attribute-port.html: Canonical link: https://commits.webkit.org/239531@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-08 22:59:59 +00:00
WTF_EXPORT_PRIVATE static bool isSpecialScheme(StringView);
WTF_EXPORT_PRIVATE static std::optional<String> maybeCanonicalizeScheme(StringView scheme);
Implement URLSearchParams https://bugs.webkit.org/show_bug.cgi?id=161920 Reviewed by Chris Dumez. LayoutTests/imported/w3c: * web-platform-tests/XMLHttpRequest/send-usp-expected.txt: * web-platform-tests/fetch/api/request/request-init-002-expected.txt: * web-platform-tests/fetch/api/response/response-init-002-expected.txt: * web-platform-tests/url/interfaces-expected.txt: * web-platform-tests/url/url-constructor-expected.txt: * web-platform-tests/url/urlsearchparams-append-expected.txt: * web-platform-tests/url/urlsearchparams-constructor-expected.txt: * web-platform-tests/url/urlsearchparams-delete-expected.txt: * web-platform-tests/url/urlsearchparams-get-expected.txt: * web-platform-tests/url/urlsearchparams-getall-expected.txt: * web-platform-tests/url/urlsearchparams-has-expected.txt: * web-platform-tests/url/urlsearchparams-set-expected.txt: * web-platform-tests/url/urlsearchparams-stringifier-expected.txt: Source/WebCore: Covered by newly passing web platform tests. * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * html/DOMURL.cpp: (WebCore::DOMURL::setQuery): (WebCore::DOMURL::searchParams): * html/DOMURL.h: * html/URLSearchParams.cpp: Added. (WebCore::URLSearchParams::URLSearchParams): (WebCore::URLSearchParams::get): (WebCore::URLSearchParams::has): (WebCore::URLSearchParams::set): (WebCore::URLSearchParams::append): (WebCore::URLSearchParams::getAll): (WebCore::URLSearchParams::remove): (WebCore::URLSearchParams::toString): (WebCore::URLSearchParams::updateURL): (WebCore::URLSearchParams::Iterator::Iterator): * html/URLSearchParams.h: Added. (WebCore::URLSearchParams::create): (WebCore::URLSearchParams::createIterator): * html/URLSearchParams.idl: Added. * html/URLUtils.idl: * platform/URLParser.cpp: (WebCore::percentDecode): (WebCore::URLParser::parseHost): (WebCore::formURLDecode): (WebCore::serializeURLEncodedForm): (WebCore::URLParser::serialize): * platform/URLParser.h: Source/WTF: * wtf/text/StringView.h: (WTF::StringView::split): Added. LayoutTests: * js/dom/global-constructors-attributes-dedicated-worker-expected.txt: * platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt: * platform/mac/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-content-type-expected.txt: Canonical link: https://commits.webkit.org/180087@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-14 01:34:27 +00:00
Support IDN2008 with UTS #46 instead of IDN2003 https://bugs.webkit.org/show_bug.cgi?id=144194 Reviewed by Darin Adler. Source/WebCore: Use uidna_nameToASCII instead of the deprecated uidna_IDNToASCII. It uses IDN2008 instead of IDN2003, and it uses UTF #46 when used with a UIDNA opened with uidna_openUTS46. This follows https://url.spec.whatwg.org/#concept-domain-to-ascii except we do not use Transitional_Processing to prevent homograph attacks on german domain names with "ß" and "ss" in them. These are now treated as separate domains. Firefox also doesn't use Transitional_Processing. Chrome and the current specification use Transitional_processing, but https://github.com/whatwg/url/issues/110 might change the spec. In addition, http://unicode.org/reports/tr46/ says: "implementations are encouraged to apply the Bidi and ContextJ validity criteria" Bidi checks prevent domain names with bidirectional text, such as latin and hebrew characters in the same domain. Chrome and Firefox do this. ContextJ checks prevent code points such as U+200D, which is a zero-width joiner which users would not see when looking at the domain name. Firefox currently enables ContextJ checks and it is suggested by UTS #46, so we'll do it. ContextO checks, which we do not use and neither does any other browser nor the spec, would fail if a domain contains code points such as U+30FB, which looks somewhat like a dot. We can investigate enabling these checks later. Covered by new API tests and rebased LayoutTests. The new API tests verify that we do not use transitional processing, that we do apply the Bidi and ContextJ checks, but not ContextO checks. * platform/URLParser.cpp: (WebCore::URLParser::domainToASCII): (WebCore::URLParser::internationalDomainNameTranscoder): * platform/URLParser.h: * platform/mac/WebCoreNSURLExtras.mm: (WebCore::mapHostNameWithRange): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): Add some tests from http://unicode.org/faq/idn.html verifying that we follow UTS46's deviations from IDN2008. Add some tests based on https://tools.ietf.org/html/rfc5893 verifying that we check for bidirectional text. Add a test based on https://tools.ietf.org/html/rfc5892 verifying that we do not do ContextO check. Add a test for U+321D and U+321E which have particularly interesting punycode encodings. We match Firefox here now. Also add a test from http://www.unicode.org/reports/tr46/#IDNAComparison verifying we are not using IDN2003. We should consider importing all of http://www.unicode.org/Public/idna/9.0.0/IdnaTest.txt as URL domain tests. LayoutTests: * fast/encoding/idn-security.html: Move some characters with changed IDN encodings to inside the check for old ICU. * fast/url/idna2003-expected.txt: * fast/url/idna2008-expected.txt: Update expected results. We are now more compliant with IDN2008. Canonical link: https://commits.webkit.org/182613@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-18 22:47:24 +00:00
static const UIDNA& internationalDomainNameTranscoder();
Clean up old URL parser remnants https://bugs.webkit.org/show_bug.cgi?id=179573 Reviewed by Darin Adler. LayoutTests/imported/w3c: * web-platform-tests/url/url-setters-expected.txt: We're more spec compliant! Hooray! Source/WebCore: When we transitioned to the new URLParser, we kept the old character tables which were less spec-conformant. Removing them and transitioning to URLParser's table makes more web platform tests pass! * fileapi/BlobURL.cpp: (WebCore::BlobURL::createBlobURL): There's no need to percent-encode an origin. It's already ascii, and if it's not, then the URLParser will escape it. * loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::createFileURL): Removed comment that no longer applies. * platform/URL.cpp: (WebCore::URL::setProtocol): (WebCore::percentEncodeCharacters): (WebCore::URL::setUser): (WebCore::URL::setPass): Percent encode the userinfo character set from the URLParser according to https://url.spec.whatwg.org/#set-the-username and https://url.spec.whatwg.org/#set-the-password (WebCore::URL::setPath): A ? or a # are the only two characters that need to be pre-encoded when setting the path because they indicate the beginning of a query or fragment. All other characters will be encoded if necessary during parsing. (WebCore::protocolIsInternal): (): Deleted. (WebCore::isSchemeFirstChar): Deleted. (WebCore::isSchemeChar): Deleted. (WebCore::isBadChar): Deleted. (WebCore::isTabNewline): Deleted. (WebCore::appendEscapedChar): Deleted. (WebCore::encodeWithURLEscapeSequences): Encode characters needed. I used the user info set of characters because that was most similar to the BadChar set of the old parser. This isn't standardized, and it's only used for the search context menu item which certainly isn't standardized. (WebCore::isValidProtocol): Deleted. Remove a bunch of old unused functions. * platform/URLParser.cpp: (WebCore::URLParser::isInUserInfoEncodeSet): (WebCore::URLParser::parseAuthority): * platform/URLParser.h: Expose a few functions for URL.cpp to use. Source/WebKit: * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: (WebKit::WebContextMenuClient::searchWithGoogle): Use https if we do end up searching with google. Source/WebKitLegacy/win: * WebCoreSupport/WebContextMenuClient.cpp: (WebContextMenuClient::searchWithGoogle): Use https if we do end up searching with google. Canonical link: https://commits.webkit.org/195708@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-14 19:15:23 +00:00
static bool isInUserInfoEncodeSet(UChar);
Support IDN2008 with UTS #46 instead of IDN2003 https://bugs.webkit.org/show_bug.cgi?id=144194 Reviewed by Darin Adler. Source/WebCore: Use uidna_nameToASCII instead of the deprecated uidna_IDNToASCII. It uses IDN2008 instead of IDN2003, and it uses UTF #46 when used with a UIDNA opened with uidna_openUTS46. This follows https://url.spec.whatwg.org/#concept-domain-to-ascii except we do not use Transitional_Processing to prevent homograph attacks on german domain names with "ß" and "ss" in them. These are now treated as separate domains. Firefox also doesn't use Transitional_Processing. Chrome and the current specification use Transitional_processing, but https://github.com/whatwg/url/issues/110 might change the spec. In addition, http://unicode.org/reports/tr46/ says: "implementations are encouraged to apply the Bidi and ContextJ validity criteria" Bidi checks prevent domain names with bidirectional text, such as latin and hebrew characters in the same domain. Chrome and Firefox do this. ContextJ checks prevent code points such as U+200D, which is a zero-width joiner which users would not see when looking at the domain name. Firefox currently enables ContextJ checks and it is suggested by UTS #46, so we'll do it. ContextO checks, which we do not use and neither does any other browser nor the spec, would fail if a domain contains code points such as U+30FB, which looks somewhat like a dot. We can investigate enabling these checks later. Covered by new API tests and rebased LayoutTests. The new API tests verify that we do not use transitional processing, that we do apply the Bidi and ContextJ checks, but not ContextO checks. * platform/URLParser.cpp: (WebCore::URLParser::domainToASCII): (WebCore::URLParser::internationalDomainNameTranscoder): * platform/URLParser.h: * platform/mac/WebCoreNSURLExtras.mm: (WebCore::mapHostNameWithRange): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): Add some tests from http://unicode.org/faq/idn.html verifying that we follow UTS46's deviations from IDN2008. Add some tests based on https://tools.ietf.org/html/rfc5893 verifying that we check for bidirectional text. Add a test based on https://tools.ietf.org/html/rfc5892 verifying that we do not do ContextO check. Add a test for U+321D and U+321E which have particularly interesting punycode encodings. We match Firefox here now. Also add a test from http://www.unicode.org/reports/tr46/#IDNAComparison verifying we are not using IDN2003. We should consider importing all of http://www.unicode.org/Public/idna/9.0.0/IdnaTest.txt as URL domain tests. LayoutTests: * fast/encoding/idn-security.html: Move some characters with changed IDN encodings to inside the check for old ICU. * fast/url/idna2003-expected.txt: * fast/url/idna2008-expected.txt: Update expected results. We are now more compliant with IDN2008. Canonical link: https://commits.webkit.org/182613@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-18 22:47:24 +00:00
Remove WTF::Optional synonym for std::optional, using that class template directly instead https://bugs.webkit.org/show_bug.cgi?id=226433 Reviewed by Chris Dumez. Source/JavaScriptCore: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. * inspector/scripts/codegen/generate_objc_protocol_types_implementation.py: (ObjCProtocolTypesImplementationGenerator._generate_init_method_for_payload): Use auto instead of Optional<>. Also use * instead of value() and nest the definition of the local inside an if statement in the case where it's an optional. * inspector/scripts/tests/expected/*: Regenerated these results. Source/WebCore: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebCore/PAL: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebDriver: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebKit: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. * Scripts/webkit/tests: Regenerated expected results, by running the command "python Scripts/webkit/messages_unittest.py -r". (How am I supposed to know to do that?) Source/WebKitLegacy/ios: * WebCoreSupport/WebChromeClientIOS.h: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebKitLegacy/mac: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebKitLegacy/win: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WTF: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. * wtf/Optional.h: Remove WTF::Optional. Tools: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Canonical link: https://commits.webkit.org/238290@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-30 16:11:40 +00:00
static std::optional<uint16_t> defaultPortForProtocol(StringView);
URLParser should parse URLs without credentials https://bugs.webkit.org/show_bug.cgi?id=160913 Reviewed by Brady Eidson. Source/WebCore: When parsing a URL, after the scheme we do not know if we are parsing a username and password or if we are parsing the host until we hit a '@' indicating the end of the credentials or a /, ?, or # indicating the end of the host. Because there are significantly different rules for serializing usernames, passwords, and hosts (all of which have yet to be implemented in URLParser) we put the code points after the scheme in a special buffer that will be processed once we know what we are parsing. In the future, this could be optimized by assuming that we are parsing the host and if we encounter a '@' character, then do some extra work. This would save us the effort of copying the host twice because most URLs don't have credentials. This is covered by a new URLParser API test. * platform/Logging.h: * platform/URLParser.cpp: (WebCore::isC0Control): (WebCore::isC0ControlOrSpace): (WebCore::isTabOrNewline): (WebCore::isSpecialScheme): (WebCore::URLParser::parse): (WebCore::URLParser::authorityEndReached): (WebCore::URLParser::hostEndReached): (WebCore::URLParser::allValuesEqual): (WebCore::isASCIIDigit): Deleted. (WebCore::isASCIIAlpha): Deleted. (WebCore::isASCIIAlphanumeric): Deleted. * platform/URLParser.h: (WebCore::URLParser::parse): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::s): (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/179040@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-17 00:41:30 +00:00
private:
Move URL from WebCore to WTF 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. Canonical link: https://commits.webkit.org/206915@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-12-01 03:28:36 +00:00
URLParser(const String&, const URL& = { }, const URLTextEncoding* = nullptr);
URL result() { return m_url; }
friend class URL;
URLParser should parse URLs without credentials https://bugs.webkit.org/show_bug.cgi?id=160913 Reviewed by Brady Eidson. Source/WebCore: When parsing a URL, after the scheme we do not know if we are parsing a username and password or if we are parsing the host until we hit a '@' indicating the end of the credentials or a /, ?, or # indicating the end of the host. Because there are significantly different rules for serializing usernames, passwords, and hosts (all of which have yet to be implemented in URLParser) we put the code points after the scheme in a special buffer that will be processed once we know what we are parsing. In the future, this could be optimized by assuming that we are parsing the host and if we encounter a '@' character, then do some extra work. This would save us the effort of copying the host twice because most URLs don't have credentials. This is covered by a new URLParser API test. * platform/Logging.h: * platform/URLParser.cpp: (WebCore::isC0Control): (WebCore::isC0ControlOrSpace): (WebCore::isTabOrNewline): (WebCore::isSpecialScheme): (WebCore::URLParser::parse): (WebCore::URLParser::authorityEndReached): (WebCore::URLParser::hostEndReached): (WebCore::URLParser::allValuesEqual): (WebCore::isASCIIDigit): Deleted. (WebCore::isASCIIAlpha): Deleted. (WebCore::isASCIIAlphanumeric): Deleted. * platform/URLParser.h: (WebCore::URLParser::parse): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::s): (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/179040@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-17 00:41:30 +00:00
URL m_url;
Strings should not be allocated in a gigacage https://bugs.webkit.org/show_bug.cgi?id=185218 Reviewed by Saam Barati. Source/bmalloc: This removes the string gigacage. Putting strings in a gigacage prevents read gadgets. The other things that get to be in gigacages are there to prevent read-write gadgets. Also, putting strings in a gigacage seems to have been a bigger regression than putting other things in gigacages. Therefore, to maximize the benefit/cost ratio of gigacages, we should evict strings from them. If we want to throw away perf for security, there are more beneficial things to sacrifice. * bmalloc/Gigacage.h: (Gigacage::name): (Gigacage::basePtr): (Gigacage::size): (Gigacage::forEachKind): * bmalloc/HeapKind.h: (bmalloc::isGigacage): (bmalloc::gigacageKind): (bmalloc::heapKind): (bmalloc::isActiveHeapKindAfterEnsuringGigacage): (bmalloc::mapToActiveHeapKindAfterEnsuringGigacage): Source/JavaScriptCore: * runtime/JSBigInt.cpp: (JSC::JSBigInt::toStringGeneric): * runtime/JSString.cpp: (JSC::JSRopeString::resolveRopeToAtomicString const): (JSC::JSRopeString::resolveRope const): * runtime/JSString.h: (JSC::JSString::create): (JSC::JSString::createHasOtherOwner): * runtime/VM.h: (JSC::VM::gigacageAuxiliarySpace): Source/WebCore: No new tests because no new behavior. * Modules/indexeddb/server/IDBSerialization.cpp: (WebCore::decodeKey): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneDeserializer::readString): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::normalizeSpaces): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemainingWhitespace): * platform/URLParser.cpp: (WebCore::percentEncodeByte): (WebCore::serializeURLEncodedForm): (WebCore::URLParser::serialize): * platform/URLParser.h: * platform/graphics/FourCC.cpp: (WebCore::FourCC::toString const): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::ReplicaState::cloneID const): * platform/text/LocaleICU.cpp: (WebCore::LocaleICU::decimalSymbol): (WebCore::LocaleICU::decimalTextAttribute): (WebCore::getDateFormatPattern): (WebCore::LocaleICU::createLabelVector): (WebCore::getFormatForSkeleton): * platform/win/FileSystemWin.cpp: (WebCore::FileSystem::getFinalPathName): (WebCore::FileSystem::pathByAppendingComponent): (WebCore::FileSystem::storageDirectory): Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/Deque.h: * wtf/Forward.h: * wtf/Gigacage.h: (Gigacage::name): (Gigacage::basePtr): * wtf/Vector.h: (WTF::VectorBufferBase::allocateBuffer): (WTF::VectorBufferBase::tryAllocateBuffer): (WTF::VectorBufferBase::reallocateBuffer): (WTF::VectorBufferBase::deallocateBuffer): (WTF::minCapacity>::Vector): (WTF::=): (WTF::minCapacity>::contains const): (WTF::minCapacity>::findMatching const): (WTF::minCapacity>::find const): (WTF::minCapacity>::reverseFind const): (WTF::minCapacity>::appendIfNotContains): (WTF::minCapacity>::fill): (WTF::minCapacity>::appendRange): (WTF::minCapacity>::expandCapacity): (WTF::minCapacity>::tryExpandCapacity): (WTF::minCapacity>::resize): (WTF::minCapacity>::resizeToFit): (WTF::minCapacity>::shrink): (WTF::minCapacity>::grow): (WTF::minCapacity>::asanSetInitialBufferSizeTo): (WTF::minCapacity>::asanSetBufferSizeToFullCapacity): (WTF::minCapacity>::asanBufferSizeWillChangeTo): (WTF::minCapacity>::reserveCapacity): (WTF::minCapacity>::tryReserveCapacity): (WTF::minCapacity>::reserveInitialCapacity): (WTF::minCapacity>::shrinkCapacity): (WTF::minCapacity>::append): (WTF::minCapacity>::tryAppend): (WTF::minCapacity>::constructAndAppend): (WTF::minCapacity>::tryConstructAndAppend): (WTF::minCapacity>::appendSlowCase): (WTF::minCapacity>::constructAndAppendSlowCase): (WTF::minCapacity>::tryConstructAndAppendSlowCase): (WTF::minCapacity>::uncheckedAppend): (WTF::minCapacity>::appendVector): (WTF::minCapacity>::insert): (WTF::minCapacity>::insertVector): (WTF::minCapacity>::remove): (WTF::minCapacity>::removeFirst): (WTF::minCapacity>::removeFirstMatching): (WTF::minCapacity>::removeAll): (WTF::minCapacity>::removeAllMatching): (WTF::minCapacity>::reverse): (WTF::minCapacity>::map const): (WTF::minCapacity>::releaseBuffer): (WTF::minCapacity>::checkConsistency): (WTF::swap): (WTF::operator==): (WTF::operator!=): (WTF::removeRepeatedElements): (WTF::Malloc>::Vector): Deleted. (WTF::Malloc>::contains const): Deleted. (WTF::Malloc>::findMatching const): Deleted. (WTF::Malloc>::find const): Deleted. (WTF::Malloc>::reverseFind const): Deleted. (WTF::Malloc>::appendIfNotContains): Deleted. (WTF::Malloc>::fill): Deleted. (WTF::Malloc>::appendRange): Deleted. (WTF::Malloc>::expandCapacity): Deleted. (WTF::Malloc>::tryExpandCapacity): Deleted. (WTF::Malloc>::resize): Deleted. (WTF::Malloc>::resizeToFit): Deleted. (WTF::Malloc>::shrink): Deleted. (WTF::Malloc>::grow): Deleted. (WTF::Malloc>::asanSetInitialBufferSizeTo): Deleted. (WTF::Malloc>::asanSetBufferSizeToFullCapacity): Deleted. (WTF::Malloc>::asanBufferSizeWillChangeTo): Deleted. (WTF::Malloc>::reserveCapacity): Deleted. (WTF::Malloc>::tryReserveCapacity): Deleted. (WTF::Malloc>::reserveInitialCapacity): Deleted. (WTF::Malloc>::shrinkCapacity): Deleted. (WTF::Malloc>::append): Deleted. (WTF::Malloc>::tryAppend): Deleted. (WTF::Malloc>::constructAndAppend): Deleted. (WTF::Malloc>::tryConstructAndAppend): Deleted. (WTF::Malloc>::appendSlowCase): Deleted. (WTF::Malloc>::constructAndAppendSlowCase): Deleted. (WTF::Malloc>::tryConstructAndAppendSlowCase): Deleted. (WTF::Malloc>::uncheckedAppend): Deleted. (WTF::Malloc>::appendVector): Deleted. (WTF::Malloc>::insert): Deleted. (WTF::Malloc>::insertVector): Deleted. (WTF::Malloc>::remove): Deleted. (WTF::Malloc>::removeFirst): Deleted. (WTF::Malloc>::removeFirstMatching): Deleted. (WTF::Malloc>::removeAll): Deleted. (WTF::Malloc>::removeAllMatching): Deleted. (WTF::Malloc>::reverse): Deleted. (WTF::Malloc>::map const): Deleted. (WTF::Malloc>::releaseBuffer): Deleted. (WTF::Malloc>::checkConsistency): Deleted. * wtf/text/AtomicStringImpl.h: * wtf/text/CString.cpp: (WTF::CStringBuffer::createUninitialized): * wtf/text/CString.h: * wtf/text/StringBuffer.h: (WTF::StringBuffer::StringBuffer): (WTF::StringBuffer::~StringBuffer): (WTF::StringBuffer::resize): * wtf/text/StringImpl.cpp: (WTF::StringImpl::~StringImpl): (WTF::StringImpl::destroy): (WTF::StringImpl::createUninitializedInternalNonEmpty): (WTF::StringImpl::reallocateInternal): (WTF::StringImpl::releaseAssertCaged const): Deleted. * wtf/text/StringImpl.h: (WTF::StringImpl::createSubstringSharingImpl): (WTF::StringImpl::tryCreateUninitialized): (WTF::StringImpl::adopt): (WTF::StringImpl::assertCaged const): Deleted. * wtf/text/StringMalloc.cpp: Removed. * wtf/text/StringMalloc.h: Removed. * wtf/text/StringVector.h: Removed. * wtf/text/SymbolImpl.h: * wtf/text/UniquedStringImpl.h: * wtf/text/WTFString.h: (WTF::String::adopt): (WTF::String::assertCaged const): Deleted. (WTF::String::releaseAssertCaged const): Deleted. Canonical link: https://commits.webkit.org/200770@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-05-04 00:40:18 +00:00
Vector<LChar> m_asciiBuffer;
bool m_urlIsSpecial { false };
bool m_urlIsFile { false };
bool m_hostHasPercentOrNonASCII { false };
Fix some whitespace handling issues in URL setters https://bugs.webkit.org/show_bug.cgi?id=227806 Patch by Alex Christensen <achristensen@webkit.org> on 2021-07-08 Reviewed by Chris Dumez. LayoutTests/imported/w3c: * web-platform-tests/url/a-element-expected.txt: * web-platform-tests/url/a-element-xhtml-expected.txt: * web-platform-tests/url/url-setters-stripping.any-expected.txt: * web-platform-tests/url/url-setters-stripping.any.worker-expected.txt: Source/WebCore: Covered by newly passing wpt tests. * dom/Element.cpp: (WebCore::Element::getURLAttribute const): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::href const): Don't remove whitespace before giving to completeURL, which will do that for us if it's a valid URL. If it's not a valid URL, we want the original string, not the trimmed string. * html/URLDecomposition.cpp: (WebCore::parsePort): Parse ports more like the URLParser, which ignores tabs and newlines. Source/WTF: Setters should ignore tabs and newlines like the main parser does. The protocol setter is problematic, which I reported in https://github.com/whatwg/url/issues/620 * wtf/URL.cpp: (WTF::URL::setFragmentIdentifier): * wtf/URLParser.cpp: (WTF::URLParser::isSpecialScheme): (WTF::URLParser::parse): * wtf/URLParser.h: The URL.hash setter should allow trailing C0 and control characters, which we would otherwise trim. Rather than introduce a new parameter, use a sentinel value for when we need to do this. LayoutTests: Update some old tests that failed in Chrome and Firefox to pass in all browsers after this change. * fast/dom/DOMURL/set-href-attribute-port-expected.txt: * fast/dom/DOMURL/set-href-attribute-port.html: * fast/dom/HTMLAnchorElement/set-href-attribute-port-expected.txt: * fast/dom/HTMLAnchorElement/set-href-attribute-port.html: Canonical link: https://commits.webkit.org/239531@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-08 22:59:59 +00:00
bool m_didSeeSyntaxViolation { false };
Refactor URLParser https://bugs.webkit.org/show_bug.cgi?id=162511 Reviewed by Brady Eidson. Source/WebCore: Make the constructor take the parameters instead of URL::parse. Now we don't need to copy the input string on failure. Also, turn some static functions into methods so they will be able to access member variables. Covered by existing and new API tests. * platform/URL.cpp: (WebCore::URL::URL): (WebCore::URL::setProtocol): (WebCore::URL::setHost): (WebCore::URL::removePort): (WebCore::URL::setPort): (WebCore::URL::setHostAndPort): (WebCore::URL::setUser): (WebCore::URL::setPass): (WebCore::URL::setFragmentIdentifier): (WebCore::URL::removeFragmentIdentifier): (WebCore::URL::setQuery): (WebCore::URL::setPath): * platform/URLParser.cpp: (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::checkWindowsDriveLetter): (WebCore::URLParser::shouldCopyFileURL): (WebCore::URLParser::failure): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::incrementIteratorSkippingTabAndNewLine): Deleted. (WebCore::isWindowsDriveLetter): Deleted. (WebCore::checkWindowsDriveLetter): Deleted. (WebCore::shouldCopyFileURL): Deleted. * platform/URLParser.h: (WebCore::URLParser::URLParser): (WebCore::URLParser::result): (WebCore::URLParser::parse): Deleted. * platform/cf/URLCF.cpp: (WebCore::URL::URL): Drive-by fix: Actually assign the URL to be the result of parsing. * platform/mac/URLMac.mm: (WebCore::URL::URL): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): (TestWebKitAPI::checkURL): Canonical link: https://commits.webkit.org/180458@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-23 20:58:03 +00:00
String m_inputString;
Refactor URLParser https://bugs.webkit.org/show_bug.cgi?id=162518 Reviewed by Brady Eidson. Use a helper function to determine the currentPosition instead of always determining position based on the size of the buffer. Soon there will be nothing in the buffer in the common case where there are no syntax errors. Also make more static functions into methods. Give IPv6Addresses and IPv4Addresses names. Start adding syntaxError stubs. No change in behavior. Covered by API tests. * platform/URLParser.cpp: (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendToASCIIBuffer): (WebCore::URLParser::syntaxError): (WebCore::URLParser::currentPosition): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::URLParser::parseAuthority): (WebCore::URLParser::appendNumberToASCIIBuffer): (WebCore::URLParser::serializeIPv4): (WebCore::URLParser::serializeIPv6Piece): (WebCore::URLParser::serializeIPv6): (WebCore::URLParser::parseIPv4Host): (WebCore::URLParser::parseIPv6Host): (WebCore::URLParser::parsePort): (WebCore::URLParser::parseHostAndPort): (WebCore::append): Deleted. (WebCore::serializeIPv4): Deleted. (WebCore::serializeIPv6Piece): Deleted. (WebCore::serializeIPv6): Deleted. (WebCore::parseIPv4Host): Deleted. (WebCore::parseIPv6Host): Deleted. * platform/URLParser.h: Canonical link: https://commits.webkit.org/180466@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-23 23:40:46 +00:00
const void* m_inputBegin { nullptr };
Use some C++17 features https://bugs.webkit.org/show_bug.cgi?id=185135 Reviewed by Alex Christensen. .: As discussed here [0] let's move WebKit to a subset of C++17. We now require GCC 6 [1] which means that, according to [2] we can use the following C++17 language features (I removed some uninteresting ones): - New auto rules for direct-list-initialization - static_assert with no message - typename in a template template parameter - Nested namespace definition - Attributes for namespaces and enumerators - u8 character literals - Allow constant evaluation for all non-type template arguments - Fold Expressions - Unary fold expressions and empty parameter packs - __has_include in preprocessor conditional - Differing begin and end types in range-based for - Improving std::pair and std::tuple Consult the Tony Tables [3] to see before / after examples. Of course we can use any library feature if we're willing to import them to WTF (and they don't require language support). [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html [1]: https://trac.webkit.org/changeset/231152/webkit [2]: https://en.cppreference.com/w/cpp/compiler_support [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md * Source/cmake/WebKitCompilerFlags.cmake: Source/WebCore: As discussed here [0] let's move WebKit to a subset of C++17. We now require GCC 6 [1] which means that, according to [2] we can use the following C++17 language features (I removed some uninteresting ones): - New auto rules for direct-list-initialization - static_assert with no message - typename in a template template parameter - Nested namespace definition - Attributes for namespaces and enumerators - u8 character literals - Allow constant evaluation for all non-type template arguments - Fold Expressions - Unary fold expressions and empty parameter packs - __has_include in preprocessor conditional - Differing begin and end types in range-based for - Improving std::pair and std::tuple Consult the Tony Tables [3] to see before / after examples. Of course we can use any library feature if we're willing to import them to WTF (and they don't require language support). [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html [1]: https://trac.webkit.org/changeset/231152/webkit [2]: https://en.cppreference.com/w/cpp/compiler_support [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md * DerivedSources.make: * platform/URLParser.cpp: work around an odd GCC 6 bug with class static value as a template parameter. (WebCore::URLParser::percentDecode): (WebCore::URLParser::domainToASCII): (WebCore::URLParser::hasForbiddenHostCodePoint): (WebCore::URLParser::parseHostAndPort): * platform/URLParser.h: Source/WebKit: As discussed here [0] let's move WebKit to a subset of C++17. We now require GCC 6 [1] which means that, according to [2] we can use the following C++17 language features (I removed some uninteresting ones): - New auto rules for direct-list-initialization - static_assert with no message - typename in a template template parameter - Nested namespace definition - Attributes for namespaces and enumerators - u8 character literals - Allow constant evaluation for all non-type template arguments - Fold Expressions - Unary fold expressions and empty parameter packs - __has_include in preprocessor conditional - Differing begin and end types in range-based for - Improving std::pair and std::tuple Consult the Tony Tables [3] to see before / after examples. Of course we can use any library feature if we're willing to import them to WTF (and they don't require language support). [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html [1]: https://trac.webkit.org/changeset/231152/webkit [2]: https://en.cppreference.com/w/cpp/compiler_support [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md * Configurations/Base.xcconfig: * DerivedSources.make: * PlatformMac.cmake: Source/WebKitLegacy: * PlatformMac.cmake: Source/WebKitLegacy/mac: * Configurations/WebKitLegacy.xcconfig: Source/WTF: * wtf/StdLibExtras.h: libstdc++ doesn't say it's C++17 when it defines std::conjunction. Use the feature test macro instead. Tools: * DumpRenderTree/PlatformMac.cmake: * gtk/ycm_extra_conf.py: (FlagsForFile): Canonical link: https://commits.webkit.org/200630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-04-30 21:17:59 +00:00
static constexpr size_t defaultInlineBufferSize = 2048;
using LCharBuffer = Vector<LChar, defaultInlineBufferSize>;
Use efficient iterators in URLParser https://bugs.webkit.org/show_bug.cgi?id=162007 Reviewed by Tim Horton. URLParser used to use StringView::CodePoints::Iterator, which needs to check if the StringView is 8-bit or 16-bit every time it does anything. I wrote a new CodePointIterator template which already knows whether it is iterating 8-bit or 16-bit characters, so it does not need to do the checks each time it gets a code point or advances to the next code point. No change in behavior except a performance increase. Covered by existing tests. * platform/URLParser.cpp: (WebCore::CodePointIterator::CodePointIterator): (WebCore::CodePointIterator::operator==): (WebCore::CodePointIterator::operator!=): (WebCore::CodePointIterator::operator=): (WebCore::CodePointIterator::atEnd): (WebCore::CodePointIterator<LChar>::operator): (WebCore::CodePointIterator<UChar>::operator): (WebCore::isWindowsDriveLetter): (WebCore::shouldCopyFileURL): (WebCore::isPercentEncodedDot): (WebCore::isSingleDotPathSegment): (WebCore::isDoubleDotPathSegment): (WebCore::consumeSingleDotPathSegment): (WebCore::consumeDoubleDotPathSegment): (WebCore::URLParser::failure): (WebCore::URLParser::parse): (WebCore::URLParser::parseAuthority): (WebCore::parseIPv4Number): (WebCore::parseIPv4Host): (WebCore::parseIPv6Host): (WebCore::URLParser::parsePort): (WebCore::URLParser::parseHost): * platform/URLParser.h: Canonical link: https://commits.webkit.org/180162@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-15 18:12:09 +00:00
URLParser should use TextEncoding through an abstract class https://bugs.webkit.org/show_bug.cgi?id=190027 Reviewed by Andy Estes. Source/WebCore: URLParser uses TextEncoding for one call to encode, which is only used for encoding the query of URLs in documents with non-UTF encodings. There are 3 call sites that specify the TextEncoding to use from the Document, and even those call sites use a UTF encoding most of the time. All other URL parsing is done using a well-optimized path which assumes UTF-8 encoding and uses macros from ICU headers, not a TextEncoding. Moving the logic in this way breaks URL and URLParser's dependency on TextEncoding, which makes it possible to use in a lower-level project without also moving TextEncoding, TextCodec, TextCodecICU, ThreadGlobalData, and the rest of WebCore and JavaScriptCore. There is no observable change in behavior. There is now one virtual function call in a code path in URLParser that is not performance-sensitive, and TextEncodings now have a vtable, which uses a few more bytes of memory total for WebKit. * css/parser/CSSParserContext.h: (WebCore::CSSParserContext::completeURL const): * css/parser/CSSParserIdioms.cpp: (WebCore::completeURL): * dom/Document.cpp: (WebCore::Document::completeURL const): * html/HTMLBaseElement.cpp: (WebCore::HTMLBaseElement::href const): Move the call to encodingForFormSubmission from the URL constructor to the 3 call sites that specify the encoding from the Document. * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::encodingForURLParsing): * loader/TextResourceDecoder.h: * platform/URL.cpp: (WebCore::URL::URL): * platform/URL.h: (WebCore::URLTextEncoding::~URLTextEncoding): * platform/URLParser.cpp: (WebCore::URLParser::encodeNonUTF8Query): (WebCore::URLParser::copyURLPartsUntil): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::URLParser::encodeQuery): Deleted. A pointer replaces the boolean isUTF8Encoding and the TextEncoding& which had a default value of UTF8Encoding. Now the pointer being null means that we use UTF8, and the pointer being non-null means we use that encoding. * platform/URLParser.h: (WebCore::URLParser::URLParser): * platform/text/TextEncoding.cpp: (WebCore::UTF7Encoding): (WebCore::TextEncoding::encodingForFormSubmissionOrURLParsing const): (WebCore::ASCIIEncoding): (WebCore::Latin1Encoding): (WebCore::UTF16BigEndianEncoding): (WebCore::UTF16LittleEndianEncoding): (WebCore::UTF8Encoding): (WebCore::WindowsLatin1Encoding): (WebCore::TextEncoding::encodingForFormSubmission const): Deleted. Use NeverDestroyed because TextEncoding now has a virtual destructor. * platform/text/TextEncoding.h: Rename encodingForFormSubmission to encodingForFormSubmissionOrURLParsing to make it more clear that we are intentionally using it for both. Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/205005@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-27 20:05:52 +00:00
template<typename CharacterType> void parse(const CharacterType*, const unsigned length, const URL&, const URLTextEncoding*);
template<typename CharacterType> void parseAuthority(CodePointIterator<CharacterType>);
template<typename CharacterType> bool parseHostAndPort(CodePointIterator<CharacterType>);
template<typename CharacterType> bool parsePort(CodePointIterator<CharacterType>&);
Refactor URLParser https://bugs.webkit.org/show_bug.cgi?id=162511 Reviewed by Brady Eidson. Source/WebCore: Make the constructor take the parameters instead of URL::parse. Now we don't need to copy the input string on failure. Also, turn some static functions into methods so they will be able to access member variables. Covered by existing and new API tests. * platform/URL.cpp: (WebCore::URL::URL): (WebCore::URL::setProtocol): (WebCore::URL::setHost): (WebCore::URL::removePort): (WebCore::URL::setPort): (WebCore::URL::setHostAndPort): (WebCore::URL::setUser): (WebCore::URL::setPass): (WebCore::URL::setFragmentIdentifier): (WebCore::URL::removeFragmentIdentifier): (WebCore::URL::setQuery): (WebCore::URL::setPath): * platform/URLParser.cpp: (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::checkWindowsDriveLetter): (WebCore::URLParser::shouldCopyFileURL): (WebCore::URLParser::failure): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::incrementIteratorSkippingTabAndNewLine): Deleted. (WebCore::isWindowsDriveLetter): Deleted. (WebCore::checkWindowsDriveLetter): Deleted. (WebCore::shouldCopyFileURL): Deleted. * platform/URLParser.h: (WebCore::URLParser::URLParser): (WebCore::URLParser::result): (WebCore::URLParser::parse): Deleted. * platform/cf/URLCF.cpp: (WebCore::URL::URL): Drive-by fix: Actually assign the URL to be the result of parsing. * platform/mac/URLMac.mm: (WebCore::URL::URL): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): (TestWebKitAPI::checkURL): Canonical link: https://commits.webkit.org/180458@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-23 20:58:03 +00:00
void failure();
URLParser should ignore tabs at all possible locations https://bugs.webkit.org/show_bug.cgi?id=162711 Reviewed by Tim Horton. Source/WebCore: The URL spec says to remove all tabs and newlines before parsing a URL. To reduce passes on the URL and copies of data, I chose to just ignore them every time I increment the iterator. This is fragile, but faster. It can be completely tested, though. That is what this patch does. Covered by an addition to the API tests that tries inserting one tab at each location of each test. * platform/URLParser.cpp: (WebCore::URLParser::advance): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendWindowsDriveLetter): (WebCore::URLParser::isPercentEncodedDot): (WebCore::URLParser::isSingleDotPathSegment): (WebCore::URLParser::isDoubleDotPathSegment): (WebCore::URLParser::consumeSingleDotPathSegment): (WebCore::URLParser::consumeDoubleDotPathSegment): (WebCore::URLParser::checkLocalhostCodePoint): (WebCore::URLParser::isAtLocalhost): (WebCore::URLParser::isLocalhost): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::isPercentEncodedDot): Deleted. (WebCore::isSingleDotPathSegment): Deleted. (WebCore::isDoubleDotPathSegment): Deleted. (WebCore::consumeSingleDotPathSegment): Deleted. (WebCore::consumeDoubleDotPathSegment): Deleted. * platform/URLParser.h: (WebCore::URLParser::advance): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::ExpectedParts::isInvalid): (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/180674@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-29 18:18:04 +00:00
enum class ReportSyntaxViolation { No, Yes };
template<typename CharacterType, ReportSyntaxViolation reportSyntaxViolation = ReportSyntaxViolation::Yes>
void advance(CodePointIterator<CharacterType>& iterator) { advance<CharacterType, reportSyntaxViolation>(iterator, iterator); }
template<typename CharacterType, ReportSyntaxViolation = ReportSyntaxViolation::Yes>
void advance(CodePointIterator<CharacterType>&, const CodePointIterator<CharacterType>& iteratorForSyntaxViolationPosition);
template<typename CharacterType> bool takesTwoAdvancesUntilEnd(CodePointIterator<CharacterType>);
Implement URLParser::syntaxViolation https://bugs.webkit.org/show_bug.cgi?id=162593 Reviewed by Geoffrey Garen. Source/WebCore: Most of the time when parsing URLs, we just look at the URL, find offsets of the host, path, query, etc., and the String can be used untouched. When this happens, we do not want to allocate and copy the String. We want to just add a reference to an existing String. Sometimes we need to canonicalize the String because there has been a syntaxViolation, defined as any String that is different than its canonicalized URL String. In such cases we need to allocate a new String and fill it with the canonicalized URL String. When a syntaxViolation happens for the first time, we know that everything in the input String up to that point is equal to what it would have been if we had canonicalized the beginning of the URL, copy it into a buffer, and continue parsing in a mode where instead of just looking at the input URL String, we canonicalize each code point into the buffer. Changes to behavior involve additional spec compliance with tabs and newlines in different places in URLs, as well as additional spec compliance when parsing empty and null URLs relative to other URLs. Both are covered by new API tests. Existing behavior covered by existing API tests. This is about a 15% speed improvement on my URL parsing benchmark. * platform/URL.cpp: (WebCore::assertProtocolIsGood): (WebCore::URL::protocolIs): (WebCore::protocolIs): * platform/URL.h: * platform/URLParser.cpp: (WebCore::isTabOrNewline): (WebCore::URLParser::incrementIteratorSkippingTabsAndNewlines): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendToASCIIBuffer): (WebCore::URLParser::checkWindowsDriveLetter): (WebCore::URLParser::shouldCopyFileURL): (WebCore::URLParser::utf8PercentEncode): (WebCore::URLParser::utf8QueryEncode): (WebCore::URLParser::copyURLPartsUntil): (WebCore::URLParser::syntaxViolation): (WebCore::URLParser::fragmentSyntaxViolation): (WebCore::URLParser::parsedDataView): (WebCore::URLParser::currentPosition): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::URLParser::parseAuthority): (WebCore::URLParser::parseIPv4Number): (WebCore::URLParser::parseIPv4Host): (WebCore::URLParser::parseIPv6Host): (WebCore::URLParser::parsePort): (WebCore::URLParser::parseHostAndPort): (WebCore::serializeURLEncodedForm): (WebCore::URLParser::allValuesEqual): (WebCore::URLParser::internalValuesConsistent): (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): Deleted. (WebCore::URLParser::syntaxError): Deleted. (WebCore::parseIPv4Number): Deleted. * platform/URLParser.h: (WebCore::URLParser::incrementIteratorSkippingTabsAndNewlines): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/180569@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-27 20:07:15 +00:00
template<typename CharacterType> void syntaxViolation(const CodePointIterator<CharacterType>&);
URLParser should ignore tabs at all possible locations https://bugs.webkit.org/show_bug.cgi?id=162711 Reviewed by Tim Horton. Source/WebCore: The URL spec says to remove all tabs and newlines before parsing a URL. To reduce passes on the URL and copies of data, I chose to just ignore them every time I increment the iterator. This is fragile, but faster. It can be completely tested, though. That is what this patch does. Covered by an addition to the API tests that tries inserting one tab at each location of each test. * platform/URLParser.cpp: (WebCore::URLParser::advance): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendWindowsDriveLetter): (WebCore::URLParser::isPercentEncodedDot): (WebCore::URLParser::isSingleDotPathSegment): (WebCore::URLParser::isDoubleDotPathSegment): (WebCore::URLParser::consumeSingleDotPathSegment): (WebCore::URLParser::consumeDoubleDotPathSegment): (WebCore::URLParser::checkLocalhostCodePoint): (WebCore::URLParser::isAtLocalhost): (WebCore::URLParser::isLocalhost): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::isPercentEncodedDot): Deleted. (WebCore::isSingleDotPathSegment): Deleted. (WebCore::isDoubleDotPathSegment): Deleted. (WebCore::consumeSingleDotPathSegment): Deleted. (WebCore::consumeDoubleDotPathSegment): Deleted. * platform/URLParser.h: (WebCore::URLParser::advance): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::ExpectedParts::isInvalid): (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/180674@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-29 18:18:04 +00:00
template<typename CharacterType> bool isPercentEncodedDot(CodePointIterator<CharacterType>);
Refactor URLParser https://bugs.webkit.org/show_bug.cgi?id=162511 Reviewed by Brady Eidson. Source/WebCore: Make the constructor take the parameters instead of URL::parse. Now we don't need to copy the input string on failure. Also, turn some static functions into methods so they will be able to access member variables. Covered by existing and new API tests. * platform/URL.cpp: (WebCore::URL::URL): (WebCore::URL::setProtocol): (WebCore::URL::setHost): (WebCore::URL::removePort): (WebCore::URL::setPort): (WebCore::URL::setHostAndPort): (WebCore::URL::setUser): (WebCore::URL::setPass): (WebCore::URL::setFragmentIdentifier): (WebCore::URL::removeFragmentIdentifier): (WebCore::URL::setQuery): (WebCore::URL::setPath): * platform/URLParser.cpp: (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::checkWindowsDriveLetter): (WebCore::URLParser::shouldCopyFileURL): (WebCore::URLParser::failure): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::incrementIteratorSkippingTabAndNewLine): Deleted. (WebCore::isWindowsDriveLetter): Deleted. (WebCore::checkWindowsDriveLetter): Deleted. (WebCore::shouldCopyFileURL): Deleted. * platform/URLParser.h: (WebCore::URLParser::URLParser): (WebCore::URLParser::result): (WebCore::URLParser::parse): Deleted. * platform/cf/URLCF.cpp: (WebCore::URL::URL): Drive-by fix: Actually assign the URL to be the result of parsing. * platform/mac/URLMac.mm: (WebCore::URL::URL): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): (TestWebKitAPI::checkURL): Canonical link: https://commits.webkit.org/180458@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-23 20:58:03 +00:00
template<typename CharacterType> bool isWindowsDriveLetter(CodePointIterator<CharacterType>);
URLParser should ignore tabs at all possible locations https://bugs.webkit.org/show_bug.cgi?id=162711 Reviewed by Tim Horton. Source/WebCore: The URL spec says to remove all tabs and newlines before parsing a URL. To reduce passes on the URL and copies of data, I chose to just ignore them every time I increment the iterator. This is fragile, but faster. It can be completely tested, though. That is what this patch does. Covered by an addition to the API tests that tries inserting one tab at each location of each test. * platform/URLParser.cpp: (WebCore::URLParser::advance): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendWindowsDriveLetter): (WebCore::URLParser::isPercentEncodedDot): (WebCore::URLParser::isSingleDotPathSegment): (WebCore::URLParser::isDoubleDotPathSegment): (WebCore::URLParser::consumeSingleDotPathSegment): (WebCore::URLParser::consumeDoubleDotPathSegment): (WebCore::URLParser::checkLocalhostCodePoint): (WebCore::URLParser::isAtLocalhost): (WebCore::URLParser::isLocalhost): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::isPercentEncodedDot): Deleted. (WebCore::isSingleDotPathSegment): Deleted. (WebCore::isDoubleDotPathSegment): Deleted. (WebCore::consumeSingleDotPathSegment): Deleted. (WebCore::consumeDoubleDotPathSegment): Deleted. * platform/URLParser.h: (WebCore::URLParser::advance): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::ExpectedParts::isInvalid): (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/180674@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-29 18:18:04 +00:00
template<typename CharacterType> bool isSingleDotPathSegment(CodePointIterator<CharacterType>);
template<typename CharacterType> bool isDoubleDotPathSegment(CodePointIterator<CharacterType>);
Refactor URLParser https://bugs.webkit.org/show_bug.cgi?id=162511 Reviewed by Brady Eidson. Source/WebCore: Make the constructor take the parameters instead of URL::parse. Now we don't need to copy the input string on failure. Also, turn some static functions into methods so they will be able to access member variables. Covered by existing and new API tests. * platform/URL.cpp: (WebCore::URL::URL): (WebCore::URL::setProtocol): (WebCore::URL::setHost): (WebCore::URL::removePort): (WebCore::URL::setPort): (WebCore::URL::setHostAndPort): (WebCore::URL::setUser): (WebCore::URL::setPass): (WebCore::URL::setFragmentIdentifier): (WebCore::URL::removeFragmentIdentifier): (WebCore::URL::setQuery): (WebCore::URL::setPath): * platform/URLParser.cpp: (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::checkWindowsDriveLetter): (WebCore::URLParser::shouldCopyFileURL): (WebCore::URLParser::failure): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::incrementIteratorSkippingTabAndNewLine): Deleted. (WebCore::isWindowsDriveLetter): Deleted. (WebCore::checkWindowsDriveLetter): Deleted. (WebCore::shouldCopyFileURL): Deleted. * platform/URLParser.h: (WebCore::URLParser::URLParser): (WebCore::URLParser::result): (WebCore::URLParser::parse): Deleted. * platform/cf/URLCF.cpp: (WebCore::URL::URL): Drive-by fix: Actually assign the URL to be the result of parsing. * platform/mac/URLMac.mm: (WebCore::URL::URL): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): (TestWebKitAPI::checkURL): Canonical link: https://commits.webkit.org/180458@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-23 20:58:03 +00:00
template<typename CharacterType> bool shouldCopyFileURL(CodePointIterator<CharacterType>);
URLParser should ignore tabs at all possible locations https://bugs.webkit.org/show_bug.cgi?id=162711 Reviewed by Tim Horton. Source/WebCore: The URL spec says to remove all tabs and newlines before parsing a URL. To reduce passes on the URL and copies of data, I chose to just ignore them every time I increment the iterator. This is fragile, but faster. It can be completely tested, though. That is what this patch does. Covered by an addition to the API tests that tries inserting one tab at each location of each test. * platform/URLParser.cpp: (WebCore::URLParser::advance): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendWindowsDriveLetter): (WebCore::URLParser::isPercentEncodedDot): (WebCore::URLParser::isSingleDotPathSegment): (WebCore::URLParser::isDoubleDotPathSegment): (WebCore::URLParser::consumeSingleDotPathSegment): (WebCore::URLParser::consumeDoubleDotPathSegment): (WebCore::URLParser::checkLocalhostCodePoint): (WebCore::URLParser::isAtLocalhost): (WebCore::URLParser::isLocalhost): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::isPercentEncodedDot): Deleted. (WebCore::isSingleDotPathSegment): Deleted. (WebCore::isDoubleDotPathSegment): Deleted. (WebCore::consumeSingleDotPathSegment): Deleted. (WebCore::consumeDoubleDotPathSegment): Deleted. * platform/URLParser.h: (WebCore::URLParser::advance): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::ExpectedParts::isInvalid): (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/180674@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-29 18:18:04 +00:00
template<typename CharacterType> bool checkLocalhostCodePoint(CodePointIterator<CharacterType>&, UChar32);
template<typename CharacterType> bool isAtLocalhost(CodePointIterator<CharacterType>);
bool isLocalhost(StringView);
template<typename CharacterType> void consumeSingleDotPathSegment(CodePointIterator<CharacterType>&);
template<typename CharacterType> void consumeDoubleDotPathSegment(CodePointIterator<CharacterType>&);
template<typename CharacterType> void appendWindowsDriveLetter(CodePointIterator<CharacterType>&);
Refactor URLParser https://bugs.webkit.org/show_bug.cgi?id=162518 Reviewed by Brady Eidson. Use a helper function to determine the currentPosition instead of always determining position based on the size of the buffer. Soon there will be nothing in the buffer in the common case where there are no syntax errors. Also make more static functions into methods. Give IPv6Addresses and IPv4Addresses names. Start adding syntaxError stubs. No change in behavior. Covered by API tests. * platform/URLParser.cpp: (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendToASCIIBuffer): (WebCore::URLParser::syntaxError): (WebCore::URLParser::currentPosition): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::URLParser::parseAuthority): (WebCore::URLParser::appendNumberToASCIIBuffer): (WebCore::URLParser::serializeIPv4): (WebCore::URLParser::serializeIPv6Piece): (WebCore::URLParser::serializeIPv6): (WebCore::URLParser::parseIPv4Host): (WebCore::URLParser::parseIPv6Host): (WebCore::URLParser::parsePort): (WebCore::URLParser::parseHostAndPort): (WebCore::append): Deleted. (WebCore::serializeIPv4): Deleted. (WebCore::serializeIPv6Piece): Deleted. (WebCore::serializeIPv6): Deleted. (WebCore::parseIPv4Host): Deleted. (WebCore::parseIPv6Host): Deleted. * platform/URLParser.h: Canonical link: https://commits.webkit.org/180466@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-23 23:40:46 +00:00
template<typename CharacterType> size_t currentPosition(const CodePointIterator<CharacterType>&);
template<typename UnsignedIntegerType> void appendNumberToASCIIBuffer(UnsignedIntegerType);
Implement URLParser::syntaxViolation https://bugs.webkit.org/show_bug.cgi?id=162593 Reviewed by Geoffrey Garen. Source/WebCore: Most of the time when parsing URLs, we just look at the URL, find offsets of the host, path, query, etc., and the String can be used untouched. When this happens, we do not want to allocate and copy the String. We want to just add a reference to an existing String. Sometimes we need to canonicalize the String because there has been a syntaxViolation, defined as any String that is different than its canonicalized URL String. In such cases we need to allocate a new String and fill it with the canonicalized URL String. When a syntaxViolation happens for the first time, we know that everything in the input String up to that point is equal to what it would have been if we had canonicalized the beginning of the URL, copy it into a buffer, and continue parsing in a mode where instead of just looking at the input URL String, we canonicalize each code point into the buffer. Changes to behavior involve additional spec compliance with tabs and newlines in different places in URLs, as well as additional spec compliance when parsing empty and null URLs relative to other URLs. Both are covered by new API tests. Existing behavior covered by existing API tests. This is about a 15% speed improvement on my URL parsing benchmark. * platform/URL.cpp: (WebCore::assertProtocolIsGood): (WebCore::URL::protocolIs): (WebCore::protocolIs): * platform/URL.h: * platform/URLParser.cpp: (WebCore::isTabOrNewline): (WebCore::URLParser::incrementIteratorSkippingTabsAndNewlines): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendToASCIIBuffer): (WebCore::URLParser::checkWindowsDriveLetter): (WebCore::URLParser::shouldCopyFileURL): (WebCore::URLParser::utf8PercentEncode): (WebCore::URLParser::utf8QueryEncode): (WebCore::URLParser::copyURLPartsUntil): (WebCore::URLParser::syntaxViolation): (WebCore::URLParser::fragmentSyntaxViolation): (WebCore::URLParser::parsedDataView): (WebCore::URLParser::currentPosition): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::URLParser::parseAuthority): (WebCore::URLParser::parseIPv4Number): (WebCore::URLParser::parseIPv4Host): (WebCore::URLParser::parseIPv6Host): (WebCore::URLParser::parsePort): (WebCore::URLParser::parseHostAndPort): (WebCore::serializeURLEncodedForm): (WebCore::URLParser::allValuesEqual): (WebCore::URLParser::internalValuesConsistent): (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): Deleted. (WebCore::URLParser::syntaxError): Deleted. (WebCore::parseIPv4Number): Deleted. * platform/URLParser.h: (WebCore::URLParser::incrementIteratorSkippingTabsAndNewlines): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/180569@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-27 20:07:15 +00:00
template<bool(*isInCodeSet)(UChar32), typename CharacterType> void utf8PercentEncode(const CodePointIterator<CharacterType>&);
template<typename CharacterType> void utf8QueryEncode(const CodePointIterator<CharacterType>&);
Remove WTF::Optional synonym for std::optional, using that class template directly instead https://bugs.webkit.org/show_bug.cgi?id=226433 Reviewed by Chris Dumez. Source/JavaScriptCore: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. * inspector/scripts/codegen/generate_objc_protocol_types_implementation.py: (ObjCProtocolTypesImplementationGenerator._generate_init_method_for_payload): Use auto instead of Optional<>. Also use * instead of value() and nest the definition of the local inside an if statement in the case where it's an optional. * inspector/scripts/tests/expected/*: Regenerated these results. Source/WebCore: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebCore/PAL: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebDriver: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebKit: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. * Scripts/webkit/tests: Regenerated expected results, by running the command "python Scripts/webkit/messages_unittest.py -r". (How am I supposed to know to do that?) Source/WebKitLegacy/ios: * WebCoreSupport/WebChromeClientIOS.h: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebKitLegacy/mac: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebKitLegacy/win: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WTF: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. * wtf/Optional.h: Remove WTF::Optional. Tools: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Canonical link: https://commits.webkit.org/238290@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-30 16:11:40 +00:00
template<typename CharacterType> std::optional<LCharBuffer> domainToASCII(StringImpl&, const CodePointIterator<CharacterType>& iteratorForSyntaxViolationPosition);
Use some C++17 features https://bugs.webkit.org/show_bug.cgi?id=185135 Reviewed by Alex Christensen. .: As discussed here [0] let's move WebKit to a subset of C++17. We now require GCC 6 [1] which means that, according to [2] we can use the following C++17 language features (I removed some uninteresting ones): - New auto rules for direct-list-initialization - static_assert with no message - typename in a template template parameter - Nested namespace definition - Attributes for namespaces and enumerators - u8 character literals - Allow constant evaluation for all non-type template arguments - Fold Expressions - Unary fold expressions and empty parameter packs - __has_include in preprocessor conditional - Differing begin and end types in range-based for - Improving std::pair and std::tuple Consult the Tony Tables [3] to see before / after examples. Of course we can use any library feature if we're willing to import them to WTF (and they don't require language support). [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html [1]: https://trac.webkit.org/changeset/231152/webkit [2]: https://en.cppreference.com/w/cpp/compiler_support [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md * Source/cmake/WebKitCompilerFlags.cmake: Source/WebCore: As discussed here [0] let's move WebKit to a subset of C++17. We now require GCC 6 [1] which means that, according to [2] we can use the following C++17 language features (I removed some uninteresting ones): - New auto rules for direct-list-initialization - static_assert with no message - typename in a template template parameter - Nested namespace definition - Attributes for namespaces and enumerators - u8 character literals - Allow constant evaluation for all non-type template arguments - Fold Expressions - Unary fold expressions and empty parameter packs - __has_include in preprocessor conditional - Differing begin and end types in range-based for - Improving std::pair and std::tuple Consult the Tony Tables [3] to see before / after examples. Of course we can use any library feature if we're willing to import them to WTF (and they don't require language support). [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html [1]: https://trac.webkit.org/changeset/231152/webkit [2]: https://en.cppreference.com/w/cpp/compiler_support [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md * DerivedSources.make: * platform/URLParser.cpp: work around an odd GCC 6 bug with class static value as a template parameter. (WebCore::URLParser::percentDecode): (WebCore::URLParser::domainToASCII): (WebCore::URLParser::hasForbiddenHostCodePoint): (WebCore::URLParser::parseHostAndPort): * platform/URLParser.h: Source/WebKit: As discussed here [0] let's move WebKit to a subset of C++17. We now require GCC 6 [1] which means that, according to [2] we can use the following C++17 language features (I removed some uninteresting ones): - New auto rules for direct-list-initialization - static_assert with no message - typename in a template template parameter - Nested namespace definition - Attributes for namespaces and enumerators - u8 character literals - Allow constant evaluation for all non-type template arguments - Fold Expressions - Unary fold expressions and empty parameter packs - __has_include in preprocessor conditional - Differing begin and end types in range-based for - Improving std::pair and std::tuple Consult the Tony Tables [3] to see before / after examples. Of course we can use any library feature if we're willing to import them to WTF (and they don't require language support). [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html [1]: https://trac.webkit.org/changeset/231152/webkit [2]: https://en.cppreference.com/w/cpp/compiler_support [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md * Configurations/Base.xcconfig: * DerivedSources.make: * PlatformMac.cmake: Source/WebKitLegacy: * PlatformMac.cmake: Source/WebKitLegacy/mac: * Configurations/WebKitLegacy.xcconfig: Source/WTF: * wtf/StdLibExtras.h: libstdc++ doesn't say it's C++17 when it defines std::conjunction. Use the feature test macro instead. Tools: * DumpRenderTree/PlatformMac.cmake: * gtk/ycm_extra_conf.py: (FlagsForFile): Canonical link: https://commits.webkit.org/200630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-04-30 21:17:59 +00:00
template<typename CharacterType> LCharBuffer percentDecode(const LChar*, size_t, const CodePointIterator<CharacterType>& iteratorForSyntaxViolationPosition);
static LCharBuffer percentDecode(const LChar*, size_t);
Remove WTF::Optional synonym for std::optional, using that class template directly instead https://bugs.webkit.org/show_bug.cgi?id=226433 Reviewed by Chris Dumez. Source/JavaScriptCore: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. * inspector/scripts/codegen/generate_objc_protocol_types_implementation.py: (ObjCProtocolTypesImplementationGenerator._generate_init_method_for_payload): Use auto instead of Optional<>. Also use * instead of value() and nest the definition of the local inside an if statement in the case where it's an optional. * inspector/scripts/tests/expected/*: Regenerated these results. Source/WebCore: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebCore/PAL: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebDriver: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebKit: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. * Scripts/webkit/tests: Regenerated expected results, by running the command "python Scripts/webkit/messages_unittest.py -r". (How am I supposed to know to do that?) Source/WebKitLegacy/ios: * WebCoreSupport/WebChromeClientIOS.h: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebKitLegacy/mac: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebKitLegacy/win: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WTF: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. * wtf/Optional.h: Remove WTF::Optional. Tools: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Canonical link: https://commits.webkit.org/238290@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-30 16:11:40 +00:00
static std::optional<String> formURLDecode(StringView input);
Use some C++17 features https://bugs.webkit.org/show_bug.cgi?id=185135 Reviewed by Alex Christensen. .: As discussed here [0] let's move WebKit to a subset of C++17. We now require GCC 6 [1] which means that, according to [2] we can use the following C++17 language features (I removed some uninteresting ones): - New auto rules for direct-list-initialization - static_assert with no message - typename in a template template parameter - Nested namespace definition - Attributes for namespaces and enumerators - u8 character literals - Allow constant evaluation for all non-type template arguments - Fold Expressions - Unary fold expressions and empty parameter packs - __has_include in preprocessor conditional - Differing begin and end types in range-based for - Improving std::pair and std::tuple Consult the Tony Tables [3] to see before / after examples. Of course we can use any library feature if we're willing to import them to WTF (and they don't require language support). [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html [1]: https://trac.webkit.org/changeset/231152/webkit [2]: https://en.cppreference.com/w/cpp/compiler_support [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md * Source/cmake/WebKitCompilerFlags.cmake: Source/WebCore: As discussed here [0] let's move WebKit to a subset of C++17. We now require GCC 6 [1] which means that, according to [2] we can use the following C++17 language features (I removed some uninteresting ones): - New auto rules for direct-list-initialization - static_assert with no message - typename in a template template parameter - Nested namespace definition - Attributes for namespaces and enumerators - u8 character literals - Allow constant evaluation for all non-type template arguments - Fold Expressions - Unary fold expressions and empty parameter packs - __has_include in preprocessor conditional - Differing begin and end types in range-based for - Improving std::pair and std::tuple Consult the Tony Tables [3] to see before / after examples. Of course we can use any library feature if we're willing to import them to WTF (and they don't require language support). [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html [1]: https://trac.webkit.org/changeset/231152/webkit [2]: https://en.cppreference.com/w/cpp/compiler_support [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md * DerivedSources.make: * platform/URLParser.cpp: work around an odd GCC 6 bug with class static value as a template parameter. (WebCore::URLParser::percentDecode): (WebCore::URLParser::domainToASCII): (WebCore::URLParser::hasForbiddenHostCodePoint): (WebCore::URLParser::parseHostAndPort): * platform/URLParser.h: Source/WebKit: As discussed here [0] let's move WebKit to a subset of C++17. We now require GCC 6 [1] which means that, according to [2] we can use the following C++17 language features (I removed some uninteresting ones): - New auto rules for direct-list-initialization - static_assert with no message - typename in a template template parameter - Nested namespace definition - Attributes for namespaces and enumerators - u8 character literals - Allow constant evaluation for all non-type template arguments - Fold Expressions - Unary fold expressions and empty parameter packs - __has_include in preprocessor conditional - Differing begin and end types in range-based for - Improving std::pair and std::tuple Consult the Tony Tables [3] to see before / after examples. Of course we can use any library feature if we're willing to import them to WTF (and they don't require language support). [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html [1]: https://trac.webkit.org/changeset/231152/webkit [2]: https://en.cppreference.com/w/cpp/compiler_support [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md * Configurations/Base.xcconfig: * DerivedSources.make: * PlatformMac.cmake: Source/WebKitLegacy: * PlatformMac.cmake: Source/WebKitLegacy/mac: * Configurations/WebKitLegacy.xcconfig: Source/WTF: * wtf/StdLibExtras.h: libstdc++ doesn't say it's C++17 when it defines std::conjunction. Use the feature test macro instead. Tools: * DumpRenderTree/PlatformMac.cmake: * gtk/ycm_extra_conf.py: (FlagsForFile): Canonical link: https://commits.webkit.org/200630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-04-30 21:17:59 +00:00
static bool hasForbiddenHostCodePoint(const LCharBuffer&);
void percentEncodeByte(uint8_t);
void appendToASCIIBuffer(UChar32);
void appendToASCIIBuffer(const char*, size_t);
void appendToASCIIBuffer(const LChar* characters, size_t size) { appendToASCIIBuffer(reinterpret_cast<const char*>(characters), size); }
URLParser should use TextEncoding through an abstract class https://bugs.webkit.org/show_bug.cgi?id=190027 Reviewed by Andy Estes. Source/WebCore: URLParser uses TextEncoding for one call to encode, which is only used for encoding the query of URLs in documents with non-UTF encodings. There are 3 call sites that specify the TextEncoding to use from the Document, and even those call sites use a UTF encoding most of the time. All other URL parsing is done using a well-optimized path which assumes UTF-8 encoding and uses macros from ICU headers, not a TextEncoding. Moving the logic in this way breaks URL and URLParser's dependency on TextEncoding, which makes it possible to use in a lower-level project without also moving TextEncoding, TextCodec, TextCodecICU, ThreadGlobalData, and the rest of WebCore and JavaScriptCore. There is no observable change in behavior. There is now one virtual function call in a code path in URLParser that is not performance-sensitive, and TextEncodings now have a vtable, which uses a few more bytes of memory total for WebKit. * css/parser/CSSParserContext.h: (WebCore::CSSParserContext::completeURL const): * css/parser/CSSParserIdioms.cpp: (WebCore::completeURL): * dom/Document.cpp: (WebCore::Document::completeURL const): * html/HTMLBaseElement.cpp: (WebCore::HTMLBaseElement::href const): Move the call to encodingForFormSubmission from the URL constructor to the 3 call sites that specify the encoding from the Document. * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::encodingForURLParsing): * loader/TextResourceDecoder.h: * platform/URL.cpp: (WebCore::URL::URL): * platform/URL.h: (WebCore::URLTextEncoding::~URLTextEncoding): * platform/URLParser.cpp: (WebCore::URLParser::encodeNonUTF8Query): (WebCore::URLParser::copyURLPartsUntil): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::URLParser::encodeQuery): Deleted. A pointer replaces the boolean isUTF8Encoding and the TextEncoding& which had a default value of UTF8Encoding. Now the pointer being null means that we use UTF8, and the pointer being non-null means we use that encoding. * platform/URLParser.h: (WebCore::URLParser::URLParser): * platform/text/TextEncoding.cpp: (WebCore::UTF7Encoding): (WebCore::TextEncoding::encodingForFormSubmissionOrURLParsing const): (WebCore::ASCIIEncoding): (WebCore::Latin1Encoding): (WebCore::UTF16BigEndianEncoding): (WebCore::UTF16LittleEndianEncoding): (WebCore::UTF8Encoding): (WebCore::WindowsLatin1Encoding): (WebCore::TextEncoding::encodingForFormSubmission const): Deleted. Use NeverDestroyed because TextEncoding now has a virtual destructor. * platform/text/TextEncoding.h: Rename encodingForFormSubmission to encodingForFormSubmissionOrURLParsing to make it more clear that we are intentionally using it for both. Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/205005@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-27 20:05:52 +00:00
template<typename CharacterType> void encodeNonUTF8Query(const Vector<UChar>& source, const URLTextEncoding&, CodePointIterator<CharacterType>);
void copyASCIIStringUntil(const String&, size_t length);
bool copyBaseWindowsDriveLetter(const URL&);
Implement URLParser::syntaxViolation https://bugs.webkit.org/show_bug.cgi?id=162593 Reviewed by Geoffrey Garen. Source/WebCore: Most of the time when parsing URLs, we just look at the URL, find offsets of the host, path, query, etc., and the String can be used untouched. When this happens, we do not want to allocate and copy the String. We want to just add a reference to an existing String. Sometimes we need to canonicalize the String because there has been a syntaxViolation, defined as any String that is different than its canonicalized URL String. In such cases we need to allocate a new String and fill it with the canonicalized URL String. When a syntaxViolation happens for the first time, we know that everything in the input String up to that point is equal to what it would have been if we had canonicalized the beginning of the URL, copy it into a buffer, and continue parsing in a mode where instead of just looking at the input URL String, we canonicalize each code point into the buffer. Changes to behavior involve additional spec compliance with tabs and newlines in different places in URLs, as well as additional spec compliance when parsing empty and null URLs relative to other URLs. Both are covered by new API tests. Existing behavior covered by existing API tests. This is about a 15% speed improvement on my URL parsing benchmark. * platform/URL.cpp: (WebCore::assertProtocolIsGood): (WebCore::URL::protocolIs): (WebCore::protocolIs): * platform/URL.h: * platform/URLParser.cpp: (WebCore::isTabOrNewline): (WebCore::URLParser::incrementIteratorSkippingTabsAndNewlines): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendToASCIIBuffer): (WebCore::URLParser::checkWindowsDriveLetter): (WebCore::URLParser::shouldCopyFileURL): (WebCore::URLParser::utf8PercentEncode): (WebCore::URLParser::utf8QueryEncode): (WebCore::URLParser::copyURLPartsUntil): (WebCore::URLParser::syntaxViolation): (WebCore::URLParser::fragmentSyntaxViolation): (WebCore::URLParser::parsedDataView): (WebCore::URLParser::currentPosition): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::URLParser::parseAuthority): (WebCore::URLParser::parseIPv4Number): (WebCore::URLParser::parseIPv4Host): (WebCore::URLParser::parseIPv6Host): (WebCore::URLParser::parsePort): (WebCore::URLParser::parseHostAndPort): (WebCore::serializeURLEncodedForm): (WebCore::URLParser::allValuesEqual): (WebCore::URLParser::internalValuesConsistent): (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): Deleted. (WebCore::URLParser::syntaxError): Deleted. (WebCore::parseIPv4Number): Deleted. * platform/URLParser.h: (WebCore::URLParser::incrementIteratorSkippingTabsAndNewlines): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/180569@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-27 20:07:15 +00:00
StringView parsedDataView(size_t start, size_t length);
UChar parsedDataView(size_t position);
Check for "xn--" in any subdomain when parsing URL hosts https://bugs.webkit.org/show_bug.cgi?id=226912 Reviewed by Darin Adler. LayoutTests/imported/w3c: * web-platform-tests/url/a-element-expected.txt: * web-platform-tests/url/a-element-xhtml-expected.txt: * web-platform-tests/url/failure-expected.txt: * web-platform-tests/url/resources/urltestdata.json: * web-platform-tests/url/toascii.window-expected.txt: * web-platform-tests/url/url-constructor-expected.txt: Source/WTF: We have a fast path that doesn't call uidna_nameToASCII if the host is already ASCII. We need to check if the host is properly-punycode-encoded if it starts with "xn--" but we also need to check if any subdomain starts with "xn--" (not just the first one). In order to not regress tests, I needed to also take the fix I did in r256629 and apply it to all use of uidna_nameToASCII. * wtf/URL.cpp: (WTF::appendEncodedHostname): * wtf/URLHelpers.cpp: (WTF::URLHelpers::mapHostName): * wtf/URLParser.cpp: (WTF::URLParser::domainToASCII): (WTF::URLParser::subdomainStartsWithXNDashDash): (WTF::URLParser::parseHostAndPort): (WTF::URLParser::startsWithXNDashDash): Deleted. * wtf/URLParser.h: Tools: * TestWebKitAPI/Tests/WTF/URLParser.cpp: (TestWebKitAPI::TEST_F): These tests used to hit UIDNA_ERROR_LABEL_TOO_LONG which is allowed now. * TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm: (TestWebKitAPI::TEST): This test, from r262171, needs to verify that non-ASCII characters are not truncated to ASCII values when converting to NSURL. It used to use an invalid URL that had a host that ended in U+FE63 (SMALL HYPHEN-MINUS) which would fail because of UIDNA_ERROR_TRAILING_HYPHEN. Now that trailing hyphens are allowed, we end in U+0661 and U+06F1 which fail because of UIDNA_ERROR_BIDI which makes this test still verify the non-truncated values of an invalid host converted to an NSURL. LayoutTests: * fast/dom/DOMURL/parsing-expected.txt: * fast/dom/DOMURL/parsing.html: Update the test I added in r236527 to reflect this relaxation. This matches the behavior of Chrome Canary. Canonical link: https://commits.webkit.org/238822@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-15 16:59:15 +00:00
template<typename CharacterType> bool subdomainStartsWithXNDashDash(CodePointIterator<CharacterType>);
bool subdomainStartsWithXNDashDash(StringImpl&);
URLParser should parse relative URLs https://bugs.webkit.org/show_bug.cgi?id=161282 Patch by Alex Christensen <achristensen@webkit.org> on 2016-08-27 Reviewed by Darin Adler. Source/WebCore: Partially covered by new API tests, but once the parser is complete enough we can use the url web platform tests to more fully test this. It's still a work in progress only used by tests. * platform/URLParser.cpp: (WebCore::URLParser::urlLengthUntilPart): (WebCore::URLParser::copyURLPartsUntil): Added some helper functions to reduce redundant code. When parsing relative URLs, we often want to copy large parts of the base URL, but the stopping point differs. (WebCore::URLParser::parse): The parser now returns a URL instead of an Optional<URL> because a URL has a m_isValid which behaves like Optional. * platform/URLParser.h: (WebCore::URLParser::parse): Source/WTF: * wtf/text/StringView.h: Use a std::reference_wrapper for the StringView& to make it reassignable so we can add an operator=. Tools: * TestWebKitAPI/Tests/WTF/StringView.cpp: (TestWebKitAPI::TEST): Added some tests for the new operator=. Test saving iterators, restoring iterators, and even assigning iterators to new CodePoints objects. Using the same iterator to iterate multiple objects is bad practice, but it's possible and now tested. * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): (TestWebKitAPI::checkRelativeURL): (TestWebKitAPI::checkURLDifferences): (TestWebKitAPI::shouldFail): Add some relative URL tests. Canonical link: https://commits.webkit.org/179471@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-28 05:55:17 +00:00
Non-special URLs are not idempotent https://bugs.webkit.org/show_bug.cgi?id=215762 Reviewed by Tim Horton. LayoutTests/imported/w3c: * web-platform-tests/url/a-element-expected.txt: * web-platform-tests/url/a-element-xhtml-expected.txt: * web-platform-tests/url/url-constructor-expected.txt: * web-platform-tests/url/url-setters-expected.txt: Source/WTF: https://github.com/whatwg/url/pull/505 added an interesting edge case to the URL serialization: "If url’s host is null, url’s path’s size is greater than 1, and url’s path[0] is the empty string, then append U+002F (/) followed by U+002E (.) to output." The problem was that URLs like "a:/a/..//a" would be parsed into "a://a" with a pathname of "//a" and an empty host. If "a://a" was then reparsed, it would again have an href of "a://a" but its host would be "a" and it would have an empty path. There is consensus that URL parsing should be idempotent, so we need to do something different here. According to https://github.com/whatwg/url/issues/415#issuecomment-419197290 this follows what Edge did (and then subsequently abandoned when they switched to Chromium) to make URL parsing idempotent by adding "/." before the path in the edge case of a URL with a non-special scheme (not http, https, wss, etc.) and a null host and a non-empty path that has an empty first segment. All the members of the URL remain unchanged except the full serialization (href). This is not important in practice, but important in theory. Our URL parser tries very hard to use the exact same WTF::String object given as input if it can. However, this step is better implemented as a post-processing step that will almost never happen because otherwise we would have to parse the entire path twice to find out if we need to add "./" or if the "./" that may have already been there needs to stay. This is illustrated with the test URL "t:/.//p/../../../..//x" which does need the "./". In the common case, this adds one well-predicted branch to URL parsing, so I expect performance to be unaffected. Since this is such a rare edge case of URLs, I expect no compatibility problems. * wtf/URL.cpp: (WTF::URL::pathStart const): * wtf/URL.h: (WTF::URL::pathStart const): Deleted. * wtf/URLParser.cpp: (WTF::URLParser::copyURLPartsUntil): (WTF::URLParser::URLParser): (WTF::URLParser::needsNonSpecialDotSlash const): (WTF::URLParser::addNonSpecialDotSlash): * wtf/URLParser.h: Tools: * TestWebKitAPI/Tests/WTF/URLParser.cpp: (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/229956@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-01 17:05:41 +00:00
bool needsNonSpecialDotSlash() const;
void addNonSpecialDotSlash();
Refactor URLParser https://bugs.webkit.org/show_bug.cgi?id=162518 Reviewed by Brady Eidson. Use a helper function to determine the currentPosition instead of always determining position based on the size of the buffer. Soon there will be nothing in the buffer in the common case where there are no syntax errors. Also make more static functions into methods. Give IPv6Addresses and IPv4Addresses names. Start adding syntaxError stubs. No change in behavior. Covered by API tests. * platform/URLParser.cpp: (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendToASCIIBuffer): (WebCore::URLParser::syntaxError): (WebCore::URLParser::currentPosition): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::URLParser::parseAuthority): (WebCore::URLParser::appendNumberToASCIIBuffer): (WebCore::URLParser::serializeIPv4): (WebCore::URLParser::serializeIPv6Piece): (WebCore::URLParser::serializeIPv6): (WebCore::URLParser::parseIPv4Host): (WebCore::URLParser::parseIPv6Host): (WebCore::URLParser::parsePort): (WebCore::URLParser::parseHostAndPort): (WebCore::append): Deleted. (WebCore::serializeIPv4): Deleted. (WebCore::serializeIPv6Piece): Deleted. (WebCore::serializeIPv6): Deleted. (WebCore::parseIPv4Host): Deleted. (WebCore::parseIPv6Host): Deleted. * platform/URLParser.h: Canonical link: https://commits.webkit.org/180466@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-23 23:40:46 +00:00
using IPv4Address = uint32_t;
void serializeIPv4(IPv4Address);
enum class IPv4ParsingError;
enum class IPv4PieceParsingError;
template<typename CharacterTypeForSyntaxViolation, typename CharacterType> Expected<IPv4Address, IPv4ParsingError> parseIPv4Host(const CodePointIterator<CharacterTypeForSyntaxViolation>&, CodePointIterator<CharacterType>);
template<typename CharacterType> Expected<uint32_t, URLParser::IPv4PieceParsingError> parseIPv4Piece(CodePointIterator<CharacterType>&, bool& syntaxViolation);
Refactor URLParser https://bugs.webkit.org/show_bug.cgi?id=162518 Reviewed by Brady Eidson. Use a helper function to determine the currentPosition instead of always determining position based on the size of the buffer. Soon there will be nothing in the buffer in the common case where there are no syntax errors. Also make more static functions into methods. Give IPv6Addresses and IPv4Addresses names. Start adding syntaxError stubs. No change in behavior. Covered by API tests. * platform/URLParser.cpp: (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendToASCIIBuffer): (WebCore::URLParser::syntaxError): (WebCore::URLParser::currentPosition): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::URLParser::parseAuthority): (WebCore::URLParser::appendNumberToASCIIBuffer): (WebCore::URLParser::serializeIPv4): (WebCore::URLParser::serializeIPv6Piece): (WebCore::URLParser::serializeIPv6): (WebCore::URLParser::parseIPv4Host): (WebCore::URLParser::parseIPv6Host): (WebCore::URLParser::parsePort): (WebCore::URLParser::parseHostAndPort): (WebCore::append): Deleted. (WebCore::serializeIPv4): Deleted. (WebCore::serializeIPv6Piece): Deleted. (WebCore::serializeIPv6): Deleted. (WebCore::parseIPv4Host): Deleted. (WebCore::parseIPv6Host): Deleted. * platform/URLParser.h: Canonical link: https://commits.webkit.org/180466@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-23 23:40:46 +00:00
using IPv6Address = std::array<uint16_t, 8>;
Remove WTF::Optional synonym for std::optional, using that class template directly instead https://bugs.webkit.org/show_bug.cgi?id=226433 Reviewed by Chris Dumez. Source/JavaScriptCore: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. * inspector/scripts/codegen/generate_objc_protocol_types_implementation.py: (ObjCProtocolTypesImplementationGenerator._generate_init_method_for_payload): Use auto instead of Optional<>. Also use * instead of value() and nest the definition of the local inside an if statement in the case where it's an optional. * inspector/scripts/tests/expected/*: Regenerated these results. Source/WebCore: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebCore/PAL: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebDriver: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebKit: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. * Scripts/webkit/tests: Regenerated expected results, by running the command "python Scripts/webkit/messages_unittest.py -r". (How am I supposed to know to do that?) Source/WebKitLegacy/ios: * WebCoreSupport/WebChromeClientIOS.h: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebKitLegacy/mac: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WebKitLegacy/win: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Source/WTF: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. * wtf/Optional.h: Remove WTF::Optional. Tools: * <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>. Canonical link: https://commits.webkit.org/238290@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-30 16:11:40 +00:00
template<typename CharacterType> std::optional<IPv6Address> parseIPv6Host(CodePointIterator<CharacterType>);
template<typename CharacterType> std::optional<uint32_t> parseIPv4PieceInsideIPv6(CodePointIterator<CharacterType>&);
template<typename CharacterType> std::optional<IPv4Address> parseIPv4AddressInsideIPv6(CodePointIterator<CharacterType>);
Refactor URLParser https://bugs.webkit.org/show_bug.cgi?id=162518 Reviewed by Brady Eidson. Use a helper function to determine the currentPosition instead of always determining position based on the size of the buffer. Soon there will be nothing in the buffer in the common case where there are no syntax errors. Also make more static functions into methods. Give IPv6Addresses and IPv4Addresses names. Start adding syntaxError stubs. No change in behavior. Covered by API tests. * platform/URLParser.cpp: (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendToASCIIBuffer): (WebCore::URLParser::syntaxError): (WebCore::URLParser::currentPosition): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::URLParser::parseAuthority): (WebCore::URLParser::appendNumberToASCIIBuffer): (WebCore::URLParser::serializeIPv4): (WebCore::URLParser::serializeIPv6Piece): (WebCore::URLParser::serializeIPv6): (WebCore::URLParser::parseIPv4Host): (WebCore::URLParser::parseIPv6Host): (WebCore::URLParser::parsePort): (WebCore::URLParser::parseHostAndPort): (WebCore::append): Deleted. (WebCore::serializeIPv4): Deleted. (WebCore::serializeIPv6Piece): Deleted. (WebCore::serializeIPv6): Deleted. (WebCore::parseIPv4Host): Deleted. (WebCore::parseIPv6Host): Deleted. * platform/URLParser.h: Canonical link: https://commits.webkit.org/180466@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-23 23:40:46 +00:00
void serializeIPv6Piece(uint16_t piece);
URLParser should ignore tabs at all possible locations https://bugs.webkit.org/show_bug.cgi?id=162711 Reviewed by Tim Horton. Source/WebCore: The URL spec says to remove all tabs and newlines before parsing a URL. To reduce passes on the URL and copies of data, I chose to just ignore them every time I increment the iterator. This is fragile, but faster. It can be completely tested, though. That is what this patch does. Covered by an addition to the API tests that tries inserting one tab at each location of each test. * platform/URLParser.cpp: (WebCore::URLParser::advance): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendWindowsDriveLetter): (WebCore::URLParser::isPercentEncodedDot): (WebCore::URLParser::isSingleDotPathSegment): (WebCore::URLParser::isDoubleDotPathSegment): (WebCore::URLParser::consumeSingleDotPathSegment): (WebCore::URLParser::consumeDoubleDotPathSegment): (WebCore::URLParser::checkLocalhostCodePoint): (WebCore::URLParser::isAtLocalhost): (WebCore::URLParser::isLocalhost): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::isPercentEncodedDot): Deleted. (WebCore::isSingleDotPathSegment): Deleted. (WebCore::isDoubleDotPathSegment): Deleted. (WebCore::consumeSingleDotPathSegment): Deleted. (WebCore::consumeDoubleDotPathSegment): Deleted. * platform/URLParser.h: (WebCore::URLParser::advance): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::ExpectedParts::isInvalid): (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/180674@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-29 18:18:04 +00:00
void serializeIPv6(IPv6Address);
Refactor URLParser https://bugs.webkit.org/show_bug.cgi?id=162518 Reviewed by Brady Eidson. Use a helper function to determine the currentPosition instead of always determining position based on the size of the buffer. Soon there will be nothing in the buffer in the common case where there are no syntax errors. Also make more static functions into methods. Give IPv6Addresses and IPv4Addresses names. Start adding syntaxError stubs. No change in behavior. Covered by API tests. * platform/URLParser.cpp: (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): (WebCore::URLParser::isWindowsDriveLetter): (WebCore::URLParser::appendToASCIIBuffer): (WebCore::URLParser::syntaxError): (WebCore::URLParser::currentPosition): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::URLParser::parseAuthority): (WebCore::URLParser::appendNumberToASCIIBuffer): (WebCore::URLParser::serializeIPv4): (WebCore::URLParser::serializeIPv6Piece): (WebCore::URLParser::serializeIPv6): (WebCore::URLParser::parseIPv4Host): (WebCore::URLParser::parseIPv6Host): (WebCore::URLParser::parsePort): (WebCore::URLParser::parseHostAndPort): (WebCore::append): Deleted. (WebCore::serializeIPv4): Deleted. (WebCore::serializeIPv6Piece): Deleted. (WebCore::serializeIPv6): Deleted. (WebCore::parseIPv4Host): Deleted. (WebCore::parseIPv6Host): Deleted. * platform/URLParser.h: Canonical link: https://commits.webkit.org/180466@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-23 23:40:46 +00:00
URLParser should parse relative URLs https://bugs.webkit.org/show_bug.cgi?id=161282 Patch by Alex Christensen <achristensen@webkit.org> on 2016-08-27 Reviewed by Darin Adler. Source/WebCore: Partially covered by new API tests, but once the parser is complete enough we can use the url web platform tests to more fully test this. It's still a work in progress only used by tests. * platform/URLParser.cpp: (WebCore::URLParser::urlLengthUntilPart): (WebCore::URLParser::copyURLPartsUntil): Added some helper functions to reduce redundant code. When parsing relative URLs, we often want to copy large parts of the base URL, but the stopping point differs. (WebCore::URLParser::parse): The parser now returns a URL instead of an Optional<URL> because a URL has a m_isValid which behaves like Optional. * platform/URLParser.h: (WebCore::URLParser::parse): Source/WTF: * wtf/text/StringView.h: Use a std::reference_wrapper for the StringView& to make it reassignable so we can add an operator=. Tools: * TestWebKitAPI/Tests/WTF/StringView.cpp: (TestWebKitAPI::TEST): Added some tests for the new operator=. Test saving iterators, restoring iterators, and even assigning iterators to new CodePoints objects. Using the same iterator to iterate multiple objects is bad practice, but it's possible and now tested. * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): (TestWebKitAPI::checkRelativeURL): (TestWebKitAPI::checkURLDifferences): (TestWebKitAPI::shouldFail): Add some relative URL tests. Canonical link: https://commits.webkit.org/179471@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-28 05:55:17 +00:00
enum class URLPart;
URLParser should use TextEncoding through an abstract class https://bugs.webkit.org/show_bug.cgi?id=190027 Reviewed by Andy Estes. Source/WebCore: URLParser uses TextEncoding for one call to encode, which is only used for encoding the query of URLs in documents with non-UTF encodings. There are 3 call sites that specify the TextEncoding to use from the Document, and even those call sites use a UTF encoding most of the time. All other URL parsing is done using a well-optimized path which assumes UTF-8 encoding and uses macros from ICU headers, not a TextEncoding. Moving the logic in this way breaks URL and URLParser's dependency on TextEncoding, which makes it possible to use in a lower-level project without also moving TextEncoding, TextCodec, TextCodecICU, ThreadGlobalData, and the rest of WebCore and JavaScriptCore. There is no observable change in behavior. There is now one virtual function call in a code path in URLParser that is not performance-sensitive, and TextEncodings now have a vtable, which uses a few more bytes of memory total for WebKit. * css/parser/CSSParserContext.h: (WebCore::CSSParserContext::completeURL const): * css/parser/CSSParserIdioms.cpp: (WebCore::completeURL): * dom/Document.cpp: (WebCore::Document::completeURL const): * html/HTMLBaseElement.cpp: (WebCore::HTMLBaseElement::href const): Move the call to encodingForFormSubmission from the URL constructor to the 3 call sites that specify the encoding from the Document. * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::encodingForURLParsing): * loader/TextResourceDecoder.h: * platform/URL.cpp: (WebCore::URL::URL): * platform/URL.h: (WebCore::URLTextEncoding::~URLTextEncoding): * platform/URLParser.cpp: (WebCore::URLParser::encodeNonUTF8Query): (WebCore::URLParser::copyURLPartsUntil): (WebCore::URLParser::URLParser): (WebCore::URLParser::parse): (WebCore::URLParser::encodeQuery): Deleted. A pointer replaces the boolean isUTF8Encoding and the TextEncoding& which had a default value of UTF8Encoding. Now the pointer being null means that we use UTF8, and the pointer being non-null means we use that encoding. * platform/URLParser.h: (WebCore::URLParser::URLParser): * platform/text/TextEncoding.cpp: (WebCore::UTF7Encoding): (WebCore::TextEncoding::encodingForFormSubmissionOrURLParsing const): (WebCore::ASCIIEncoding): (WebCore::Latin1Encoding): (WebCore::UTF16BigEndianEncoding): (WebCore::UTF16LittleEndianEncoding): (WebCore::UTF8Encoding): (WebCore::WindowsLatin1Encoding): (WebCore::TextEncoding::encodingForFormSubmission const): Deleted. Use NeverDestroyed because TextEncoding now has a virtual destructor. * platform/text/TextEncoding.h: Rename encodingForFormSubmission to encodingForFormSubmissionOrURLParsing to make it more clear that we are intentionally using it for both. Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): Canonical link: https://commits.webkit.org/205005@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-27 20:05:52 +00:00
template<typename CharacterType> void copyURLPartsUntil(const URL& base, URLPart, const CodePointIterator<CharacterType>&, const URLTextEncoding*&);
URLParser should parse relative URLs https://bugs.webkit.org/show_bug.cgi?id=161282 Patch by Alex Christensen <achristensen@webkit.org> on 2016-08-27 Reviewed by Darin Adler. Source/WebCore: Partially covered by new API tests, but once the parser is complete enough we can use the url web platform tests to more fully test this. It's still a work in progress only used by tests. * platform/URLParser.cpp: (WebCore::URLParser::urlLengthUntilPart): (WebCore::URLParser::copyURLPartsUntil): Added some helper functions to reduce redundant code. When parsing relative URLs, we often want to copy large parts of the base URL, but the stopping point differs. (WebCore::URLParser::parse): The parser now returns a URL instead of an Optional<URL> because a URL has a m_isValid which behaves like Optional. * platform/URLParser.h: (WebCore::URLParser::parse): Source/WTF: * wtf/text/StringView.h: Use a std::reference_wrapper for the StringView& to make it reassignable so we can add an operator=. Tools: * TestWebKitAPI/Tests/WTF/StringView.cpp: (TestWebKitAPI::TEST): Added some tests for the new operator=. Test saving iterators, restoring iterators, and even assigning iterators to new CodePoints objects. Using the same iterator to iterate multiple objects is bad practice, but it's possible and now tested. * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::checkURL): (TestWebKitAPI::TEST_F): (TestWebKitAPI::checkRelativeURL): (TestWebKitAPI::checkURLDifferences): (TestWebKitAPI::shouldFail): Add some relative URL tests. Canonical link: https://commits.webkit.org/179471@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-08-28 05:55:17 +00:00
static size_t urlLengthUntilPart(const URL&, URLPart);
void popPath();
bool shouldPopPath(unsigned);
};
}