feat(libSceNKWebKit): implement HTML integer, CORP header and line ending exports #15516
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15516"
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 Jawschamp on 2026-11-03T17:10:09Z.
What
Implements 5 libSceNKWebKit exports that threw
NotImplemented_nid_no_patchas parameterless placeholders:WebCore::parseHTMLInteger,WebCore::parseCrossOriginResourcePolicyHeader, andWTF::normalizeLineEndingsToLF,normalizeLineEndingsToCRLFandnormalizeLineEndingsToNative. Their placeholders leaveExport.cppandinclude/InventoryExports.hpp, anddocs/dev/debt/libSceNKWebKit.mdgoes from 7437 to 7432 additional exports and loses their 5 table rows. Declarations with real signatures are in the newinclude/WebCoreParsersExports.hpp, the code insrc/WebCoreParsers.cpp.HTMLParserIdioms.cpp,HTTPParsers.cppandLineEnding.cpp.parseHTMLIntegerreturnsExpected<int, HTMLIntegerParsingError>, an 8-byte trivially copyable value returned inrax; this layout (value in the low 4 bytes, flag at byte 4) is asserted at compile time but assumed from the pinnedExpected.h, not seen in a console binary.Vector<unsigned char>by move ({buffer, capacity, size}); a vector's buffer is assumed to come fromfastMalloc.normalizeLineEndingsToNativeis LF, as for non-Windows builds of the pinned source.StringViewwith a null pointer and a non-zero length throws.parseHTMLNonNegativeIntegeranddefaultMIMEType, which open PRs #15241 and #15213 already implement.Tested
Linux x86_64, GCC 14.2 (g++ extracted from Debian trixie packages),
-DBUILD_TESTING=ON. Hardware and titles: not tested.nkwebkit_webcoreparsers(auto-registered fromtests/WebCoreParsers.cpp) runs in well under a second. The integer cases are generated from the 20 success and 22 failure cases in the pinned TestWebKitAPIHTMLParserIdiomstest, run for 8-bit and 16-bit strings, and the line-ending cases port the pinned TestWebKitAPILineEndingtest; the header cases are derived by hand from the pinned source, because native WebKit cannot be run for a differential test.ctest -R nkwebkitpasses all 12 tests.tools/check_conventions.py --base origin/main,tools/check_test_registration.pyandcore/libs/tests/test_public_headers.py --audit-onlypass.tools/pr_overlap.py --branch fix/nkwebkit-html-http-parsers-v2reports no open PR with the same new files. Its only same-exports hit is #13486, a stacked draft relinker PR whose own diff is 3 relinker files and none of these exports. It reports textual overlap with thedocs/dev/debt/libSceNKWebKit.mdcount line of many open libSceNKWebKit PRs, and could not compare #13486, #13515, #14138, #14152, #14212, #14259, #14999, #15011, #15173, #15175, #15184, #15213, #15216, #15217, #15218 and #15224 because they conflict withmain; their diffs (checked withgh pr diff) add none of the 5 exports.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)