feat(libSceNKWebKit): implement WKPage scale factors #23181
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23181"
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:57:29Z.
What
Stacked on #23137 and #23159: the first two commits of this branch are those PRs, so review only the third commit (
feat(libSceNKWebKit): implement WKPage scale factors).Implement WKPageGetBackingScaleFactor, WKPageSetCustomBackingScaleFactor, WKPageGetScaleFactor and WKPageSetScaleFactor in libSceNKWebKit as host accessors over the
Pagemodel, following the pinned WebKit'sWKPage.cppandWebPageProxy.cpp: the backing scale factor is the custom value (0 clears it, the value narrows to float) or the intrinsic 1, and the page scale factor starts at 1 and stores what it is given, as a release build does. Both setters throw on a suspended page through theMutablePagehelper from #23159. As with the otherWKPageexports, no export creates aWKPageor runs a web process for it yet, so nothing is sent to one; recorded in the debt fragment.Tested
Linux (GCC 16, Ninja): new
nkwebkit_pagescalefactorstest covering defaults, custom and intrinsic factors, clearing with 0, the page scale factor, suspended-page throws on both setters, and null and wrong-type objects throwing. All 142nkwebkit_*and theguest_nkwebkit_*tests pass, the new test is clean under LeakSanitizer and AddressSanitizer, andtools/check_conventions.py --base origin/mainandtools/debt_fold.py --checkpass. Not tested on a console, a title or macOS; the Windows job of #23137 passes.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-18T20:25:11Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
296c5907fa:tools/check_conventions.pypassed.nkwebkit_pageeditingmediastate_tests,nkwebkit_pagescalefactors_tests,nkwebkit_pagestate_testsbuilt cleanly.nkwebkit_pageeditingmediastate,nkwebkit_pagescalefactors,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/PageScaleFactors.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-18T20:29:46Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the implementation and focused tests support merging, while the reported test runs were not independently run in this review.
What I ran
Reviewed head
296c5907fa3d6fde2e8f183319c446c6d76e88b8. Read the prepared description, commit list, manifest, and diff; inspected the scale-factor implementation,Pagestate and suspended-page helper, export declarations, and focused scale-factor tests throughrepo_read.py. No build or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full text for
Export.cppandInventoryExports.hppwas excluded from the prepared bundle; I inspected their relevant diff hunks but did not read their complete head versions. The aggregate changes from the first two stacked commits, including the page-state and editing/media implementations, were not fully read or independently verified. Build wiring, runtime behavior on a console, and the author-reported test and convention-check results were not independently verified. Other included files in the manifest were not read.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T10:26:42Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the reviewed scale factor accessors match the described host-side behavior, with the scale origin intentionally unused.
What I ran
Reviewed head
b64c76b2b90da0d31a0acbc502c5d61ff6b8044d. Read the prepared description, commits, manifest, diff, and listed changed code throughrepo_read.py; no build or tests were run. The description reports Linux tests, but those results were not independently verified. The PR asks reviewers to focus on the third commit, which implements the scale factor accessors.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full text of
Export.cppandInventoryExports.hppwas excluded from the prepared review folder and not read through the repository reader. The editing and media state implementation and tests belong to the earlier commit and were not reviewed. Build integration and runtime behavior were not independently tested. Read the changedApi.hpp,WebKitValueExports.hpp,Configuration.hpp,PageScaleFactors.cpp,PageState.cpp,PageScaleFactors.cpptest, and scale factor debt fragment, along with the prepared description, commits, manifest, and diff. Also inspected the CMake test configuration andBundlePageState.cppfor context. The manifest lists 12 changed files; the excluded files areExport.cppandInventoryExports.hpp.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-29T23:30:40Z.
Review: COMMENTED
Architecture findings (1)
Advisory architecture findings (1)
5b416808-5cf2-474c-9c85-7e186493107cReviewing files that changed from the base of the PR and between
1f27e2abfaand13e7954a42.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/PageScaleFactors.cppcore/libs/prx/libSceNKWebKit/src/PageState.cppcore/libs/prx/libSceNKWebKit/tests/PageEditingMediaState.cppcore/libs/prx/libSceNKWebKit/tests/PageScaleFactors.cppdocs/dev/debt/changes/feat-libSceNKWebKit-page-editing-media-state.mddocs/dev/debt/changes/feat-libSceNKWebKit-page-scale-factors.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-29T23:31:23Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected implementation matches the described host-side scale-factor behavior; I did not run the reported checks, so a formal approval is not justified.
What I ran
Reviewed head
13e7954a421940cf3d13da600b805e889bfe8fffusing the pinned repository reader. No tests or build commands were run; the checks in the PR description are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Console, title, and macOS behavior were not tested.
core/libs/prx/libSceNKWebKit/Export.cppwas excluded from the review folder because it was too large; its relevant removals are visible in the prepared diff. The PR description's reported Linux tests and convention/debt checks were not independently run.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:52:26Z.
Review: COMMENTED
Built the branch’s changed sources and ran PageScaleFactors and PageEditingMediaState on Linux against the existing runtime libraries. The test run passed and covered page scale factors and the existing editing and media state cases.
AI-assisted: yes.
Pull request closed