feat(libSceNKWebKit): implement fixed and sticky viewport constraint layer positions #22454
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22454"
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 RiverWhy on 2026-11-17T17:04:44Z.
What
Implements
FixedPositionViewportConstraints::layerPositionForViewportRectandStickyPositionViewportConstraints::layerPositionForConstrainingRect: 2 exports that both throw onmaintoday.Source: pinned ScrollingConstraints.cpp (PS5 11.x), including the private
computeStickyOffset. The 2021 functions are the same.Layout: measured by compiling the 11.x
ScrollingConstraints.hagainst WebKit's float geometry headers and checked withstatic_asserts.FloatSizealignment offset at 8 and anchor edges at 16.FloatSizeis 8 bytes as in 11.x and the existingWebCoreTypes.hpp. The 2021 copy had two extrabools, which the oracle drops.FloatPointresult is a two-float struct returned in registers.A null object or rect throws.
Debt: a fragment,
docs/dev/debt/changes/feat-nkwebkit-viewport-constraints.md, adds the entry under Functional and removes the 2 inventory rows.Overlap:
pr_overlap.pyfinds no open PR with these exports.Export.cppandInventoryExports.hpp, which is a line conflict only.libSceNKWebKit.hpp, which is a line conflict only.Tested
Linux Mint 22.3:
nkwebkit_scrollingconstraintstest:ScrollingConstraints.cppcompiled against WebKit'sFloatRect,FloatPointandFloatSizerunning the same driver. As a one-off, 300 sequences of 5,000 calls also matched.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-17T17:10:35Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
68cff6c2d4:tools/check_conventions.pypassed.nkwebkit_scrollingconstraints_testsbuilt cleanly.nkwebkit_scrollingconstraints):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/ScrollingConstraints.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T20:18:36Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
3ddb5358f4:tools/check_conventions.pypassed.nkwebkit_scrollingconstraints_testsbuilt cleanly.nkwebkit_scrollingconstraints):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/ScrollingConstraints.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T23:55:38Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
7314480ab4:tools/check_conventions.pypassed.nkwebkit_scrollingconstraints_testsbuilt cleanly.nkwebkit_scrollingconstraints):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/ScrollingConstraints.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-18T17:44:16Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
a40ed85c19:tools/check_conventions.pypassed.nkwebkit_scrollingconstraints_testsbuilt cleanly.nkwebkit_scrollingconstraints):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/ScrollingConstraints.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-19T03:36:46Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
b257bfe270:tools/check_conventions.pypassed.nkwebkit_scrollingconstraints_testsbuilt cleanly.nkwebkit_scrollingconstraints):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/ScrollingConstraints.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T11:29:00Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the implementation follows the stated upstream behavior, and the test target is included in the project’s existing test glob.
What I ran
b257bfe270c14f0db28a722a705648bf1d537887and the prepared diff. No build or test command was run.description.md,commits.md,manifest.json,diff.patch,ScrollingConstraintsExports.hpp,libSceNKWebKit.hpp,ScrollingConstraints.cpp,tests/ScrollingConstraints.cpp,CMakeLists.txt,WebCoreTypes.hpp, the changed regions ofExport.cppandInventoryExports.hpp, and the debt fragment.Export.cppandInventoryExports.hppwere not read in full.Results
Findings
Blocking
None.
Non-blocking
Not verified
No build, automated test, negative control, or console behavior was run. The full contents of
Export.cppandInventoryExports.hppwere not read; only changed regions and relevant nearby declarations were inspected.To get this to a good state
Nothing is required. Optional: compare the implementation with a console module when available.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T12:04:05Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the source implementation follows the stated edge ordering and sticky offset calculations, and its ABI layouts are guarded by compile-time assertions.
What I ran
Reviewed head
3264129fc01449ee67c0cc726783b90bfe71b943. I read the prepared description, commits, manifest, diff, and every included changed file; I also usedrepo_read.pyto inspect the relevant build configuration, geometry types, and export region. No commands or tests were run during this review.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full text of
core/libs/prx/libSceNKWebKit/Export.cppwas excluded from the review folder; I inspected its relevant region throughrepo_read.py. The full changed filecore/libs/prx/libSceNKWebKit/include/InventoryExports.hppwas included but not read in full; the changed lines were inspected. No build, tests, console comparison, or physical-console behavior was verified. The test results in the description are author-reported, not run during this review.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-27T13:51:37Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
3264129fc0:tools/check_conventions.pypassed.nkwebkit_scrollingconstraints_testsbuilt cleanly.nkwebkit_scrollingconstraints):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/ScrollingConstraints.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-28T06:10:53Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
02f0198d62:tools/check_conventions.pypassed.nkwebkit_scrollingconstraints_testsbuilt cleanly.nkwebkit_scrollingconstraints):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/ScrollingConstraints.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T06:51:10Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; I found no verified defect in the implementation or ABI declarations.
What I ran
02f0198d6207ec87c0a10c9921005dbea2ed9a92against the preparedmaindiff.Export.cppfull text was excluded by the review bundle; I inspected its changed hunk indiff.patch.repo_read.pywas used to inspect targeted source ranges; author-reported tests were not independently run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
core/libs/prx/libSceNKWebKit/Export.cppwas not read in full; the removed stub hunk was inspected indiff.patch.description.md,commits.md,manifest.json,diff.patch,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp(relevant excerpt),core/libs/prx/libSceNKWebKit/include/ScrollingConstraintsExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp(relevant excerpt),core/libs/prx/libSceNKWebKit/src/ScrollingConstraints.cpp,core/libs/prx/libSceNKWebKit/tests/ScrollingConstraints.cpp,core/libs/prx/libSceNKWebKit/CMakeLists.txt(test registration excerpt),core/libs/prx/libSceNKWebKit/src/WebCoreTypes.hpp(geometry type excerpt), andreview/README.md.core/libs/prx/libSceNKWebKit/Export.cpp(too large for the review folder).InventoryExports.hppwas read only at the relevant excerpt; the remainder had no added lines.To get this to a good state
Nothing is required.