feat(libSceNKWebKit): implement foldQuoteMarks, defaultMIMEType and redirectChainAllowsReuse #15213
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15213"
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 ashwin280802 on 2026-11-02T20:52:00Z.
What
Implements three
libSceNKWebKitexports that previously threw throughNotImplemented_nid_no_patch:WebCore::foldQuoteMarks(const WTF::String&)maps the typographic quotation marks to"or'. It returns the same string when nothing changes.WebCore::defaultMIMEType()returns a staticapplication/octet-streamstring with the refcount, 8-bit and cost-reported bits set as in the pinned StringImpl.h.WebCore::redirectChainAllowsReusefollows CacheValidation.cpp L166-L177: no redirection allows reuse, an uncached redirection does not, a cached redirection allows it whenreuseExpiredRedirectionis set or the host wall clock has not passedendOfValidity. A status outside the three enumerators returns false where the source asserts.The console layout of the static string and the clock source are unmeasured and recorded in the
libSceNKWebKitdebt file.Open PRs touching the same files: adjacent lines in
docs/dev/debt/libSceNKWebKit.md(the export table),WtfExports.hppandtests/Wtf.cpp(#14607) andWebCoreTypes.hpp(#15125). #13486, #13515 and #14212 conflict withmain, so I compared their diffs against the merge base by hand: #13515 and #14212 add no lines naming these functions, and #13486 only carries the same three exports as unimplemented stubs picked up from oldermain. None implements them.Tested
Windows 11 (10.0.26300), MinGW GCC,
build-full, commit 230241356a194fe27b9670780a05ecb764683372:ctest --test-dir build-full -R ^(nkwebkit_|guest_nkwebkit_) --no-tests=errorpython3 tools/check_conventions.py --base origin/mainI changed 13 conditions and statements one at a time. The new tests failed on 8, one change did not build, and the other four are compile-time layout checks.
The full local test run also hit three failures, in
log_macros,log_macros_timestampsandagc_driver_direct_write_completion. This PR touches none of them, and all three fail the same way onorigin/main9090972b7e(detached worktree, same machine):Not covered by a test: the four
static_assertlayout checks onRedirectChainCacheStatusinWebCoreTypes.hpp; they are compile-time and no runtime test can observe them.Not verified: Linux; other suites; console behaviour.
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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T20:56:19Z.
Review: COMMENTED
Reviewed — no blocking findings
The three implementations match the pinned WebKit behavior I inspected, but I’m withholding approval because the six hosted checks are queued and the PR’s reported test SHA differs from the live head.
What I ran
Reviewed all nine changed files at head
fe5ce0bd7b15573cf94ead589858281ff8161ccc, against base9090972b7e91fd266819cbd77a8b058e177b5682. The head merges cleanly with that base. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build or compile.Results
Wtf.cppis included by the CMake test glob.Commands and check output
The precheck table is reproduced without edits:
The precheck deliberately does not configure, build, or compile AnyPS5.git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...fe5ce0bd7b15573cf94ead589858281ff8161ccc/usr/bin/python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 --head fe5ce0bd7b15573cf94ead589858281ff8161ccc --title feat(libSceNKWebKit): implement foldQuoteMarks, defaultMIMEType and redirectChainAllowsReuse --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15213-fe5ce0bd7b15/pr-body.md/usr/bin/python3 tools/pr_abi_audit.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 --head fe5ce0bd7b15573cf94ead589858281ff8161ccc --jsonNo changed Python implementation files.No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.No changed test_*.py files./usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 15213 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15213-fe5ce0bd7b15/stackNot run: C++ tests need exact-head binaries, which require a build; the precheck does not build./usr/bin/python3 /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15213-fe5ce0bd7b15/head-fe5ce0bd7b15-0ea90bd3/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15213-fe5ce0bd7b15/head-fe5ce0bd7b15-0ea90bd3 --json core/libs/prx/libSceNKWebKit/Export.cpp core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp core/libs/prx/libSceNKWebKit/include/WebCoreExports.hpp core/libs/prx/libSceNKWebKit/include/WtfExports.hpp core/libs/prx/libSceNKWebKit/src/PureWebCore.cpp core/libs/prx/libSceNKWebKit/src/WebCoreTypes.hpp core/libs/prx/libSceNKWebKit/src/WtfString.cpp core/libs/prx/libSceNKWebKit/tests/Wtf.cpp docs/dev/debt/libSceNKWebKit.mdNo changed Python test module in tools/ can be run as a no-build base-source control.The precheck could not find the ABI and test-quality helper scripts in its isolated PR snapshot. I ran both available workspace helpers separately; the ABI audit returned zero findings, and the test-quality heuristic returned no findings.
Negative control
The PR description reports one-at-a-time mutations, but I did not independently run those controls.
Findings
Blocking
None found in the reviewed source.
Non-blocking
The PR description reports Windows tests and mutation controls at commit
230241356a194fe27b9670780a05ecb764683372; the live PR head isfe5ce0bd7b15573cf94ead589858281ff8161ccc. Please confirm or correct the tested SHA. I did not treat that report as exact-head test evidence.Sources
Not verified
I did not build or run CTest, the changed
Wtf.cppsuite, Linux tests, or PS5 console behavior. The six hosted checks were queued at the final refresh. The reported Windows tests and negative controls name a different SHA and were not independently verified.To get this to a good state
No code change is requested from source review. Confirm the tested SHA and let the queued hosted checks finish. If the head changes, I will rerun the precheck and relevant checks on the new head before revisiting approval.
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T15:43:23Z.
Review: APPROVED
Reviewed — approved
foldQuoteMarks,defaultMIMETypeandredirectChainAllowsReusebuild, pass their new tests on the merged tree, and the tests fail when I changed the implementation, so I found nothing blocking.What I ran
Head
234be1ae90152d7716c08e4b252f740b4b9e65ee,main4f41f4c375f5abb487dbd184fbc150f31994d762, merged with--no-ff(tree2e47ec6016a2aa533f00403a0650f24b44de1ca1). Debian 13 VM (2× Xeon Gold 6136, 32 vCPU), GCC 14.2.0, Release, Ninja.Results
git diff --checkcheck_conventions.pyunwrap_self_UnwrapTest_test_new_output_inherits_the_destination_directory_groupalso fails onmain, so it is not this PR'snkwebkit_*/guest_nkwebkit_*(11 tests)nkwebkit_wtf0.02 sctest excerpt
Negative control
If I restored the production files from
main, the test would only fail to compile, because the declarations would be gone. That proves little, so instead I changed the implementation one way at a time on the merged tree:FoldQuoteMark:case 0xFF63→case 0xFF64nkwebkit_wtf_testsaborts:failed at line 795DefaultMIMETypeflags| 12→| 28(marks the string as an atom)redirectChainAllowsReuse:reuseExpiredRedirection != 0→== 1redirectChainAllowsReuse:<=→>=against the wall clockI then restored the merged files and rebuilt. The test passes again, and
git status --porcelainis empty.MarcZX10's review said the description's test SHA (
230241356a…) differs from the head. My run is on the exact head234be1ae, so that point is now covered by independent evidence.Findings
Blocking
None.
Non-blocking
RedirectChainCacheStatusis not cited.core/libs/prx/libSceNKWebKit/src/WebCoreTypes.hpp:147-148putsendOfValidityat offset 0 andstatusat offset 8, and thestatic_asserts at lines 170-171 lock that order in. As I remember the upstreamCacheValidation.h, it declaresStatus status;beforeWallTime endOfValidity;. I could not check the pinned source offline. For this export the order makes no difference. The struct is passed by value, and under SysV its double eightbyte goes to an SSE register and the byte eightbyte to an integer register, in either order. The disassembly confirms this: the function readsstatusfromdilandendOfValidityfromxmm0. The order would matter as soon as another export reads the struct through a pointer or reference. Suggested fix: check the order against the pinnedCacheValidation.hand either match it or name the source in the debt entry.Not verified
TextIterator.cpp. I had no network access. MarcZX10's review reports that it matches.application/octet-streamStringImpl. The debt entry records both as unmeasured.APS5_VABI.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-05T00:25:11Z.
Review: COMMENTED
Re-checked — new head, no blocking findings
foldQuoteMarks,defaultMIMETypeandredirectChainAllowsReusematch the pinned upstream WebKit source; the head conflicts withmain, and I did not build or run the tests.What I ran
Head
e476435e547a944f9a8913102d11a39d18692582, current base9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c. I read the whole diff (9 files) and compared the three functions and the struct layout with the pinned upstream source (neonmodder123/PS5-WebKit-11.xat80f77e94c63ee7202eec3d4b5b1a021dd89011ba). Environment: Debian 12, Linux x86_64. No AnyPS5 build was run.Results
maindefaultMIMETypestring flagsredirectChainAllowsReuseagainst upstreamRedirectChainCacheStatuslayoutnkwebkit_wtfPrecheck report for this head, unedited table
git diff --check 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c...e476435e547a944f9a8913102d11a39d18692582/marc/DeusMachina_0x1914/.venv/bin/python3 tools/check_conventions.py --base 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c --head e476435e547a944f9a8913102d11a39d18692582 --title feat(libSceNKWebKit): implement foldQuoteMarks, defaultMIMEType and redirectChainAllowsReuse --body /tmp/anyps5-pr-precheck/final/15213/pr-body.md/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_abi_audit.py --base 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c --head e476435e547a944f9a8913102d11a39d18692582 --json/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 15213 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/final/15213/stack/marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/final/15213/head-e476435e547a-5cbec0fc --json core/libs/prx/libSceNKWebKit/Export.cpp core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp core/libs/prx/libSceNKWebKit/include/WebCoreExports.hpp core/libs/prx/libSceNKWebKit/include/WtfExports.hpp core/libs/prx/libSceNKWebKit/src/PureWebCore.cpp core/libs/prx/libSceNKWebKit/src/WebCoreTypes.hpp core/libs/prx/libSceNKWebKit/src/WtfString.cpp core/libs/prx/libSceNKWebKit/tests/Wtf.cpp docs/dev/debt/libSceNKWebKit.mdNegative control
Not run. I read
TestFoldQuoteMarks,TestDefaultMIMETypeandTestRedirectChainAllowsReusebut did not run or mutate them.Findings
Blocking
None.
Non-blocking
main. The PR is DIRTY and labeledneeds rebase; the conflicts sit in shared export and debt files.234be1ae9015), so it does not covere476435e547a.Sources
github.com/boykopovar/AnyPS5@e476435e54/core/libs/prx/libSceNKWebKit/src/WtfString.cpp (L463)(FoldQuoteMark), #L502 (FoldQuoteMarks), #L517 (DefaultMIMEType)github.com/boykopovar/AnyPS5@e476435e54/core/libs/prx/libSceNKWebKit/src/PureWebCore.cpp (L54-L65)github.com/boykopovar/AnyPS5@e476435e54/core/libs/prx/libSceNKWebKit/src/WebCoreTypes.hpp (L140-L149)foldQuoteMark:github.com/neonmodder123/PS5-WebKit-11.x@80f77e94c6/Source/WebCore/editing/TextIterator.cpp (L1627-L1664)redirectChainAllowsReuse:github.com/neonmodder123/PS5-WebKit-11.x@80f77e94c6/Source/WebCore/platform/network/CacheValidation.cpp (L166-L178)github.com/neonmodder123/PS5-WebKit-11.x@80f77e94c6/Source/WTF/wtf/text/StringImpl.h (L221-L222)Not verified
nkwebkit_wtfandpublic_headerson any platform. The GPU CI comment I found names the older head, not this one.RedirectChainCacheStatusby value through the APS5 export on each calling convention; the PR notes say it was checked, and I did not confirm it.To get this to a good state
mainand resolve the export-table and debt-file conflicts.nkwebkit_wtfandpublic_headerson the new head and post the output, so a new approval can name that head.