feat(libSceNKWebKit): implement WKSecurityOrigin values #14925
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14925"
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 w4rc0n on 2026-11-02T01:32:20Z.
What
All of the
WKSecurityOriginfunctions exceptWKSecurityOriginGetTypeIDwereNotImplementedstubs, so a title using the WebKit C API couldn't create an origin or read one. Five of them now follow the pinned PS5 WebKit 11.xWKSecurityOriginRef.cpp:WKSecurityOriginCreatestores the protocol, host and port exactly as given, asAPI::SecurityOrigin::createdoes. It doesn't parse a URL or normalize default ports.WKSecurityOriginCopyProtocol,CopyHost,GetPortandCopyToStringfollowSecurityOriginData:filegivesfile://;Three functions stay
NotImplemented, and the debt entry records why:WKSecurityOriginCopyDatabaseIdentifierneedsFileSystemImpl::encodeForFileName, which #14858 implements.WKSecurityOriginCreateFromStringneeds URL parsing.WKSecurityOriginCreateFromDatabaseIdentifierdrops default ports throughWTF::isDefaultPortForProtocol, which #13766 implements.tools/pr_overlap.pyon this head: no open PR changes these exports or adds the same files. These open PRs conflict on text only, in the inventory count line ofdocs/dev/debt/libSceNKWebKit.md, neighbouring stubs inExport.cppandInventoryExports.hpp, or adjacent debt entries: #13766, #13930, #13947, #13992, #14138, #14164, #14172, #14303, #14345, #14387, #14391, #14479, #14607, #14858, #14860, #14865. Whichever merges later keeps both sides. #13515, #14152 and #14212 conflict withmain, so the tool couldn't compare them; read by hand, none of them changes these exports.Tested
Debian 12, GCC 12.2, Linux 6.18, Release, at the head
a92710859c1afdfebbeb85b75a1cbf55d040e1a3, no local changes:nkwebkit_base,nkwebkit_config,nkwebkit_jsc,nkwebkit_preferences,nkwebkit_webcoregeometry,nkwebkit_wtf,guest_nkwebkit_dates,guest_nkwebkit_numbers,nkwebkit_constants,nkwebkit_fastbitvectorandpublic_headerspass.nkwebkit_basecases cover:filein both cases, empty and null strings, and hosts with reserved characters;tools/progress.py: the five exports count as implemented (libSceNKWebKit 1299, 1294 onmain).tools/check_conventions.pypasses.417ba136d43687938f47d0a9bffa9d4d6a0aefce. It is AnyPS5'sBuildworkflow, dispatched in the author's fork withselect=true: the branch merged intomainat93dbd0f82aea684e95f15f06e7d42c0064af18cf, built onwindows-latestwith WinLibs GCC 15.2 (MinGW-w64, UCRT). None of the 672 selected tests failed; 6 AGC tests were skipped, whichcheck_skips.pyaccepts. That includes the nine NKWebKit tests,public_headersandpatched_libraries. The rebase ontomainat7feb37ee3e30e10139b483fb4df689d5b5b69ab8after #14479 changed onlydocs/dev/debt/libSceNKWebKit.md, sogit range-diffshows the code and tests under test are the same as at that run. A fork-internal pull request existed only to give the workflow a number.Not built or run: macOS. No title or homebrew was run.
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 BunnyFl on 2026-11-02T03:38:31Z.
Review: APPROVED
Windows 11, WinLibs GCC 15.2.0 r7, Release. Head 417ba136d4 merged into upstream/main
93dbd0f82a:nkwebkit_base,nkwebkit_wtf,nkwebkit_config,nkwebkit_jsc,nkwebkit_preferences,nkwebkit_webcoregeometry,guest_nkwebkit_dates,guest_nkwebkit_numbers,nkwebkit_constantsandpublic_headers: 10/10 pass.port &&condition dropped fromWKSecurityOriginCreate, a port of 0 is stored, andnkwebkit_basefails in the origin-string check (CheckOriginString, line 56).Checked against the pinned
WKSecurityOriginRef.cpp:WKSecurityOriginCreatesetsvalidPortonly forport && port <= numeric_limits<uint16_t>::max(), assigning theint, so a negative port narrows to 16 bits as you describe;GetPortisport().value_or(0);CopyToStringgoes throughSecurityOriginData::toString.The three exports left throwing, with their dependencies on #14858 and #13766 recorded, seem like the right cut.