feat(libSceNKWebKit): implement WebCore::MIMETypeRegistry extension, path, Java applet and system-preview lookups #19636
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19636"
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-13T17:11:12Z.
What
Implements five
WebCore::MIMETypeRegistryexports that threw:mimeTypeForExtension,mimeTypeForPath,mediaMIMETypeForExtension,isJavaAppletMIMETypeandisSystemPreviewMIMEType. All five are static member functions takingconst WTF::String&, with no object, so any guest code that imports libSceNKWebKit can call them directly.src/Mime.cpp, which comes from the pinned 11.x source. That table also mapsmjs,mp4andwebp, which upstream's table of that time does not.mimeTypeForPathlooks up the text after the last.of the path and returnsdefaultMIMEType()(application/octet-stream) when there is no.or the extension is unknown.mediaMIMETypeForExtensionchecks the media table first, then falls back tomimeTypeForExtension, as upstream does.isSystemPreviewMIMETypekeeps that revision's sorted-array search with ASCII case folding.mediaMIMETypeForExtensionreturns the empty string for a null extension; upstream dereferences it.Export.cppandLegacyExports.hppto typed prototypes inMimeExports.hpp.systemPreviewMIMETypesstill throwsNotImplemented_nid_no_patch. Before WebKit/WebKit@c650d41f89 (April 2021) it returns aHashSetreference, and after it aFixedVectorby value. Which of the two return ABIs the 3.20 module uses is unverified, and guessing would corrupt the caller's stack. The debt entry records this and that none of these exports have been compared with a console module.The debt count stays at main's 5939 of 8703: the five stubs were
LegacyExports.hppdeclarations, not inventory rows.Tested
Ubuntu WSL2, GCC 11.4, Release, Ninja.
c7e3d232f4b(maindc19132bac2):nkwebkit_mimetyperegistrypasses 3/3. The newTestLegacyLookupschecks the following:model/usdzandmodel/us.fdeccae456eonly shortens the debt entry.8bbf2498927is an ordinary merge of main at667dbde5131; main's 14 new commits touch no libSceNKWebKit file, so it was not rebuilt.tools/check_conventions.py --base origin/mainpassed on8bbf2498927.tools/pr_overlap.py --jobs 8failed closed: agit diffsubprocess exited with 0xC0000142 on Windows. By hand: none of the 78 open PRs touching libSceNKWebKit names these symbols or their NIDs in changed lines.8bbf249892merged ontomaind261fa6f56(68712fd96f, clean merge), Windows 11, WinLibs GCC 15.2 UCRT, Release:nkwebkit_mimetyperegistrypassed 3/3, none skipped.7e233f67b9cadds theDerived fromlines naming MIMETypeRegistry.cpp and MIMETypeRegistryPlayStation.cpp at e12a212a531a tosrc/Mime.cpp(maintainer ruling, #19819 comment). No code changed, so no rebuild;tools/check_conventions.py --base origin/mainpasses andgit diff --checkis clean.e891549c59: merged mainc3d38470e0cand moved this PR's debt edits intodocs/dev/debt/changes/claude-nkwebkit-mimetype-lookups.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.0906ab6d4c2(maine48e6d9f53c): one conflict at the end ofsrc/Mime.cpp, where #22751 added theNKWebKit::WebCoreAbischeme queries after theextern "C"block this PR extends; kept both. Ubuntu WSL2, GCC 11.4, Release:nkwebkit_mimetyperegistryandnkwebkit_securityoriginpass. Debt files match main;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)MimeExports.hppandsrc/Mime.cpp; whichever merges second needs a trivial merge)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-13T18:02:13Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
8bbf249892:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_mimetyperegistry_testsbuilt cleanly.nkwebkit_mimetyperegistry):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/include/MimeExports.hpp,core/libs/prx/libSceNKWebKit/src/Mime.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.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-14T01:23:31Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
7e233f67b9:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_mimetyperegistry_testsbuilt cleanly.nkwebkit_mimetyperegistry):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/include/MimeExports.hpp,core/libs/prx/libSceNKWebKit/src/Mime.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T21:01:08Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
7e233f67b9:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_mimetyperegistry_testsbuilt cleanly.nkwebkit_mimetyperegistry):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/include/MimeExports.hpp,core/libs/prx/libSceNKWebKit/src/Mime.cppreverted 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:57:53Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
e891549c59:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_mimetyperegistry_testsbuilt cleanly.nkwebkit_mimetyperegistry):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/include/MimeExports.hpp,core/libs/prx/libSceNKWebKit/src/Mime.cppreverted 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-18T08:28:08Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
0906ab6d4c:tools/check_conventions.pypassed.nkwebkit_mimetyperegistry_testsbuilt cleanly.nkwebkit_mimetyperegistry):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/include/MimeExports.hpp,core/libs/prx/libSceNKWebKit/src/Mime.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me