feat(libSceNKWebKit): implement public suffix classification #20516
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/20516"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Mcm190 on 2026-11-15T08:02:36Z.
What
Implements the formerly throwing
WebCore::isPublicSuffix(const WTF::String&)export (_ZN7WebCore14isPublicSuffixERKN3WTF6StringE). It lowercases through the existing locale-independent WTF/ICU path, converts to UTF-8, and queries the already bundled libpsl withPSL_TYPE_ANY | PSL_TYPE_NO_STAR_RULE. Empty/null WTF strings return false. Both ICANN and private suffixes participate; implicit wildcard fallback for unknown suffixes is disabled.Adapted from WebKit PublicSuffixCurl.cpp at c55364d53f971f63a709976f168d932d558b8909, whose copyright/license is retained verbatim at the top of the new source file. libpsl is an existing submodule built from source by the existing CMake helper. The guest prototype becomes typed and its old parameterless declaration/stub is removed.
The console's suffix dataset, libpsl version and binary object layouts remain unmeasured; the debt fragment records those limits. This uses the repository's existing WTF String ownership, case conversion and UTF-8 helpers. No new pointer-safety guarantee is claimed for malformed non-null WTF objects.
Coverage against current main: libSceNKWebKit 3,114/11,259 (27.66%) -> 3,115/11,259 (27.67%), exactly one additional implemented export. This is export coverage, not console compatibility.
Overlap: the full name lookup found no open PR implementing this export. The final branch check flagged 33 PRs sharing the large WebKit export/header/build files, including PRs that cannot merge with main; it failed closed. Inspected their shared-file patches and export bodies: 29 retain the unchanged throwing stub and four older PR trees do not yet contain the export. None changes public-suffix code or libpsl integration. Shared inventory/CMake/header hunks may need reconciliation as those PRs land; no automated all-clear is claimed. No dependency on those PRs.
Tested
Linux x86-64 (Fedora, GCC 16, Release), rebased onto main
70b4f2b3cc:nkwebkit_publicsuffix_tests,nkwebkit_wtf_tests,nkwebkit_wtftext_tests.nkwebkit_publicsuffix,nkwebkit_wtf,nkwebkit_wtftext,public_headers,export_gap,progress_report: 6/6 pass.tools/check_conventions.py --base origin/main, debt folding andgit diff --checkpass.tools/progress.py --comparereports exactly +1 implemented export with no new exports declared.Not tested on Windows, with a title or on a console. No performance claim.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T08:21:47Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the review is incomplete because the full text of
Export.cppwas excluded from the review folder.What I ran
Reviewed head
d6f976d9a4c758aa0719e3d843be6de48a494143, with basemainas recorded in the prepared review materials. I read the description, commit list, diff, manifest, README, and the changed code available throughrepo_read.py. No tests or build commands were run; reported test results below are author-supplied.Results
Export.cppfull text excludedFindings
Blocking
None verified in the code read.
Export.cppwas not fully read, so this is not a complete review.Non-blocking
None.
Not verified
Export.cpp(excluded by review-folder size limit); its removal hunk was visible indiff.patch.description.md,commits.md,manifest.json,README.md,diff.patch; changed code:CMakeLists.txt,Export.cpplines 3980–4000,LegacyExports.hppdiff hunk,PublicSuffixExports.hpp,libSceNKWebKit.hppdiff hunk,PublicSuffix.cpp,tests/PublicSuffix.cpp, and the debt fragment. Excluded: fullExport.cpp.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T08:30:01Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
d6f976d9a4:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_publicsuffix_testsbuilt cleanly.nkwebkit_publicsuffix):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me