feat(libSceNKWebKit): implement WebCore static value helpers (reduceTimeResolution, platformDefaultMediaSourceEnabled, scriptNameToCode) #19680
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19680"
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 B-Howell on 2026-11-13T19:45:43Z.
What
Implements three existing throwing
libSceNKWebKitstubs from the pinned PS5 WebKit sources (neonmodder123/PS5-WebKit-11.x@80f77e94):WebCore::ResourceLoadStatistics::reduceTimeResolution(WTF::WallTime): floors the seconds to the 5-secondtimestampResolution(ResourceLoadStatistics.cpp L38, L566-569).WallTimeis onedouble, passed and returned inxmm0(static_asserton its size and alignment).WebCore::SettingsBase::platformDefaultMediaSourceEnabled(): returnstrue, the non-CocoaENABLE(MEDIA_SOURCE)body (SettingsBase.cpp L87-91).WebCore::scriptNameToCode(const WTF::String&): the 106-entry ISO 15924 table of LocaleToScriptMapping.cpp L40-158, matched likePackedLettersLiteralinSortedArrayMap: exactly four ASCII characters, ASCII case-insensitive; anything else (including a nullStringand 16-bit non-ASCII) returnsUSCRIPT_INVALID_CODE. TheUScriptCodevalues come from the existing3rdparty/icusubmodule'suscript.h(libSceNKWebKitnow linksicu_commonprivately for the header, aslibharfbuzzdoes), not copied constants.The declarations move from
InventoryExports.hpp/LegacyExports.hppto a typedWebCoreValueHelpersExports.hpp; the two inventory rows are removed fromdocs/dev/debt/libSceNKWebKit.mdand a debt entry records that console behaviour is unverified.SQLiteFileSystem::computeHashForFileNameis left for after #19330 (PAL::CryptoDigest) so this PR has no dependency.tools/progress.pylibraries done: 15750 -> 15753 (+3).Tested
Linux (WSL2 Ubuntu, clang, Release), new
nkwebkit_webcorevaluehelperstest:NotImplemented_nid_no_patch, as onmain):0% tests passed, 1 tests failed out of 1(_ZN7WebCore22ResourceLoadStatistics20reduceTimeResolutionEN3WTF8WallTimeE not implemented).ctest -R '^nkwebkit_webcorevaluehelpers$' --repeat until-fail:3passed 3/3.reduceTimeResolution12 -> 10, 15 -> 15, -1 -> -5, 0 -> 0, 4.999 -> 0, 1700000003.75 -> 1700000000, inf -> inf, NaN -> NaN;platformDefaultMediaSourceEnabled-> true;scriptNameToCodearab/ARAB-> 2,Cyrl-> 8,latn-> 25,hani-> 17,hans-> 73,kore-> 18,Hira/jpan-> 54,qaai-> 1,zyyy-> 0,zxxx-> 102,zzzz-> 103, 16-bitLaTn-> 25;abc,arabx, empty,ar@b,zinh, 16-bit\u0161rab,arab\0,ar\0band a nullString-> -1.ctest -R '^public_headers': 65/65 passed (the new header is in the manifest).7d58eaeaf85:WebCoreValueHelpers.cppusedstd::begin/std::endon the script table without<iterator>; GCC 13 and 15 libstdc++ do not declare them through<algorithm>(PrivacyOnion's report). Added#include <iterator>. Windows 11, WinLibs GCC 15.2.0, Release: red, previous head: the same fiveno matching function for call to 'begin(const std::pair<unsigned int, UScriptCode> [106])'errors; green, this head:nkwebkit_webcorevaluehelpers_testsbuilds andctest -R '^nkwebkit_webcorevaluehelpers$' --repeat until-fail:3passes. Conventions passed.803a87173d2, an ordinary merge ofmainate90cbbc086f: an include-line conflict inlibSceNKWebKit.hppwith #19300 (VP codec), resolved by keeping both. Rebuilt on WSL Ubuntu, GCC, Release:nkwebkit_webcorevaluehelpersand #19300'snkwebkit_vpcodecpassed. Conventions passed.803a87173dmerged onto main752c0f776b(report):nkwebkit_webcorevaluehelperspassed 3/3, none skipped.385399cb99brewrites eachDerived fromline asDerived from <path>@<40-character revision>, one line per source file (maintainer ruling, #19819 comment). No code changed, so no rebuild;tools/check_conventions.py --base origin/mainpasses andgit diff --checkis clean.e3cb7746dfa: Windows 11, WinLibs GCC 15.2, Release, all 18 of our main merges from this round built together on main790e9a371cc:ctest -R nkwebkit116/116 passed,patched_librariespassed once the #19822 fix was in. Re-merged ontob9fb5ab5a32(no NKWebKit changes in between);check_conventionspassed.ca7aee7242: merged mainc3d38470e0cand moved this PR's debt edits intodocs/dev/debt/changes/claude-nkwebkit-webcore-static-values.md; the debt files match main, and the fragment applied to main gives the same debt lines as the previous head.debt_fold.py --checkandcheck_conventions.py --base origin/mainpass. Documentation only, no build.1cd592e0f8e: ordinary merge ofmaincf058cf14bc. AlibSceNKWebKit/CMakeLists.txtconflict with the libpsl link from #20516, resolved by keeping both (icu_commonpluspsl). WSL2 Ubuntu, Release:nkwebkit_webcorevaluehelpers_testsbuilt,ctest -R ^nkwebkit_webcorevaluehelpers$passed 1/1. The debt files matchmain;debt_fold.py --checkandcheck_conventions.py --base origin/mainpass.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 PrivacyOnion on 2026-11-13T19:47:59Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
8cb711469f:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_webcorevaluehelpers_testsfailed to build.Generated withfooter from the description; the AI-assisted checkbox can stay.Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T04:51:49Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
15c430a557:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_webcorevaluehelpers_testsbuilt cleanly.nkwebkit_webcorevaluehelpers):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,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
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T23:54:20Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
1c3a6dfb4b:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_webcorevaluehelpers_testsbuilt cleanly.nkwebkit_webcorevaluehelpers):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,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
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T04:36:37Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
1d1add1f29:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_webcorevaluehelpers_testsbuilt cleanly.nkwebkit_webcorevaluehelpers):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,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
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T21:27:39Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
e3cb7746df:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_webcorevaluehelpers_testsbuilt cleanly.nkwebkit_webcorevaluehelpers):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,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
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T23:32:57Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
ca7aee7242:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_webcorevaluehelpers_testsbuilt cleanly.nkwebkit_webcorevaluehelpers):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,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
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-16T02:03:35Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
1cd592e0f8:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_webcorevaluehelpers_testsbuilt cleanly.nkwebkit_webcorevaluehelpers):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,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