feat(libSceNKWebKit): implement WebCore::DisplayList drawing items #22556
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22556"
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-17T20:38:46Z.
What
Implements the constructors and destructors of 12
WebCore::DisplayListdrawing items: 60 3.20 exports that all throw onmaintoday. Each item hasC1/C2/D0/D1/D2:BeginTransparencyLayer,EndTransparencyLayerDrawRect,DrawLine,DrawLinesForText,DrawDotsForDocumentMarker,DrawEllipseFillRect,FillEllipse,StrokeRect,StrokeEllipse,ClearRectStacked on #22555, which adds
Item,DrawingItemand the shared layout and vtable code. Only the last commit is new here.Source: DisplayListItems.cpp and DisplayListItems.h at
c55364d53f97, as in #22555.DrawingItem's tail padding: for exampleDrawLinesForTextis 80 bytes, with itsDashArrayat 56 and the two flags at 76 and 77.localBoundsvtable slots follow upstream, including its float operation order.FloatRect::inflatecomputeswidth + d + d, which can round differently fromwidth + 2 * d. The oracle caught this on a large width.StrokeEllipse::localBoundsreadsGraphicsContext::strokeThickness, so it throwsNotImplemented_nid_no_patch, asapplydoes. That is the "+1 declared function" in the progress report.Debt: a fragment,
docs/dev/debt/changes/feat-nkwebkit-display-list-drawing-items.md, adds the entry.Overlap:
pr_overlap.pyfinds no open PR with these exports. It could not compare #21957 and #21958, which conflict withmain; I checked their diffs by hand and they have no DisplayList code. The conflicts it reports are lines next to each other only: the shared last include line oflibSceNKWebKit.hpp(#18797, #18805, #20327, #21422, #21432, #21979, #22449–#22456, #22480–#22482), and stubs next to these ones that #18377, #19636, #19771, #20296, #20326, #20327, #22450 and #22480–#22482 also remove.Tested
Linux Mint 22.3, with the driver and oracle from #22555. It adds rects, points, document marker styles and text line widths, and hashes
localBoundsandglobalBoundstoo.nkwebkit_displaylistdrawingitemstest: 16 sequences of 500 items match the real September 2020 classes. As a one-off, 300 sequences of 5,000 also matched.DrawLinesForTextbounds with widths and with an emptyDashArray;StrokeEllipse::localBoundsthrowing;width + (d + d)fails the transcript check.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-17T20:43:39Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
0acd4e8f12:tools/check_conventions.pypassed.nkwebkit_displaylistdrawingitems_tests,nkwebkit_displayliststateitems_testsbuilt cleanly.nkwebkit_displaylistdrawingitems,nkwebkit_displayliststateitems):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/Api.hpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/DisplayListDrawingItems.cpp,core/libs/prx/libSceNKWebKit/src/DisplayListItem.cpp,core/libs/prx/libSceNKWebKit/src/DisplayListStateItems.cppreverted 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 PrivacyOnion on 2026-11-17T23:54:05Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
63361d7dfb:tools/check_conventions.pypassed.nkwebkit_displaylistdrawingitems_tests,nkwebkit_displayliststateitems_testsbuilt cleanly.nkwebkit_displaylistdrawingitems,nkwebkit_displayliststateitems):core/libs/prx/libSceNKWebKit/Export.cpp,core/libs/prx/libSceNKWebKit/include/Api.hpp,core/libs/prx/libSceNKWebKit/include/LegacyExports.hpp,core/libs/prx/libSceNKWebKit/libSceNKWebKit.hpp,core/libs/prx/libSceNKWebKit/src/DisplayListDrawingItems.cpp,core/libs/prx/libSceNKWebKit/src/DisplayListItem.cpp,core/libs/prx/libSceNKWebKit/src/DisplayListStateItems.cppreverted 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-17T23:56:43Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected drawing item implementation shows no verified blocking defect, but the review is incomplete because several changed files were not read.
What I ran
Reviewed head
63361d7dfb03753bd8f5979ed2c553554133c354using the prepared review artifacts and the pinned repository reader. No build or tests were run.Results
Findings
Blocking
None verified in the files inspected.
Non-blocking
None.
Not verified
Read:
review/description.md,review/commits.md,review/manifest.json,review/diff.patch,core/libs/prx/libSceNKWebKit/src/DisplayListDrawingItems.cpp,core/libs/prx/libSceNKWebKit/src/DisplayListItem.cpp,core/libs/prx/libSceNKWebKit/src/DisplayListItemAbi.hpp,core/libs/prx/libSceNKWebKit/include/DisplayListDrawingItemExports.hpp, andcore/libs/prx/libSceNKWebKit/tests/DisplayListDrawingItems.cpp.The manifest lists 14 changed files. Other than those named above, the changed files were not read; in particular
core/libs/prx/libSceNKWebKit/Export.cppwas excluded from the review folder as too large. Build behavior and the author-reported tests were not verified.To get this to a good state
Nothing is required for the inspected code. Complete review of the unread changed files and run the relevant checks before making a formal merge decision.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T18:00:07Z.
Review: COMMENTED
Reviewed — comments
The review covers the new drawing item implementations and ABI declarations at head
58e72765a9b593f0f5da475783d817df01371c74; one bounds calculation appears inconsistent with the stated WebKit behavior, and compilation and tests were not run.What I ran
Read the prepared PR description, commits, diff, manifest, included changed files and targeted ABI context at the exact head. No build or tests were run. The author reports 121 tests passed on Linux Mint 22.3; that result was not independently verified.
Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceNKWebKit/src/DisplayListDrawingItems.cpp:301—StrokeRectLocalBoundsonly addslineWidthto width and height, leaving the origin unchanged. A centered stroke of widthwnormally expands each edge byw / 2; as written, the returned rectangle omits the left and top halves and extends the right and bottom by the full width. Please compare this operation directly with the pinned upstream implementation and mirror its origin and size calculations. The reported transcript test does not cover this kind’s bounds: itsKindInfosetsboundedtotrue, but the implementation hasStrokeEllipseLocalBoundsthat throws and separately marks that kind unbounded;StrokeRectis included as bounded, so this observation warrants adding an explicit expected-bounds assertion if the oracle does not already exercise it.Not verified
Export.cppwas not read; only the two changed locations were inspected. Other included changed files read:DisplayListDrawingItemExports.hpp,DisplayListDrawingItems.cpp,DisplayListDrawingItems.cpptest,libSceNKWebKit.hpp, and the debt entry. The manifest also listsLegacyExports.hppas changed, but no added lines; its full text was not read.To get this to a good state
Nothing is required. Optional: verify
StrokeRect::localBoundsagainst the pinned upstream implementation and add a direct expected-bounds test.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T00:21:23Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected implementation follows the stated upstream bounds behavior; the full review is incomplete because two changed files and the export implementation were not read.
What I ran
Read the supplied review description, commits, manifest, and diff for PR head
902e515eb7a417ecbacc862c34f0f6afe7a6f011. No tests or build commands were run.Results
Findings
Blocking
None identified in the code inspected.
Non-blocking
None.
Not verified
Read the full text of
src/DisplayListDrawingItems.cpp,tests/DisplayListDrawingItems.cpp,include/DisplayListDrawingItemExports.hpp,libSceNKWebKit.hpp, and the technical debt entry. Read only the first 300 lines of the new implementation and tests; the implementation tail was read. The manifest showsExport.cppwas excluded because it was too large for the review folder, and it was not inspected through the reader.include/LegacyExports.hppwas listed as changed but its full text was not read. The remaining 257 lines of the tests and all other changed source context were not inspected. The manifest providesfilesandincludedstatus;review/files.jsonwas not available. No repository tests, build, or console behavior were verified.To get this to a good state
Complete inspection of the unread changed files and run the relevant NKWebKit checks before making a formal approval decision.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T03:34:11Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
55423e75029d933499d8676bf8ba2be86c44c2e7using the prepared diff andrepo_read.pyfor selected source ranges. No build or tests were run. No merged-preview check was run.Results
Findings
Blocking
None found in the inspected implementation.
Non-blocking
core/libs/prx/libSceNKWebKit/tests/DisplayListDrawingItems.cpp:2441catches the expected exception from callingapplywith a null graphics context. This checks that the current stub throws, but does not validate a usable drawing context or successfulapplybehavior. The implementation marks that path as not implemented, so consider making the test intent explicit and covering successful apply behavior when graphics-context support exists.Not verified
Read:
description.md,commits.md,manifest.json,diff.patch; selected ranges ofcore/libs/prx/libSceNKWebKit/src/DisplayListDrawingItems.cppandcore/libs/prx/libSceNKWebKit/include/DisplayListDrawingItemExports.hppthroughrepo_read.py. The new test source was inspected in the diff.docs/dev/debt/changes/feat-nkwebkit-display-list-drawing-items.mdwas inspected in the diff.core/libs/prx/libSceNKWebKit/Export.cppwas excluded from the review folder because it was too large; only its relevant diff hunks were inspected. The full text of the changed test source was not read through the repository reader. No tests, build, or console behavior were verified. The author reports Linux Mint 22.3 testing and passing NKWebKit tests in the PR description; these were not run as part of this review.To get this to a good state
Nothing is required. Optional: clarify that the
applyassertion tests the unimplemented throwing path, and add a successful-path test when graphics-context support is available.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T15:56:14Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected implementation follows the declared ABI layouts and exercises the drawing item paths, but a complete approval is not justified because the large export source was not available for review.
What I ran
1922ffe43a91deeb141d3a10cb273020597c7e70usingrepo_read.py.Export.cppwas excluded by the review folder size rule;LegacyExports.hpphas no added lines.Results
Findings
Blocking
None verified in the code inspected.
Non-blocking
None.
Not verified
core/libs/prx/libSceNKWebKit/Export.cppwas not read because it was excluded as too large. Its removed stubs and export definitions therefore were not verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T20:04:13Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the inspected implementation and ABI declarations support merging.
What I ran
Reviewed head
720ce2ad04f8e4e65ce742b9256ba66941264f43againstmainusing the prepared review bundle andrepo_read.pyreader. No commands or tests were run in this session.Results
Findings
Blocking
None.
Non-blocking
None.
Sources
Behavior claims were checked against the pinned head
720ce2ad04f8e4e65ce742b9256ba66941264f43inDisplayListDrawingItems.cpp,DisplayListDrawingItemExports.hpp,DisplayListItem.cpp, andDisplayListItemAbi.hpp.Not verified
Did not run the test suite or validate behavior on console hardware. Read the relevant changed implementation, ABI declarations, test source, export-header wiring, shared item lifecycle code, and relevant symbol locations in
Export.cpp. The fullExport.cppwas excluded from the review folder as too large; unrelated portions of it and the remainder of test execution were not verified. The prepared bundle also reports no full text for changes to that file.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T18:56:08Z.
Review: COMMENTED
Reviewed — no blocking findings
The drawing item implementations and their ABI declarations look consistent with the stated WebKit reference; review is limited because the large export table was not read in full.
What I ran
Reviewed head
0c4dc4260b1cbb0cec6c04b10404492eeb6ab450using the prepared diff and the pinnedrepo_read.pyreader. No build or tests were run; the test results in the description are author-reported.Files read:
description.md,commits.md,manifest.json,diff.patch,README.md,DisplayListDrawingItemExports.hpp,DisplayListDrawingItems.cpp,DisplayListDrawingItems.cpptests,libSceNKWebKit.hpp,DisplayListItemAbi.hpp, the debt entry, and targetedExport.cpplines.Export.cppwas not read in full;LegacyExports.hpphad no added lines and was not read.Results
Findings
Blocking
None identified in the code inspected.
Non-blocking
None.
Not verified
The full
Export.cppandLegacyExports.hppwere not reviewed. No build, test suite, or physical console behavior was verified. The description reports that all 121 NKWebKit tests passed and that the oracle matched; these were not run during this review.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T04:36:58Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
2a384d7cf980406d8d6c9e0f0f9105bf56279f97. I read the prepared description, commits, manifest and diff, plus the included changed source, ABI declarations, tests, debt entry, and targeted ABI and build context. No tests were run; test results in the description are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Export.cppwas excluded from the prepared full-text files; I read only its initial lines and did not inspect the full file. I also did not run the test suite or verify the reported oracle and console behavior. Files read:description.md,commits.md,manifest.json,diff.patch,DisplayListDrawingItemExports.hpp,DisplayListDrawingItems.cpp,DisplayListDrawingItems.cpptests,libSceNKWebKit.hpp,DisplayListItemAbi.hpp,CMakeLists.txt, and the debt entry. Excluded:Export.cppfull text. No other changed files were excluded according to the review folder listing.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-30T18:10:59Z.
Review: COMMENTED
Actionable comments posted: 3
Architecture findings (1)
Advisory architecture findings (1)
b02b555d-630c-4768-af29-5cc671028c90Reviewing files that changed from the base of the PR and between
aecfbf79b1and393ae969db.core/libs/prx/libSceNKWebKit/Export.cppcore/libs/prx/libSceNKWebKit/include/DisplayListDrawingItemExports.hppcore/libs/prx/libSceNKWebKit/include/LegacyExports.hppcore/libs/prx/libSceNKWebKit/libSceNKWebKit.hppcore/libs/prx/libSceNKWebKit/src/DisplayListDrawingItems.cppcore/libs/prx/libSceNKWebKit/tests/DisplayListDrawingItems.cppdocs/dev/debt/changes/feat-nkwebkit-display-list-drawing-items.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T18:23:00Z.
Review: COMMENTED
Reviewed — no blocking findings
No concrete defect is visible in the reviewed implementation; runtime tests and the upstream comparison were not independently verified here.
What I ran
Reviewed head
393ae969dbffb3b7e88e5dddbdd52302c553b0c0; no merged preview, build, or test run. I used the prepared diff and targeted reads withrepo_read.pyin the review container.Results
Negative control
Not run; no test or source mutation was performed during this review.
Findings
Blocking
None.
Non-blocking
None.
Sources
DrawLinesForTextlayout.Not verified
No tests or build were run; the passing NKWebKit tests and oracle comparisons in the PR description are author-reported. The cited WebKit source and behavior on a console module were not independently checked.
Export.cppfull text was excluded from the review folder due to size; its diff and targeted reader context were reviewed. The other changed files were available underfiles/; changed hunks and relevant context were reviewed for all seven paths listed inmanifest.json.To get this to a good state
Nothing is required. Optional follow-up: complete the console-module comparison already tracked in the technical-debt entry.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:59:08Z.
Review: COMMENTED
Built the branch’s changed sources and ran DisplayListDrawingItems on Linux against the existing runtime libraries. The test run passed and covered the display-list drawing cases.
AI-assisted: yes.
Pull request closed