URL should not use TextEncoding internally
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2018 18:16:33 +0000 (18:16 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2018 18:16:33 +0000 (18:16 +0000)
commitb1ab5d95b6c822a23547425237b97fbfbbddf3e4
tree4fda920bbf77a2b5605dee96cf8d3523973f46a6
parent5244c7a596d32d09d2527327e4b28f28be5cb74c
URL should not use TextEncoding internally
https://bugs.webkit.org/show_bug.cgi?id=190111

Reviewed by Andy Estes.

Source/WebCore:

That dependency makes it impossible to move or use elsewhere.
Using TextEncoding was overkill because we know the credentials are UTF-8 percent-encoded in a parsed URL.
No change in behavior as verified by new API tests.

* page/SecurityOrigin.cpp:
* page/csp/ContentSecurityPolicySourceList.cpp:
* platform/URL.cpp:
(WebCore::decodeEscapeSequencesFromParsedURL):
(WebCore::URL::user const):
(WebCore::URL::pass const):
(WebCore::URL::fileSystemPath const):
(WebCore::decodeURLEscapeSequences): Deleted.
* platform/URL.h:
* platform/network/DataURLDecoder.cpp:
* platform/text/TextEncoding.cpp:
(WebCore::decodeURLEscapeSequences):
* platform/text/TextEncoding.h:

Source/WebKit:

* UIProcess/WebInspectorProxy.cpp:

Source/WebKitLegacy/mac:

* Misc/WebNSURLExtras.mm:

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::testUserPass):
(TestWebKitAPI::TEST_F):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/SecurityOrigin.cpp
Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp
Source/WebCore/platform/URL.cpp
Source/WebCore/platform/URL.h
Source/WebCore/platform/network/DataURLDecoder.cpp
Source/WebCore/platform/text/TextEncoding.cpp
Source/WebCore/platform/text/TextEncoding.h
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
Source/WebKit/UIProcess/API/glib/WebKitFileChooserRequest.cpp
Source/WebKit/UIProcess/WebInspectorProxy.cpp
Source/WebKit/WebProcess/Plugins/PluginView.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Misc/WebNSURLExtras.mm
Source/WebKitLegacy/win/WebDownloadCurl.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp