WebKit icon indicating copy to clipboard operation
WebKit copied to clipboard

Implement URLPatternInit support for URLPatternAPI

Open jelee53 opened this issue 1 year ago โ€ข 4 comments

ce36d5e8aaae77d1d740a47597d944b9fa9ef843

Implement URLPatternInit support for URLPatternAPI
https://bugs.webkit.org/show_bug.cgi?id=281711
rdar://138169179

Reviewed by NOBODY (OOPS!).

URLPattern API spec for processing a URLPatternInit: https://urlpattern.spec.whatwg.org/#process-a-urlpatterninit

* Source/WebCore/Headers.cmake:
* Source/WebCore/Modules/url-pattern/URLPattern.cpp:
(WebCore::escapeStringForCharacters):
(WebCore::escapeString):
(WebCore::processBaseURLString):
(WebCore::processInit):
(WebCore::URLPattern::create):
(WebCore::URLPattern::URLPattern):
* Source/WebCore/Modules/url-pattern/URLPattern.h:
* Source/WebCore/Modules/url-pattern/URLPatternCanonical.cpp: Added.
(WebCore::isInvalidIPv6HostCodePoint):
(WebCore::isAbsolutePathname):
(WebCore::canonicalizeProtocol):
(WebCore::canonicalizeUsername):
(WebCore::canonicalizePassword):
(WebCore::canonicalizeHost):
(WebCore::canonicalizeIPv6Host):
(WebCore::canonicalizePort):
(WebCore::canonicalizeOpaquePath):
(WebCore::canonicalizePath):
(WebCore::canonicalizeSearch):
(WebCore::canonicalizeHash):
* Source/WebCore/Modules/url-pattern/URLPatternCanonical.h: Copied from Source/WebCore/Modules/url-pattern/URLPatternInit.h.
* Source/WebCore/Modules/url-pattern/URLPatternInit.h:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:

https://github.com/WebKit/WebKit/commit/ce36d5e8aaae77d1d740a47597d944b9fa9ef843

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
โœ… ๐Ÿงช style โœ… ๐Ÿ›  ios โœ… ๐Ÿ›  mac โœ… ๐Ÿ›  wpe โœ… ๐Ÿ›  win
โœ… ๐Ÿงช bindings โœ… ๐Ÿ›  ios-sim โœ… ๐Ÿ›  mac-AS-debug โœ… ๐Ÿงช wpe-wk2 โœ… ๐Ÿงช win-tests
โœ… ๐Ÿงช webkitperl โœ… ๐Ÿงช ios-wk2 โœ… ๐Ÿงช api-mac โœ… ๐Ÿงช api-wpe
โœ… ๐Ÿงช ios-wk2-wpt โœ… ๐Ÿงช mac-wk1 โœ… ๐Ÿ›  wpe-cairo
loading ๐Ÿงช api-ios โœ… ๐Ÿงช mac-wk2 โœ… ๐Ÿ›  gtk
โœ… ๐Ÿ›  vision โœ… ๐Ÿงช mac-AS-debug-wk2 โŒ ๐Ÿงช gtk-wk2
โœ… ๐Ÿ›  vision-sim โœ… ๐Ÿงช mac-wk2-stress โœ… ๐Ÿงช api-gtk
โœ… ๐Ÿงช vision-wk2 โœ… ๐Ÿงช mac-intel-wk2
โœ… ๐Ÿ›  tv โœ… ๐Ÿ›  mac-safer-cpp
โœ… ๐Ÿ›  tv-sim
โœ… ๐Ÿ›  watch
โœ… ๐Ÿ›  watch-sim

jelee53 avatar Oct 18 '24 07:10 jelee53

Safer C++ Build #2511

:x: Found 1 new failure. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. (cc @rniwa)

webkit-ews-buildbot avatar Oct 18 '24 11:10 webkit-ews-buildbot

Can you update the URLPatternAPIEnabled flag to testable and update expectations for imported tests in this patch? It seems hard to validate the implementation of algorithms without any test.

The PR is already very large. I think we can investigate enabling the tests in a follow up. There isn't much that is working yet anyway.

cdumez avatar Oct 23 '24 02:10 cdumez

Can you update the URLPatternAPIEnabled flag to testable and update expectations for imported tests in this patch? It seems hard to validate the implementation of algorithms without any test.

The PR is already very large. I think we can investigate enabling the tests in a follow up. There isn't much that is working yet anyway.

ok we can do it in followup then

szewai avatar Oct 23 '24 05:10 szewai

Committed 285640@main (1e937703de6a): https://commits.webkit.org/285640@main

Reviewed commits have been landed. Closing PR #35412 and removing active labels.

webkit-commit-queue avatar Oct 24 '24 06:10 webkit-commit-queue