feat(libSceNKWebKit): implement DoNotTrack, LazyImageLoading and TabToLinks preference accessors #18224

Merged
heditrigui merged 1 commit from upstream-pr/18224 into main 2026-11-12 18:21:13 +00:00
heditrigui commented 2026-11-10 22:03:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by heditrigui on 2026-11-10T22:03:48Z.


What

Implements 6 preference getter and setter functions in libSceNKWebKit:

  • WKPreferencesGetDoNotTrackEnabled / WKPreferencesSetDoNotTrackEnabled
  • WKPreferencesGetLazyImageLoadingEnabled / WKPreferencesSetLazyImageLoadingEnabled
  • WKPreferencesGetTabToLinksEnabled / WKPreferencesSetTabToLinksEnabled

Adds DoNotTrackEnabled with default alse to preferences definitions. LazyImageLoadingEnabled routes to the existing definition (default rue). TabToLinksEnabled delegates to TabsToLinks (default alse) ensuring full state synchronization between both naming variants.
Removes legacy placeholder throwing stubs from Export.cpp and include/LegacyExports.hpp.

Tested

  • Added unit tests in core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:
    • Verified default values, setter toggling, and null pointer validation (std::invalid_argument) for all 3 features in the boolean test table.
    • Verified state synchronization between WKPreferencesSetTabToLinksEnabled and WKPreferencesGetTabsToLinks.
  • Passed conventions check (python tools/check_conventions.py --base upstream/main).
  • Passed public headers audit (python core/libs/tests/test_public_headers.py --audit-only: 407 libraries, 33,859 exports).

Checklist

  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5249710338 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18224). Originally posted by [heditrigui](https://github.com/heditrigui) on 2026-11-10T22:03:48Z. --- ### What Implements 6 preference getter and setter functions in libSceNKWebKit: - WKPreferencesGetDoNotTrackEnabled / WKPreferencesSetDoNotTrackEnabled - WKPreferencesGetLazyImageLoadingEnabled / WKPreferencesSetLazyImageLoadingEnabled - WKPreferencesGetTabToLinksEnabled / WKPreferencesSetTabToLinksEnabled Adds DoNotTrackEnabled with default alse to preferences definitions. LazyImageLoadingEnabled routes to the existing definition (default rue). TabToLinksEnabled delegates to TabsToLinks (default alse) ensuring full state synchronization between both naming variants. Removes legacy placeholder throwing stubs from Export.cpp and include/LegacyExports.hpp. ### Tested - Added unit tests in core/libs/prx/libSceNKWebKit/tests/Preferences.cpp: - Verified default values, setter toggling, and null pointer validation (std::invalid_argument) for all 3 features in the boolean test table. - Verified state synchronization between WKPreferencesSetTabToLinksEnabled and WKPreferencesGetTabsToLinks. - Passed conventions check (python tools/check_conventions.py --base upstream/main). - Passed public headers audit (python core/libs/tests/test_public_headers.py --audit-only: 407 libraries, 33,859 exports). ### Checklist - [x] Depends on: none - [x] AI-assisted: yes
MarcZX10 commented 2026-11-10 22:09:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-10T22:09:17Z.

Review: COMMENTED


Reviewed — looks good

The preference accessors and tests are consistent with the existing preference store; I found no blocking issue in this diff.

What I ran

Reviewed head 26cf2c87170d8dcab2e745a50fa0a187258a47d0 against current main base 62c2f3cc57fc7489e13698baf320a87b9cfaa960; the merge preview was clean and the head and base stayed unchanged during the refreshed precheck.

Environment: Linux 6.1, Python 3.11.2, GCC 12.2.0.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 18224 --output-dir /tmp/anyps5-pr-precheck-18224-base-refresh

I read all five changed files and the full diff. I did not build or run C++ tests. Hosted CI was read as a status snapshot; the Windows build job was still pending.

Results

Check Result Note
Diff whitespace Passed Exact current head and base.
Conventions and PR template Passed All conventions checks passed.
Export ABI audit Passed New declarations and definitions were found; no ABI-audit findings.
Dependency and mergeability check Passed Clean merge preview against current main.
C++ test registration heuristic Warning reviewed Its possible-unregistered warning is a false positive: CMakeLists.txt registers tests/*.cpp through a CONFIGURE_DEPENDS glob.
Build and C++ tests Not run This was the exact-head no-build precheck.
Hosted CI Pending Windows was pending; policy jobs passed and product Linux/specialized jobs were skipped.
Recorded outputs

Conventions stdout:

All conventions checks passed.

Dependency-check stdout:

/tmp/anyps5-pr-precheck-18224-base-refresh/stack/stack-report.md
/tmp/anyps5-pr-precheck-18224-base-refresh/stack/stack-report.json

Merge-preview report:

- PR #18224: **clean** against current base; head `26cf2c87170d8dcab2e745a50fa0a187258a47d0`; changed paths: none reported

Test-quality heuristic warning:

"kind": "possible-unregistered-cpp-test",
"message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage."

I verified registration at core/libs/prx/libSceNKWebKit/CMakeLists.txt: file(GLOB nkWebKitTests CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tests/*.cpp) includes the changed test file.

Hosted snapshot: conventions, eligibility, intake, labels, library portability, and report passed; Windows was pending; Linux, relinker, relinker ASan, edge-watch, pipe-write, register-context, and write-watch were skipped.

Negative control

Not run. No implementation or test mutation was made for this review.

Findings

Blocking

None found.

Non-blocking

The Windows build-and-test job had not finished when I checked. This review comment is not an approval; the hosted result remains to be observed.

Sources

Not verified

  • No local build or C++ test run was performed.
  • The hosted Windows build-and-test job was still pending; the product Linux and specialized jobs were skipped.

To get this to a good state

No code change is requested. I’ll check the exact-head Windows result before changing this review to an approval.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5850267403 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18224#pullrequestreview-5850267403). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-10T22:09:17Z. **Review:** COMMENTED --- # Reviewed — looks good The preference accessors and tests are consistent with the existing preference store; I found no blocking issue in this diff. ## What I ran Reviewed head `26cf2c87170d8dcab2e745a50fa0a187258a47d0` against current `main` base `62c2f3cc57fc7489e13698baf320a87b9cfaa960`; the merge preview was clean and the head and base stayed unchanged during the refreshed precheck. Environment: Linux 6.1, Python 3.11.2, GCC 12.2.0. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 18224 --output-dir /tmp/anyps5-pr-precheck-18224-base-refresh ``` I read all five changed files and the full diff. I did not build or run C++ tests. Hosted CI was read as a status snapshot; the Windows build job was still pending. ## Results | Check | Result | Note | |---|---|---| | Diff whitespace | Passed | Exact current head and base. | | Conventions and PR template | Passed | `All conventions checks passed.` | | Export ABI audit | Passed | New declarations and definitions were found; no ABI-audit findings. | | Dependency and mergeability check | Passed | Clean merge preview against current `main`. | | C++ test registration heuristic | Warning reviewed | Its possible-unregistered warning is a false positive: `CMakeLists.txt` registers `tests/*.cpp` through a `CONFIGURE_DEPENDS` glob. | | Build and C++ tests | Not run | This was the exact-head no-build precheck. | | Hosted CI | Pending | Windows was pending; policy jobs passed and product Linux/specialized jobs were skipped. | <details> <summary>Recorded outputs</summary> Conventions stdout: ```text All conventions checks passed. ``` Dependency-check stdout: ```text /tmp/anyps5-pr-precheck-18224-base-refresh/stack/stack-report.md /tmp/anyps5-pr-precheck-18224-base-refresh/stack/stack-report.json ``` Merge-preview report: ```text - PR #18224: **clean** against current base; head `26cf2c87170d8dcab2e745a50fa0a187258a47d0`; changed paths: none reported ``` Test-quality heuristic warning: ```text "kind": "possible-unregistered-cpp-test", "message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage." ``` I verified registration at `core/libs/prx/libSceNKWebKit/CMakeLists.txt`: `file(GLOB nkWebKitTests CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tests/*.cpp)` includes the changed test file. Hosted snapshot: conventions, eligibility, intake, labels, library portability, and report passed; Windows was pending; Linux, relinker, relinker ASan, edge-watch, pipe-write, register-context, and write-watch were skipped. </details> ## Negative control Not run. No implementation or test mutation was made for this review. ## Findings ### Blocking None found. ### Non-blocking The Windows build-and-test job had not finished when I checked. This review comment is not an approval; the hosted result remains to be observed. ## Sources - [Preference defaults and accessors at this head](https://github.com/boykopovar/AnyPS5/blob/26cf2c87170d8dcab2e745a50fa0a187258a47d0/core/libs/prx/libSceNKWebKit/src/Preferences.cpp#L142-L146) - [Lazy-image and tab-to-links defaults at this head](https://github.com/boykopovar/AnyPS5/blob/26cf2c87170d8dcab2e745a50fa0a187258a47d0/core/libs/prx/libSceNKWebKit/src/Preferences.cpp#L219-L223) - [New getter/setter implementations and aliasing at this head](https://github.com/boykopovar/AnyPS5/blob/26cf2c87170d8dcab2e745a50fa0a187258a47d0/core/libs/prx/libSceNKWebKit/src/Preferences.cpp#L893-L914) - [Default, toggle, alias, and null-pointer assertions at this head](https://github.com/boykopovar/AnyPS5/blob/26cf2c87170d8dcab2e745a50fa0a187258a47d0/core/libs/prx/libSceNKWebKit/tests/Preferences.cpp#L91-L184) - [Test-source glob registration at this head](https://github.com/boykopovar/AnyPS5/blob/26cf2c87170d8dcab2e745a50fa0a187258a47d0/core/libs/prx/libSceNKWebKit/CMakeLists.txt#L55-L75) ## Not verified - No local build or C++ test run was performed. - The hosted Windows build-and-test job was still pending; the product Linux and specialized jobs were skipped. ## To get this to a good state No code change is requested. I’ll check the exact-head Windows result before changing this review to an approval.
PrivacyOnion commented 2026-11-10 22:20:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-10T22:20:50Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 26cf2c8717:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: libSceNKWebKit, nkwebkit_preferences_tests built cleanly.
  • CTest (nkwebkit_preferences):
    1/1 Test #3626: nkwebkit_preferences .............   Passed    0.20 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp, core/libs/prx/libSceNKWebKit/src/Preferences.cpp, core/libs/prx/libSceNKWebKit/src/Preferences.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified pointer safety and error handling: WKPreferencesSetDoNotTrackEnabled, WKPreferencesGetDoNotTrackEnabled, WKPreferencesSetLazyImageLoadingEnabled, WKPreferencesGetLazyImageLoadingEnabled, WKPreferencesSetTabToLinksEnabled, and WKPreferencesGetTabToLinksEnabled correctly route through PreferencesFromRef / Cast, throwing std::invalid_argument on null preferencesRef as verified in core/libs/prx/libSceNKWebKit/tests/Preferences.cpp.
    • Verified default preference values and definitions in core/libs/prx/libSceNKWebKit/src/Preferences.cpp: DoNotTrackEnabled is registered as {false, FeatureKind::Boolean}, LazyImageLoadingEnabled maps to the existing {true, FeatureKind::Boolean} definition, and TabToLinksEnabled delegates to TabsToLinks (default false).
    • Verified state synchronization and non-recurrence: WKPreferencesSetTabToLinksEnabled and WKPreferencesGetTabToLinksEnabled directly forward to WKPreferencesSetTabsToLinks and WKPreferencesGetTabsToLinks respectively, sharing underlying state without recursion or race conditions.
    • Verified cleanup of legacy throwing placeholder stubs: confirmed all 6 symbols were removed from core/libs/prx/libSceNKWebKit/Export.cpp and LegacyExports.hpp, and properly exported with APS5_VABI and extern "C" linkage in Preferences.hpp.
    • Verified strict compliance with AGENTS.md: zero comments in code, no hardcoded title special-cases, no fake success returns, no untracked files added, and comprehensive unit test coverage including round-trip mutation, copy independence, and null validation.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5850403768 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18224#pullrequestreview-5850403768). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-10T22:20:50Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `26cf2c8717`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `libSceNKWebKit`, `nkwebkit_preferences_tests` built cleanly. - **CTest** (`nkwebkit_preferences`): ``` 1/1 Test #3626: nkwebkit_preferences ............. Passed 0.20 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceNKWebKit/Export.cpp`, `core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp`, `core/libs/prx/libSceNKWebKit/src/Preferences.cpp`, `core/libs/prx/libSceNKWebKit/src/Preferences.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified pointer safety and error handling: WKPreferencesSetDoNotTrackEnabled, WKPreferencesGetDoNotTrackEnabled, WKPreferencesSetLazyImageLoadingEnabled, WKPreferencesGetLazyImageLoadingEnabled, WKPreferencesSetTabToLinksEnabled, and WKPreferencesGetTabToLinksEnabled correctly route through PreferencesFromRef / Cast, throwing std::invalid_argument on null preferencesRef as verified in core/libs/prx/libSceNKWebKit/tests/Preferences.cpp. - Verified default preference values and definitions in core/libs/prx/libSceNKWebKit/src/Preferences.cpp: DoNotTrackEnabled is registered as {false, FeatureKind::Boolean}, LazyImageLoadingEnabled maps to the existing {true, FeatureKind::Boolean} definition, and TabToLinksEnabled delegates to TabsToLinks (default false). - Verified state synchronization and non-recurrence: WKPreferencesSetTabToLinksEnabled and WKPreferencesGetTabToLinksEnabled directly forward to WKPreferencesSetTabsToLinks and WKPreferencesGetTabsToLinks respectively, sharing underlying state without recursion or race conditions. - Verified cleanup of legacy throwing placeholder stubs: confirmed all 6 symbols were removed from core/libs/prx/libSceNKWebKit/Export.cpp and LegacyExports.hpp, and properly exported with APS5_VABI and extern "C" linkage in Preferences.hpp. - Verified strict compliance with AGENTS.md: zero comments in code, no hardcoded title special-cases, no fake success returns, no untracked files added, and comprehensive unit test coverage including round-trip mutation, copy independence, and null validation. - Note: the AI-assisted checkbox can stay. Looks Good To Me
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!18224
No description provided.