feat(libSceNKWebKit): implement WKPage editing and media state #23159
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23159"
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 ghatwary06 on 2026-11-18T19:32:21Z.
What
Stacked on #23137: the first commit of this branch is that PR, so review only the second commit (
feat(libSceNKWebKit): implement WKPage editing and media state).Implement WKPageGetIsControlledByAutomation, WKPageSetControlledByAutomation, WKPageGetMediaCaptureEnabled, WKPageSetMediaCaptureEnabled, WKPageIsContentEditable, WKPageHasSelectedRange, WKPageCanDelete, WKPageIsPlayingAudio, WKPageSupportsTextEncoding, WKPageGetSessionHistoryURLValueType and WKPageGetSessionBackForwardListItemValueType in libSceNKWebKit as host accessors over the
Pagemodel, following the pinned WebKit'sWKPage.cppandWebPageProxy.cpp. The two session type getters return a permanent string, as WebKit'sleakRefdoes. The six setters of the #23137 and this commit that WebKit guards withCRASH_IF_SUSPENDED(this commit's two, and the application name, custom user agent, custom text encoding name and background extension setters from #23137) throw on a suspended page through a sharedMutablePagehelper. As with the otherWKPageexports, no export creates aWKPageor fills its editor and media state yet, so a page reports the defaults until page loading is connected; recorded in the debt fragment.Tested
Linux (GCC 16, Ninja): new
nkwebkit_pageeditingmediastatetest covering defaults, state changes,canDeletecombinations, text encoding support with and without a main frame, the permanent session strings, suspended-page throws on all six guarded setters, and null and wrong-type objects throwing. All 141nkwebkit_*and theguest_nkwebkit_*tests pass, the two page tests are clean under LeakSanitizer and AddressSanitizer, andtools/check_conventions.py --base origin/mainandtools/debt_fold.py --checkpass. Not tested on a console, a title, Windows or macOS.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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-18T19:54:48Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
c9aeb9b5fa:tools/check_conventions.pypassed.nkwebkit_pageeditingmediastate_tests,nkwebkit_pagestate_testsbuilt cleanly.nkwebkit_pageeditingmediastate,nkwebkit_pagestate):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/Api.hpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp,core/libs/prx/libSceNKWebKit/src/Configuration.hpp,core/libs/prx/libSceNKWebKit/src/PageEditingMediaState.cpp,core/libs/prx/libSceNKWebKit/src/PageState.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 MarcZX10 on 2026-11-21T08:07:39Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected implementation adds the advertised host-side WKPage accessors, but the review is incomplete because two changed files were excluded and tests were not run here.
What I ran
Inspected PR head
c9aeb9b5faad1b4b9ec5adb2bedb65c8ca9cd859usingrepo_read.pysearch and cat operations. No commands or tests were run.Results
Findings
Blocking
None verified in the inspected code.
Non-blocking
None.
Not verified
The full contents of
core/libs/prx/libSceNKWebKit/Export.cppandcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppwere excluded for size; their affected hunks appear in the prepared diff. The prepared manifest does not listfiles.json, so excluded-by-rule files could not be independently checked. No tests, build, console behavior, title behavior, Windows, or macOS were verified. The description reports Linux tests and checks, but those were not run in this review.Files read:
description.md,commits.md,manifest.json,diff.patch,Api.hpp,WebKitValueExports.hpp,Configuration.hpp,PageEditingMediaState.cpp,PageState.cpp,PageEditingMediaState.cpp(tests), and the new debt fragment. Excluded changed files:Export.cppandInventoryExports.hpp.To get this to a good state
Nothing is required. Optional: include the full text of the two size-excluded changed files in a follow-up review package and run the reported checks on this exact head.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-30T06:58:59Z.
Review: COMMENTED
Architecture findings (1)
Advisory architecture findings (1)
ac097d17-6111-441c-8a86-90ff83e74e6fReviewing files that changed from the base of the PR and between
63ee1c120aandfac367d9ba.core/libs/prx/libSceNKWebKit/Export.cppcore/libs/prx/libSceNKWebKit/include/Api.hppcore/libs/prx/libSceNKWebKit/include/InventoryExports.hppcore/libs/prx/libSceNKWebKit/include/WebKitValueExports.hppcore/libs/prx/libSceNKWebKit/src/Configuration.hppcore/libs/prx/libSceNKWebKit/src/PageEditingMediaState.cppcore/libs/prx/libSceNKWebKit/src/PageState.cppcore/libs/prx/libSceNKWebKit/tests/PageEditingMediaState.cppdocs/dev/debt/changes/feat-libSceNKWebKit-page-editing-media-state.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T07:27:37Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the inspected implementation is consistent with its stated host-side model, and no verified defect prevents merging.
What I ran
Reviewed head
fac367d9ba57b68239c4123ad75f6101b59732f8using the prepared diff andrepo_read.pyfor changed and related repository files. No commands or tests were run by me; no merged-preview check was performed.Results
Findings
Blocking
None.
Non-blocking
None.
Sources
The behavior conclusions are based on the prepared diff and the pinned-head source read through
repo_read.py.Not verified
I read
core/libs/prx/libSceNKWebKit/CMakeLists.txt,include/WebKitValueExports.hpp,src/Configuration.hpp,src/PageEditingMediaState.cpp,src/PageState.cpp,src/Types.hpp,src/Object.hpp,tests/PageEditingMediaState.cpp, and the added debt fragment.Export.cppwas excluded from the review folder because it was too large; its relevant export-removal hunks were inspected indiff.patch. Other changed files were not read in full. Tests, sanitizer runs, convention checks, and console behavior were not independently verified.To get this to a good state
Nothing is required.