feat(libSceNKWebKit): implement the WebCore TextStream dump operators for Vector, ScrollableAreaParameters, VisiblePosition and VisibleSelection #24011
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24011"
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 FinleyLaempe on 2026-11-20T00:56:16Z.
What
Implements 4
WebCore::operator<<(WTF::TextStream&, ...)dump exports inWebCoreDump.cpp—Vector<unsigned long>,ScrollableAreaParameters,VisiblePositionandVisibleSelection— replacing theNotImplemented_nid_no_patchstubs inExport.cpp.Position,VisiblePosition,VisibleSelection,ScrollableAreaParameters) are source-derived and pinned withstatic_assertinWebCoreDumpExports.hpp. ThePositionlayout (node at 0, offset at 8, anchor type in the low 3 bits of byte 12) and theVisibleSelectionlayout (sixPositions, then affinity, type and the two flag bits at 96-98) match the module-translatedPositionandVisibleSelectionconstructors in #23757, which implements those constructors and none of these dump exports.Text/Int/Float/Doubleappend helpers and the WTFTextStreamprimitives (startGroup,endGroup) already inWebCoreDump.cpp, andNKWebKit::WtfAbi::VectorfromWtfVector.hpp; newDumpValue/DumpPropertyhelpers structure the property dumps.Position::m_anchorTypeBitsis masked to 3 bits and both affinity and anchor type print nothing for values outside their switches.Vector<unsigned long>dump copies items in 64-element chunks throughGuestCopyIn_nid_no_patchbefore the first append; an unreadable guest buffer throwsAPS5_INVALID_ARG_EXand leaves the stream unmodified (covered by a throw-keeps-stream test).NotImplemented_nid_no_patchanymore; the only throw path is the invalid-argument one above, since guest reads are the only operation that can fail.WtfTextAbi.hppcorrects theWTF::TextStreamlayout — the earlier transcription hadformattingFlagsandindentswapped — and adds thecontainerSizeLimitmember at offset 48, matching the pinnedTextStream.hwithoutASSERT_ENABLED; size stays 56 bytes.docs/dev/debt/changes/feat-nkwebkit-textstream-dumps.mdadds three entries (editing dumps, parameter dumps, object dumps), all marked not compared with a console module, changes theWTF text builder layoutsentry for theTextStreamfix, and removes the 3 NID inventory rows of the now-implemented exports.Tested
Arch Linux x86-64, GCC 16.2.1, Release build with
-DBUILD_TESTING=ON: the extendednkwebkit_webcoredumptest and every othernkwebkit_*test, 163 of 163 passed.python3 tools/check_conventions.py --base upstream/mainpasses. Not tested on a console or on Windows.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)Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-20T00:56:24Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T01:47:44Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
441849be39:tools/check_conventions.pypassed.nkwebkit_webcoredump_testsbuilt cleanly.nkwebkit_webcoredump):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/include/WebCoreDumpExports.hpp,core/libs/prx/libSceNKWebKit/src/WebCoreDump.cpp,core/libs/prx/libSceNKWebKit/src/WtfTextAbi.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-20T06:32:36Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the review covers the implementation and its changed declarations, while console behavior and the reported test runs remain unverified.
What I ran
Reviewed head
441849be396b675fc9c4474f9daff3df7a748779. No build or tests were run. Readdescription.md,commits.md,manifest.json,diff.patch, and the full changed filesWebCoreDump.cpp,WebCoreDumpExports.hpp,WtfTextAbi.hpp,tests/WebCoreDump.cpp, andfeat-nkwebkit-textstream-dumps.md. Also read the changed declaration ranges inLegacyExports.hppandInventoryExports.hpp, and the affected ranges inExport.cpp. The review folder’sfiles.jsonwas not available through the reader.Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceNKWebKit/src/WebCoreDump.cpp:681— TheScrollableAreaParametersdump does not emit the two overscroll behavior fields oruseDarkAppearanceForScrollbars, although the ABI struct includes them. Consider matching the upstream dump output for these fields so diagnostics retain the complete parameter state.Not verified
To get this to a good state
Nothing is required. Optional: include the omitted
ScrollableAreaParametersfields in the dump output.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T13:56:59Z.
Review: COMMENTED
Reviewed — comments
Changes are required before merge: resolve the non-blocking review point below; no blocking defect was verified.
What I ran
Reviewed head
5cf77adddb4e4479a81f11f5df87cda90e2c0786using the prepared diff and pinned reader. No build or tests were run by me; the test results in the PR description are author-reported.Results
Findings
Blocking
None.
Non-blocking
ScrollableAreaParametersstores both overscroll behavior fields, and the dump helper defines their enum type, but the operator never emits either field. This leaves the dump incomplete for non-default overscroll settings. Add the corresponding properties if the intent is a complete parameter dump.core/libs/prx/libSceNKWebKit/src/WebCoreDump.cpp:432-443.Not verified
Full text was read for
core/libs/prx/libSceNKWebKit/src/WebCoreDump.cpp,core/libs/prx/libSceNKWebKit/include/WebCoreDumpExports.hpp,core/libs/prx/libSceNKWebKit/src/WtfTextAbi.hpp,core/libs/prx/libSceNKWebKit/tests/WebCoreDump.cpp, anddocs/dev/debt/changes/feat-nkwebkit-textstream-dumps.md. The diff was inspected for all changed files. Full text was excluded by the review bundle forcore/libs/prx/libSceNKWebKit/Export.cppandcore/libs/prx/libSceNKWebKit/include/InventoryExports.hpp;core/libs/prx/libSceNKWebKit/include/LegacyExports.hppwas listed as included but its full text was not read. Windows and console behavior were not tested.To get this to a good state
Nothing is required. The overscroll output is an optional completeness improvement.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T00:21:49Z.
Review: COMMENTED
Reviewed — comments
The implementation and tests were inspected at head
0cc015167f7804f242e86b1644111acb1dcbb7d5; one optional output coverage point remains, so approval is not justified.What I ran
Read the prepared diff and targeted repository files through
repo_read.py's review reader. No tests or build commands were run. The author reports 163 tests passed on Arch Linux x86-64 with GCC 16.2.1; that result was not independently verified.Results
Findings
Blocking
None identified in the inspected code.
Non-blocking
ScrollableAreaParametershas fields for horizontal and vertical overscroll behavior and dark scrollbar appearance, but the dump omits them (core/libs/prx/libSceNKWebKit/src/WebCoreDump.cpp:681). Consider confirming against the pinned upstream operator whether those fields are intentionally excluded and add output tests if the dump should include them.Not verified
WebCoreDumpExports.hpp,WebCoreDump.cpp,WtfTextAbi.hpp,tests/WebCoreDump.cpp, and the debt fragment. Targeted ranges were read inExport.cppandInventoryExports.hpp;LegacyExports.hppwas listed but not read.Export.cppandInventoryExports.hppare excluded from the review folder and were inspected only through targeted reader ranges. No other excluded files were present in the review manifest.To get this to a good state
Nothing is required. Optional: confirm and test whether the omitted
ScrollableAreaParametersfields belong in this dump.