Skip to content

feat(libSceNKWebKit): implement AccessibilityObjectModel, AriaReflection, ITPDatabase, NSURLSessionWebSocket, and TextAlignPositioned preference accessors - #18352

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
heditrigui:feat/nkwebkit-additional-preferences
Nov 13, 2026

Conversation

@heditrigui

Copy link
Copy Markdown
Contributor

What

This pull request implements 11 \WKPreferences\ getter and setter exports in \libSceNKWebKit:

  • \WKPreferencesGetAccessibilityObjectModelEnabled\ / \WKPreferencesSetAccessibilityObjectModelEnabled\
  • \WKPreferencesGetAriaReflectionEnabled\ / \WKPreferencesSetAriaReflectionEnabled\
  • \WKPreferencesGetIsITPDatabaseEnabled\ / \WKPreferencesSetIsITPDatabaseEnabled\
  • \WKPreferencesGetIsNSURLSessionWebSocketEnabled\ / \WKPreferencesSetIsNSURLSessionWebSocketEnabled\
  • \WKPreferencesUseLegacyTextAlignPositionedElementBehavior\ / \WKPreferencesSetUseLegacyTextAlignPositionedElementBehavior\
  • \WKPreferencesSetApplicationChromeModeEnabled\

Replaces 11 throwing placeholder stubs in \Export.cpp\ and \include/LegacyExports.hpp, adds definitions with WebKit default values (\AccessibilityObjectModelEnabled: false, \ApplicationChromeModeEnabled: false, \AriaReflectionEnabled: false, \IsITPDatabaseEnabled: false, \IsNSURLSessionWebSocketEnabled: false, \UseLegacyTextAlignPositionedElementBehavior: false) in \Definitions(), adds function prototypes to \src/Preferences.hpp, and adds unit tests to \ ests/Preferences.cpp.

Tested

  • Unit test suite in \core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:
    • Verified default values for all preferences in \�ooleanCases\
    • Verified setting and toggling (\ alse\ -> \ rue\ -> \ alse\ -> \ rue)
    • Verified preference copy semantics and isolation
    • Verified error handling (\std::invalid_argument\ thrown on null pointer)
    • Verified \WKPreferencesSetApplicationChromeModeEnabled\ and null pointer validation
  • Passed repository conventions check (\ ools/check_conventions.py --base upstream/main) with 0 errors
  • Passed public headers audit (\core/libs/tests/test_public_headers.py --audit-only) with 407 libraries and 34,084 exports verified

Checklist

  • Depends on: none
  • AI-assisted: yes

…ion, ITPDatabase, NSURLSessionWebSocket, and TextAlignPositioned preference accessors
@github-actions

Copy link
Copy Markdown

Progress report (3f7fb01 → bd5edfd)

📈 System libraries: 37.08% (+0.02%, +11 implemented functions)

✅ 11 implemented
Library Name
libSceNKWebKit WKPreferencesGetAccessibilityObjectModelEnabled
libSceNKWebKit WKPreferencesGetAriaReflectionEnabled
libSceNKWebKit WKPreferencesGetIsITPDatabaseEnabled
libSceNKWebKit WKPreferencesGetIsNSURLSessionWebSocketEnabled
libSceNKWebKit WKPreferencesSetAccessibilityObjectModelEnabled
libSceNKWebKit WKPreferencesSetApplicationChromeModeEnabled
libSceNKWebKit WKPreferencesSetAriaReflectionEnabled
libSceNKWebKit WKPreferencesSetIsITPDatabaseEnabled
libSceNKWebKit WKPreferencesSetIsNSURLSessionWebSocketEnabled
libSceNKWebKit WKPreferencesSetUseLegacyTextAlignPositionedElementBehavior
libSceNKWebKit WKPreferencesUseLegacyTextAlignPositionedElementBehavior

Changed libraries (implemented exports)

Library Before After Change
libSceNKWebKit 2759/11258 (24.51%) 2770/11258 (24.60%) +0.10%

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 18175 core/libs/prx/libSceNKWebKit/Export.cpp L9231-9238
core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp L2264-2265
PR 19145 core/libs/prx/libSceNKWebKit/Export.cpp L4246-4253
core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp L1034-1035

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 13515 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14138 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14164 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14259 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14478 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14860 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14917 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14918 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14919 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14920 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14921 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14922 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14923 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14924 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14926 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14927 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14928 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14929 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14930 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14946 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14947 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14948 core/libs/prx/libSceNKWebKit/Export.cpp
PR 14949 core/libs/prx/libSceNKWebKit/Export.cpp
PR 15853 core/libs/prx/libSceNKWebKit/Export.cpp
PR 16066 core/libs/prx/libSceNKWebKit/Export.cpp
PR 16261 core/libs/prx/libSceNKWebKit/Export.cpp
PR 16510 core/libs/prx/libSceNKWebKit/Export.cpp
PR 17550 core/libs/prx/libSceNKWebKit/Export.cpp
PR 17563 core/libs/prx/libSceNKWebKit/Export.cpp
PR 17569 core/libs/prx/libSceNKWebKit/Export.cpp
core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp
PR 17771 core/libs/prx/libSceNKWebKit/Export.cpp
PR 17783 core/libs/prx/libSceNKWebKit/Export.cpp
PR 17793 core/libs/prx/libSceNKWebKit/Export.cpp
core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp
PR 17805 core/libs/prx/libSceNKWebKit/Export.cpp
core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp
PR 17868 core/libs/prx/libSceNKWebKit/Export.cpp
PR 17886 core/libs/prx/libSceNKWebKit/Export.cpp
core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp
PR 17912 core/libs/prx/libSceNKWebKit/Export.cpp
core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp
PR 17917 core/libs/prx/libSceNKWebKit/Export.cpp
PR 17922 core/libs/prx/libSceNKWebKit/Export.cpp
PR 17925 core/libs/prx/libSceNKWebKit/Export.cpp
PR 17926 core/libs/prx/libSceNKWebKit/Export.cpp
PR 17927 core/libs/prx/libSceNKWebKit/Export.cpp
PR 17929 core/libs/prx/libSceNKWebKit/Export.cpp
PR 17933 core/libs/prx/libSceNKWebKit/Export.cpp
PR 18377 core/libs/prx/libSceNKWebKit/Export.cpp
core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp
PR 18391 core/libs/prx/libSceNKWebKit/Export.cpp
PR 18395 core/libs/prx/libSceNKWebKit/Export.cpp
core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp
PR 18414 core/libs/prx/libSceNKWebKit/Export.cpp

@JJenkx

JJenkx commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Windows check of head bd5edfd8c2, merged onto main 9e1cbeb452 (0cbf4d48a8, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.

  • nkwebkit_preferences passes in 3 of 3 runs, none skipped.

AI-assisted: yes.

@PrivacyOnion PrivacyOnion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: libSceNKWebKit, nkwebkit_preferences_tests built cleanly.
  • CTest (nkwebkit_preferences):
    1/1 Test #3689: nkwebkit_preferences .............   Passed    0.01 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 null pointer validation: PreferencesFromRef in core/libs/prx/libSceNKWebKit/src/Preferences.cpp enforces nullptr checks and throws std::invalid_argument for all 11 getters and setters, tested in tests/Preferences.cpp.
    • Verified preference definitions and default values in Definitions() in core/libs/prx/libSceNKWebKit/src/Preferences.cpp: AccessibilityObjectModelEnabled (false, Testable), ApplicationChromeModeEnabled (false, Boolean), AriaReflectionEnabled (false, Testable), IsITPDatabaseEnabled (false, Boolean), IsNSURLSessionWebSocketEnabled (false, Boolean), and UseLegacyTextAlignPositionedElementBehavior (false, Boolean).
    • Verified export signatures, C linkage (extern "C"), and APS5_VABI calling conventions in core/libs/prx/libSceNKWebKit/src/Preferences.hpp and Preferences.cpp, including the exact WebKit getter symbol WKPreferencesUseLegacyTextAlignPositionedElementBehavior.
    • Verified clean removal of all 11 placeholder stubs from core/libs/prx/libSceNKWebKit/Export.cpp and LegacyExports.hpp without leaving any duplicate symbols or orphaned stubs.
    • Verified strict AGENTS.md compliance: zero comments in code, no hardcoded title special-cases, no unauthorized file additions, and clean adherence to Conventional Commits.
    • Verified unit test suite in core/libs/prx/libSceNKWebKit/tests/Preferences.cpp: covers initial defaults, boolean round trips, preference copy isolation, and null reference handling for both getters and setters.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

@ycbuzi

ycbuzi commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Tested bd5edfd8c2 merged into main, with the whole ctest suite on each machine below. Nothing fails that does not also fail on main on the same machine.

  • Windows Server 2022 (GitHub-hosted runner), full build, WinLibs GCC 15.2.0: 99% tests passed, 41 tests failed out of 4999; 99% tests passed, 41 tests failed out of 4999. 41 of the failing tests fail on main too. run
  • Windows Server 2025 (GitHub-hosted runner), full build, WinLibs GCC 15.2.0: 99% tests passed, 15 tests failed out of 4999; 99% tests passed, 15 tests failed out of 4999. 15 of the failing tests fail on main too. run

AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feat(libSceNKWebKit): implement 11 WKPreferences exports — no blocking findings

The eleven throwing stubs are replaced by real accessors with the same names, and the removed stubs, the new declarations and the new tests agree with each other. Nothing blocks this; the points below are optional.

What I ran

Head bd5edfd8c2512be949684405d2bf38134cd217bb, base main. Read-only review: nothing was built or run.

repo_read.py search WKPreferencesSetAriaReflectionEnabled
repo_read.py search PreferencesFromRef core/libs/prx/libSceNKWebKit/src
repo_read.py search RequireThrows core/libs/prx/libSceNKWebKit/tests
repo_read.py search booleanCases core/libs/prx/libSceNKWebKit/tests/Preferences.cpp
repo_read.py search invalid_argument core/libs/prx/libSceNKWebKit/src
repo_read.py search WKPreferencesGetAriaReflectionEnabled core/libs/prx/libSceNKWebKit
repo_read.py cat core/libs/prx/libSceNKWebKit/src/Preferences.cpp 536 548
repo_read.py cat core/libs/prx/libSceNKWebKit/tests/Preferences.cpp 1 40
repo_read.py cat core/libs/prx/libSceNKWebKit/tests/Preferences.cpp 470 500

Results

Check Result Note
Stubs removed passed 11 in the source, 11 declarations
Declarations match definitions passed Same signatures, from the diff
No old AriaReflection names left passed Only the new definition, declaration, test
Throw helper in tests passed Defined and used with the exception type
Conventions check not run Tools cannot run here
Public headers audit not run Tools cannot run here
Unit tests not run Nothing built

Findings

Blocking

None.

Non-blocking

  1. core/libs/prx/libSceNKWebKit/src/Preferences.cpp:44: the AriaReflectionEnabled entry is indented 16 spaces; its neighbours use 8.

            {u"AriaReflectionEnabled", {false, FeatureKind::Testable}},
    
  2. core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:483: ApplicationChromeModeEnabled is set to true but never read back, because this PR adds no getter. The test therefore only checks that the call does not throw. The description says "Verified ... null pointer validation" for this setter, which is accurate, but the value itself is not verified.

Not verified

  • core/libs/prx/libSceNKWebKit/Export.cpp is too large for the review folder and was not read at head. I saw its 11 removals in the diff, and I searched at head only for the AriaReflection names. The absence of the other ten names from that file was not checked.
  • core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp (2390 lines) was read only through its diff hunks.
  • core/libs/prx/libSceNKWebKit/src/Preferences.cpp was read through its diff hunks and lines 536–548 at head. The setter and getter bodies, and the Cast helper's null check, were not read. The description's claim that a null pointer throws std::invalid_argument is not verified.
  • The toggle sequence (false → true → false → true) is not verified. The loop over booleanCases starts at core/libs/prx/libSceNKWebKit/tests/Preferences.cpp:205, and its body was not read.
  • The FeatureKind choices (Testable or Boolean) were not compared with how FeatureKind is consumed.
  • The conventions check, the public headers audit and the unit test run claimed in the description were not run.

Files read: description.md, commits.md, manifest.json, files.json and diff.patch in full. Preferences.cpp, Preferences.hpp, LegacyExports.hpp and tests/Preferences.cpp were read through their diff hunks plus the reader ranges above. Export.cpp was not read at head. Excluded by rule: none.

To get this to a good state

Nothing is required. The two optional points are listed under Findings.

@oneandonlydean
oneandonlydean merged commit a9f17d1 into boykopovar:main Nov 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants