Skip to content
Permalink
Browse files
[GTK][WPE] Need a function to convert internal URI to display ("prett…
…y") URI

https://bugs.webkit.org/show_bug.cgi?id=174816

Reviewed by Michael Catanzaro.

Source/WebCore:

Tests: enabled fast/url/user-visible/.

* testing/Internals.cpp:
(WebCore::Internals::userVisibleString): Enable method on all platforms.

Source/WebKit:

Add webkit_uri_for_display for GTK and WPE.

* PlatformGTK.cmake:
* PlatformWPE.cmake:
* SourcesGTK.txt:
* SourcesWPE.txt:
* UIProcess/API/glib/WebKitURIUtilities.cpp: Added.
(webkit_uri_for_display):
* UIProcess/API/gtk/WebKitURIUtilities.h: Added.
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
* UIProcess/API/gtk/webkit2.h:
* UIProcess/API/wpe/WebKitURIUtilities.h: Added.
* UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
* UIProcess/API/wpe/docs/wpe-docs.sgml:
* UIProcess/API/wpe/webkit.h:

Source/WTF:

Translate userVisibleString and dependent code into platform-neutral C++
in wtf/URLHelpers.{h,cpp}.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/URLHelpers.cpp: Added.
(WTF::URLHelpers::loadIDNScriptWhiteList):
(WTF::URLHelpers::isArmenianLookalikeCharacter):
(WTF::URLHelpers::isArmenianScriptCharacter):
(WTF::URLHelpers::isASCIIDigitOrValidHostCharacter):
(WTF::URLHelpers::isLookalikeCharacter):
(WTF::URLHelpers::whiteListIDNScript):
(WTF::URLHelpers::initializeDefaultIDNScriptWhiteList):
(WTF::URLHelpers::allCharactersInIDNScriptWhiteList):
(WTF::URLHelpers::isSecondLevelDomainNameAllowedByTLDRules):
(WTF::URLHelpers::isRussianDomainNameCharacter):
(WTF::URLHelpers::allCharactersAllowedByTLDRules):
(WTF::URLHelpers::mapHostName):
(WTF::URLHelpers::collectRangesThatNeedMapping):
(WTF::URLHelpers::applyHostNameFunctionToMailToURLString):
(WTF::URLHelpers::applyHostNameFunctionToURLString):
(WTF::URLHelpers::mapHostNames):
(WTF::URLHelpers::createStringWithEscapedUnsafeCharacters):
(WTF::URLHelpers::userVisibleURL):
* wtf/URLHelpers.h: Added.
* wtf/cocoa/NSURLExtras.mm:
(WTF::URLHelpers::loadIDNScriptWhiteList):
(WTF::decodePercentEscapes):
(WTF::decodeHostName):
(WTF::encodeHostName):
(WTF::URLWithUserTypedString):
(WTF::userVisibleString):

Tools:

Add tests for userVisibleString() and (for GTK and WPE) webkit_uri_for_display().

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/URLHelpers.cpp: Added.
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitURIUtilities.cpp: Added.
(testURIForDisplayUnaffected):
(testURIForDisplayAffected):
(beforeAll):
(afterAll):
* TestWebKitAPI/glib/CMakeLists.txt:

LayoutTests:

* TestExpectations: Enable fast/url/user-visible/.


Canonical link: https://commits.webkit.org/207326@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Ms2ger committed Dec 17, 2018
1 parent 5593c90 commit b078ecac51f9e13ad10eac01de1a4baf9b084a77
Showing with 1,385 additions and 819 deletions.
  1. +9 −0 LayoutTests/ChangeLog
  2. +0 −1 LayoutTests/TestExpectations
  3. +40 −0 Source/WTF/ChangeLog
  4. +6 −0 Source/WTF/WTF.xcodeproj/project.pbxproj
  5. +2 −0 Source/WTF/wtf/CMakeLists.txt
  6. +866 −0 Source/WTF/wtf/URLHelpers.cpp
  7. +49 −0 Source/WTF/wtf/URLHelpers.h
  8. +24 −815 Source/WTF/wtf/cocoa/NSURLExtras.mm
  9. +12 −0 Source/WebCore/ChangeLog
  10. +3 −3 Source/WebCore/testing/Internals.cpp
  11. +24 −0 Source/WebKit/ChangeLog
  12. +1 −0 Source/WebKit/PlatformGTK.cmake
  13. +1 −0 Source/WebKit/PlatformWPE.cmake
  14. +1 −0 Source/WebKit/SourcesGTK.txt
  15. +1 −0 Source/WebKit/SourcesWPE.txt
  16. +57 −0 Source/WebKit/UIProcess/API/glib/WebKitURIUtilities.cpp
  17. +37 −0 Source/WebKit/UIProcess/API/gtk/WebKitURIUtilities.h
  18. +5 −0 Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt
  19. +5 −0 Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml
  20. +1 −0 Source/WebKit/UIProcess/API/gtk/webkit2.h
  21. +37 −0 Source/WebKit/UIProcess/API/wpe/WebKitURIUtilities.h
  22. +5 −0 Source/WebKit/UIProcess/API/wpe/docs/wpe-0.1-sections.txt
  23. +5 −0 Source/WebKit/UIProcess/API/wpe/docs/wpe-docs.sgml
  24. +1 −0 Source/WebKit/UIProcess/API/wpe/webkit.h
  25. +20 −0 Tools/ChangeLog
  26. +1 −0 Tools/TestWebKitAPI/CMakeLists.txt
  27. +4 −0 Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
  28. +116 −0 Tools/TestWebKitAPI/Tests/WTF/URLHelpers.cpp
  29. +51 −0 Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitURIUtilities.cpp
  30. +1 −0 Tools/TestWebKitAPI/glib/CMakeLists.txt
@@ -1,3 +1,12 @@
2018-12-17 Ms2ger <Ms2ger@igalia.com>

[GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
https://bugs.webkit.org/show_bug.cgi?id=174816

Reviewed by Michael Catanzaro.

* TestExpectations: Enable fast/url/user-visible/.

2018-12-15 Youenn Fablet <youenn@apple.com>

Make RTCRtpSender.setParameters to activate specific encodings
@@ -68,7 +68,6 @@ fast/forms/search/search-padding-cancel-results-buttons.html [ Skip ]
fast/forms/search/search-results-hidden-crash.html [ Skip ]

# These tests don't have to be platform-specific, but they are only implemented on Mac now.
fast/url/user-visible [ Skip ]
fast/images/eps-as-image.html [ Skip ]

# Only Mac supports Dashboard widgets.
@@ -1,3 +1,43 @@
2018-12-17 Ms2ger <Ms2ger@igalia.com>

[GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
https://bugs.webkit.org/show_bug.cgi?id=174816

Reviewed by Michael Catanzaro.

Translate userVisibleString and dependent code into platform-neutral C++
in wtf/URLHelpers.{h,cpp}.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/URLHelpers.cpp: Added.
(WTF::URLHelpers::loadIDNScriptWhiteList):
(WTF::URLHelpers::isArmenianLookalikeCharacter):
(WTF::URLHelpers::isArmenianScriptCharacter):
(WTF::URLHelpers::isASCIIDigitOrValidHostCharacter):
(WTF::URLHelpers::isLookalikeCharacter):
(WTF::URLHelpers::whiteListIDNScript):
(WTF::URLHelpers::initializeDefaultIDNScriptWhiteList):
(WTF::URLHelpers::allCharactersInIDNScriptWhiteList):
(WTF::URLHelpers::isSecondLevelDomainNameAllowedByTLDRules):
(WTF::URLHelpers::isRussianDomainNameCharacter):
(WTF::URLHelpers::allCharactersAllowedByTLDRules):
(WTF::URLHelpers::mapHostName):
(WTF::URLHelpers::collectRangesThatNeedMapping):
(WTF::URLHelpers::applyHostNameFunctionToMailToURLString):
(WTF::URLHelpers::applyHostNameFunctionToURLString):
(WTF::URLHelpers::mapHostNames):
(WTF::URLHelpers::createStringWithEscapedUnsafeCharacters):
(WTF::URLHelpers::userVisibleURL):
* wtf/URLHelpers.h: Added.
* wtf/cocoa/NSURLExtras.mm:
(WTF::URLHelpers::loadIDNScriptWhiteList):
(WTF::decodePercentEscapes):
(WTF::decodeHostName):
(WTF::encodeHostName):
(WTF::URLWithUserTypedString):
(WTF::userVisibleString):

2018-12-15 Darin Adler <darin@apple.com>

Use warning-ignoring macros more consistently and simply
@@ -78,6 +78,7 @@
5CC0EE7621629F1900A1A842 /* URL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5CC0EE7421629F1900A1A842 /* URL.cpp */; };
5CC0EE892162BC2200A1A842 /* URLCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CC0EE862162BC2200A1A842 /* URLCocoa.mm */; };
5CC0EE8A2162BC2200A1A842 /* NSURLExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CC0EE882162BC2200A1A842 /* NSURLExtras.mm */; };
5FAD3AE221B9636600BEE178 /* URLHelpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5FAD3AE121B9636600BEE178 /* URLHelpers.cpp */; };
70A993FE1AD7151300FA615B /* SymbolRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 70A993FC1AD7151300FA615B /* SymbolRegistry.cpp */; };
70ECA60D1B02426800449739 /* AtomicStringImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 70ECA60A1B02426800449739 /* AtomicStringImpl.cpp */; };
7A05093F1FB9DCC500B33FB8 /* JSONValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A05093E1FB9DCC500B33FB8 /* JSONValues.cpp */; };
@@ -382,6 +383,8 @@
5D247B6E14689C4700E78B76 /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
5D247B7014689C4700E78B76 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
5D247B7314689C4700E78B76 /* WTF.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = WTF.xcconfig; sourceTree = "<group>"; };
5FAD3AE021B9636600BEE178 /* URLHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLHelpers.h; sourceTree = "<group>"; };
5FAD3AE121B9636600BEE178 /* URLHelpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLHelpers.cpp; sourceTree = "<group>"; };
6541CAF41630DB26006D0DEC /* CopyWTFHeaders.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = CopyWTFHeaders.xcconfig; sourceTree = "<group>"; };
70A993FC1AD7151300FA615B /* SymbolRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolRegistry.cpp; sourceTree = "<group>"; };
70A993FD1AD7151300FA615B /* SymbolRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolRegistry.h; sourceTree = "<group>"; };
@@ -980,6 +983,8 @@
A8A472CE151A825B004123FF /* MetaAllocator.h */,
A8A472CF151A825B004123FF /* MetaAllocatorHandle.h */,
FE7497ED209163060003565B /* MetaAllocatorPtr.h */,
5FAD3AE121B9636600BEE178 /* URLHelpers.cpp */,
5FAD3AE021B9636600BEE178 /* URLHelpers.h */,
0F66B2821DC97BAB004A1D3F /* MonotonicTime.cpp */,
0F66B2831DC97BAB004A1D3F /* MonotonicTime.h */,
FE8225301B2A1E5B00BA68FD /* NakedPtr.h */,
@@ -1502,6 +1507,7 @@
0F66B28C1DC97BAB004A1D3F /* MonotonicTime.cpp in Sources */,
5CC0EE8A2162BC2200A1A842 /* NSURLExtras.mm in Sources */,
A8A473F4151A825B004123FF /* NumberOfCores.cpp in Sources */,
5FAD3AE221B9636600BEE178 /* URLHelpers.cpp in Sources */,
A8A473F7151A825B004123FF /* OSAllocatorPosix.cpp in Sources */,
A8A473F9151A825B004123FF /* OSRandomSource.cpp in Sources */,
A8A47402151A825B004123FF /* PageBlock.cpp in Sources */,
@@ -241,6 +241,7 @@ set(WTF_PUBLIC_HEADERS
TriState.h
TypeCasts.h
URL.h
URLHelpers.h
URLHash.h
URLParser.h
UUID.h
@@ -398,6 +399,7 @@ set(WTF_SOURCES
TimeWithDynamicClockType.cpp
TimingScope.cpp
URL.cpp
URLHelpers.cpp
URLParser.cpp
UUID.cpp
WTFAssertions.cpp

0 comments on commit b078eca

Please sign in to comment.