Remove ParsedURLString
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2018 20:24:42 +0000 (20:24 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2018 20:24:42 +0000 (20:24 +0000)
commita80cebc37207a4c956ed9adfe2e9124f2362502a
tree790ad55f2f768b669f60580986806cba260d2167
parent6664104f1fdb931d7f42a24993745aac9c93802c
Remove ParsedURLString
https://bugs.webkit.org/show_bug.cgi?id=190154

Reviewed by Chris Dumez.

Source/WebCore:

Before the introduction of URLParser, it would indicate that we should assume the String
is from a valid URL so we can skip canonicalization and just find the offsets inside the String
to quickly create a URL.  It was a performance optimization that caused security issues when
misused.  Since the introduction of URLParser, we have a fast path for all URL parsing, so
right now it actually doesn't change any behavior.  It's just a relic of the past that complicates
the URL class, making it harder to express which constructor to use and making it harder to move
the class.

* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::NavigatorContentUtils::registerProtocolHandler):
(WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
(WebCore::NavigatorContentUtils::unregisterProtocolHandler):
* dom/Document.cpp:
(WebCore::Document::updateBaseURL):
(WebCore::Document::initSecurityContext):
* dom/ExtensionStyleSheets.cpp:
(WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache const):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::checkStyleSheet):
* editing/markup.cpp:
(WebCore::completeURLs):
* fileapi/BlobURL.cpp:
(WebCore::BlobURL::createBlobURL):
* history/HistoryItem.cpp:
(WebCore::HistoryItem::url const):
(WebCore::HistoryItem::originalURL const):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::location const):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
* html/PublicURLManager.cpp:
(WebCore::PublicURLManager::stop):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::resourceStyleSheetText const):
* inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::deleteCookie):
(WebCore::InspectorPageAgent::getResourceContent):
(WebCore::InspectorPageAgent::searchInResource):
* inspector/agents/page/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::sourceMapURLForScript):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::subresources const):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::init):
(WebCore::FrameLoader::initForSynthesizedDocument):
* loader/HistoryController.cpp:
(WebCore::HistoryController::pushState):
(WebCore::HistoryController::replaceState):
* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::addResource):
(WebCore::ApplicationCache::resourceForURL):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::startLoadingEntry):
(WebCore::ApplicationCacheGroup::addEntry):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::cacheGroupForURL):
(WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
(WebCore::ApplicationCacheStorage::loadCache):
(WebCore::ApplicationCacheStorage::manifestURLs):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::createWindow):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::urlForBlankFrame):
* platform/URL.cpp:
(WebCore::blankURL):
* platform/URL.h:
(): Deleted.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::load):
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::populateBlobsForFileWriting):
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::decodeBase):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::sanitizeSuggestedFilename):
* platform/network/cf/DNSResolveQueueCFNet.cpp:
(WebCore::DNSResolveQueueCFNet::updateIsUsingProxy):
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
* platform/network/curl/CookieJarDB.cpp:
(WebCore::CookieJarDB::searchCookies):
(WebCore::CookieJarDB::setCookie):
(WebCore::CookieJarDB::deleteCookie):
* platform/network/curl/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
* platform/network/soup/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::docLoaderFunc):

Source/WebKit:

* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::writeBlobToFilePath):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::streamWillSendRequest):
(WebKit::PluginControllerProxy::streamDidReceiveResponse):
(WebKit::PluginControllerProxy::manualStreamDidReceiveResponse):
* Shared/API/APIUserContentURLPattern.h:
(API::UserContentURLPattern::matchesURL const):
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::itemIsInSameDocument const):
* UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
(WebKit::RemoteInspectorProtocolHandler::handleRequest):
(WebKit::RemoteInspectorProtocolHandler::targetListChanged):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::openURL):
* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::SuspendedPageProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::processDidTerminate):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::addProcessToOriginCacheSet):
(WebKit::WebProcessPool::processForNavigationInternal):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::createShareMenuItem):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::addUserScript):
(WebKit::InjectedBundle::addUserStyleSheet):
(WebKit::InjectedBundle::removeUserScript):
(WebKit::InjectedBundle::removeUserStyleSheet):
* WebProcess/Plugins/Plugin.cpp:
(WebKit::Plugin::Parameters::decode):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::url):
(WebKit::WebPlatformStrategies::readURLFromPasteboard):

Source/WebKitLegacy/mac:

* WebView/WebScriptDebugger.mm:
(toNSURL):

Source/WebKitLegacy/win:

* WebDownloadCurl.cpp:
(WebDownload::initWithRequest):
* WebURLResponse.cpp:
(WebURLResponse::createInstance):

Tools:

* TestWebKitAPI/Tests/WebCore/URL.cpp:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::assertUserAgentForURLHasChromeBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasLinuxPlatformQuirk):
(TestWebKitAPI::assertUserAgentForURLHasMacPlatformQuirk):
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
59 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/ExtensionStyleSheets.cpp
Source/WebCore/dom/ProcessingInstruction.cpp
Source/WebCore/editing/markup.cpp
Source/WebCore/fileapi/BlobURL.cpp
Source/WebCore/history/HistoryItem.cpp
Source/WebCore/html/HTMLFrameElementBase.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/PublicURLManager.cpp
Source/WebCore/inspector/InspectorStyleSheet.cpp
Source/WebCore/inspector/agents/InspectorPageAgent.cpp
Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/HistoryController.cpp
Source/WebCore/loader/appcache/ApplicationCache.cpp
Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/PageSerializer.cpp
Source/WebCore/platform/URL.cpp
Source/WebCore/platform/URL.h
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
Source/WebCore/platform/network/BlobRegistryImpl.cpp
Source/WebCore/platform/network/ResourceRequestBase.h
Source/WebCore/platform/network/ResourceResponseBase.cpp
Source/WebCore/platform/network/cf/DNSResolveQueueCFNet.cpp
Source/WebCore/platform/network/cf/ResourceRequest.h
Source/WebCore/platform/network/curl/CookieJarDB.cpp
Source/WebCore/platform/network/curl/ResourceRequest.h
Source/WebCore/platform/network/soup/ResourceRequest.h
Source/WebCore/xml/XSLTProcessorLibxslt.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
Source/WebKit/PluginProcess/PluginControllerProxy.cpp
Source/WebKit/Shared/API/APIUserContentURLPattern.h
Source/WebKit/Shared/WebBackForwardListItem.cpp
Source/WebKit/UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp
Source/WebKit/UIProcess/Plugins/mac/PluginProcessProxyMac.mm
Source/WebKit/UIProcess/SuspendedPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebProcessProxy.cpp
Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit/WebProcess/Plugins/Plugin.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebScriptDebugger.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebDownloadCurl.cpp
Source/WebKitLegacy/win/WebURLResponse.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/URL.cpp
Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp