feat(libSceNKWebKit): implement WKBundleFrameCreateHitTestResult and WKBundleHitTestResult queries #20319
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/20319"
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 adriaespii on 2026-11-15T01:44:07Z.
What
Implement WKBundleFrameCreateHitTestResult, WKBundleHitTestResultCopyNodeHandle, WKBundleHitTestResultCopyURLElementHandle and WKBundleHitTestResultGetImageRect in libSceNKWebKit, connecting frame hit testing with hit test result handle and rect inspection.
Tested
Unit tests in core/libs/prx/libSceNKWebKit/tests/Base.cpp.
Checklist
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T02:41:25Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
bf4085f5f1:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_base_testsbuilt cleanly.nkwebkit_base):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp,core/libs/prx/libSceNKWebKit/src/BundleHitTestResult.cpp,core/libs/prx/libSceNKWebKit/src/Types.hppreverted 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-15T03:15:45Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: implement hit testing so the returned result reflects the supplied frame and point.
What I ran
Reviewed head
6c12f484f2a2339429609c436d10e1c3ecf7960e. I read the description, commits, manifest, diff, and the changedBundleHitTestResult.cpp; no tests were run.Results
Findings
Blocking
core/libs/prx/libSceNKWebKit/src/BundleHitTestResult.cpp:82validatesframeRefbut ignores both the frame andpoint, then returns a default-constructed result. Thus this API never performs hit testing and cannot populate the node handle, URL element handle, image rect, or other hit-test properties. Implement the actual frame hit test and populate the result, or keep the export unimplemented until that behavior is available.Non-blocking
None.
Not verified
The complete contents of
Export.cpp,InventoryExports.hpp, anddocs/dev/debt/libSceNKWebKit.mdwere not read; their changes were inspected in the diff only.WebKitValueExports.hpp,Types.hpp, andtests/Base.cppwere present in the review bundle but not read in full. No tests or build checks were run.To get this to a good state
Implement hit testing using the supplied frame and point, populate the returned result, and add tests that verify meaningful hit-test data. Then rerun the relevant tests on the updated head.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T03:31:09Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
6c12f484f2:tools/check_conventions.pypassed;git diff --checkclean.nkwebkit_base_testsbuilt cleanly.nkwebkit_base):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp,core/libs/prx/libSceNKWebKit/src/BundleHitTestResult.cpp,core/libs/prx/libSceNKWebKit/src/Types.hppreverted 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-15T11:12:31Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: make
WKBundleFrameCreateHitTestResultderive and populate the hit-test result from the supplied frame and point.What I ran
Reviewed head
48dc6410c9ff70c32c8b7ecf4282452a681e9546using the prepared diff andrepo_read.pyat that pinned head. No test or build command was run.Results
Findings
Blocking
WKBundleFrameCreateHitTestResultvalidatesframeRefbut ignores both the frame andpoint, then returns a default-constructed result with no node, URL element, or image rect. This makes the new creation API return an empty result regardless of the requested hit-test location, so it does not implement the described frame hit testing. Implement the hit test and populate the result from its output before returning.core/libs/prx/libSceNKWebKit/src/BundleHitTestResult.cpp:82Non-blocking
None.
Not verified
Base.cpp, but that is not a test result from this review.BundleHitTestResult.cpp,Types.hpp,WebKitValueExports.hpp, and the relevant test range inBase.cpp.Export.cpp,InventoryExports.hpp, anddocs/dev/debt/libSceNKWebKit.mdwere excluded from the prepared full-text bundle; their targeted changed hunks were available indiff.patch. No other repository context was read.To get this to a good state
WKBundleFrameCreateHitTestResult, then rerun the changed unit tests and build on the updated head.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T15:51:13Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected changes add the four hit test APIs with host-side state, and I found no verified blocking defect.
What I ran
Reviewed head
509929d27f0e89d983e58d3bc2888ed07d0e00a5using the prepared diff andrepo_read.pyreader. No build or test command was run.Results
Findings
Blocking
None.
Non-blocking
None.
Sources
Reviewed the prepared diff and changed code at the pinned head, including
BundleHitTestResult.cpp,Types.hpp,WebKitValueExports.hpp, the changed test block, and the relevant export and debt entries.Not verified
The unit tests described in the PR and the build were not run. The complete file contents were not loaded for
Export.cpp,InventoryExports.hpp, anddocs/dev/debt/libSceNKWebKit.md; their changed hunks were inspected in the diff.To get this to a good state
Nothing is required. Optional: run the stated unit tests and a build on the pinned head before relying on the behavior.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T04:12:14Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the implementation is explicitly limited to host-side result construction and property access, with live layout-tree hit testing remaining unmodeled.
What I ran
Reviewed head
b573119999aae408962786adc5dd13b3646ae91fagainstmainusing the prepared diff andrepo_read.pyfor source context. No build or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Build and unit test results are not verified. Read:
description.md,commits.md,manifest.json,diff.patch,WebKitValueExports.hpp,BundleHitTestResult.cpp,Types.hpp,Base.cpp, and the relevantExport.cpprange. The fullExport.cppandInventoryExports.hppwere excluded from the review folder;Export.cppwas read through the pinned reader.files.jsonwas unavailable through the reader, so its exclusions were not independently checked.To get this to a good state
Nothing is required.