feat(libSceNKWebKit): implement WebCore TextStream dumps for geometry, transforms and scrolling and graphics enums #15517

Merged
Jawschamp merged 1 commit from upstream-pr/15517 into main 2026-11-07 10:05:57 +00:00
Jawschamp commented 2026-11-03 17:10:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Jawschamp on 2026-11-03T17:10:12Z.


What

Implements 31 libSceNKWebKit WebCore::operator<<(WTF::TextStream&, ...) exports that threw NotImplemented_nid_no_patch as parameterless placeholders, with real signatures declared in the new include/WebCoreDumpExports.hpp and the code in src/WebCoreDump.cpp:

  • Geometry: FloatPoint, IntPoint, IntSize, IntRect, FloatSize, FloatRect, FloatPoint3D, LayoutUnit, LayoutPoint, LayoutSize, LayoutRect.
  • Transforms: AffineTransform, TransformationMatrix.
  • Scrolling: ScrollAlignment, ScrollAlignment::Behavior, ScrollType, ScrollClamping, ScrollBehaviorForFixedElements, ScrollingNodeType, ScrollingLayerPositionAction, ViewportRectStability, ScrollPositioningBehavior.
  • Graphics enums: CompositeOperator, BlendMode, WindRule, LineCap, LineJoin, ColorSpace, AlphaPremultiplication, GraphicsLayerPaintingPhase, GraphicsLayer::CustomAppearance.

Their placeholders leave Export.cpp and include/InventoryExports.hpp, and docs/dev/debt/libSceNKWebKit.md loses their 31 table rows; its count line goes from 7408 (as left by #14172 at d15cf41cfa) to 7377.

  • Output follows the pinned PS5-WebKit-11.x sources FloatPoint.cpp, IntPoint.cpp, IntSize.cpp, IntRect.cpp, FloatSize.cpp, FloatRect.cpp, FloatPoint3D.cpp, LayoutUnit.h, LayoutPoint.h, LayoutSize.h, LayoutRect.h, AffineTransform.cpp, TransformationMatrix.cpp, ScrollTypes.cpp, ScrollAlignment.cpp, ScrollingCoordinatorTypes.cpp, ScrollingConstraints.cpp, GraphicsTypes.cpp, ColorSpace.cpp, AlphaPremultiplication.cpp and GraphicsLayer.cpp.
  • Based on #14172 at d15cf41cfa (its head when this was rebuilt); the single commit of this PR sits on top of it. Depends on: #14172.
  • WTF::TextStream layout and its operator<< exports come from #14172, so this branch contains that PR's commits until it merges.
  • FormatNumberRespectingIntegers is not an NKWebKit export, so it is emulated by setting the stream's formatting flag for the duration of the write and restoring it afterwards, then calling the exported double writer.
  • ColorSpace::XYZ_D65 prints XYZ-D50, as the pinned source does.
  • Not implemented here: RectEdges<float> (box side order cannot be confirmed in the pinned tree) and the dumps of FloatRoundedRect, Region, ImageData, VelocityData, TimingFunction, EventRegion, filters, Color, TouchAction and the scrolling constraint types, which have no matching source or layout evidence.

Tested

Linux x86_64, GCC 14.2 (g++ extracted from Debian trixie packages), -DBUILD_TESTING=ON. Hardware and titles: not tested.

  • New test nkwebkit_webcoredump (auto-registered from tests/WebCoreDump.cpp) runs in well under a second. No public tests exist for these dumps and native WebKit cannot be run for a differential test, so every expected string is derived by hand from the pinned source, including indentation, multi-line mode and the integer-respecting number format. ctest -R nkwebkit passes all 13 tests.
  • tools/check_conventions.py passes against both origin/main and #14172's head; tools/check_test_registration.py and core/libs/tests/test_public_headers.py --audit-only pass.
  • tools/pr_overlap.py --branch fix/nkwebkit-textstream-dumps-v2 reports no open PR with the same new files. Its only same-exports hit is #13486, a stacked draft relinker PR whose own diff is 3 relinker files; the exports it lists are the WTF::TextStream ones this branch inherits from #14172. It reports textual overlap with the docs/dev/debt/libSceNKWebKit.md count line of many open libSceNKWebKit PRs, and could not compare #13486, #13515, #14138, #14152, #14212, #14259, #14999, #15011, #15173, #15175, #15184, #15216, #15217, #15218 and #15224 because they conflict with main.
  • Not run: the rest of the suite, Windows and the PS5 behaviour of these exports.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #14172
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5141421894 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15517). Originally posted by [Jawschamp](https://github.com/Jawschamp) on 2026-11-03T17:10:12Z. --- ### What Implements 31 libSceNKWebKit `WebCore::operator<<(WTF::TextStream&, ...)` exports that threw `NotImplemented_nid_no_patch` as parameterless placeholders, with real signatures declared in the new `include/WebCoreDumpExports.hpp` and the code in `src/WebCoreDump.cpp`: - Geometry: `FloatPoint`, `IntPoint`, `IntSize`, `IntRect`, `FloatSize`, `FloatRect`, `FloatPoint3D`, `LayoutUnit`, `LayoutPoint`, `LayoutSize`, `LayoutRect`. - Transforms: `AffineTransform`, `TransformationMatrix`. - Scrolling: `ScrollAlignment`, `ScrollAlignment::Behavior`, `ScrollType`, `ScrollClamping`, `ScrollBehaviorForFixedElements`, `ScrollingNodeType`, `ScrollingLayerPositionAction`, `ViewportRectStability`, `ScrollPositioningBehavior`. - Graphics enums: `CompositeOperator`, `BlendMode`, `WindRule`, `LineCap`, `LineJoin`, `ColorSpace`, `AlphaPremultiplication`, `GraphicsLayerPaintingPhase`, `GraphicsLayer::CustomAppearance`. Their placeholders leave `Export.cpp` and `include/InventoryExports.hpp`, and `docs/dev/debt/libSceNKWebKit.md` loses their 31 table rows; its count line goes from 7408 (as left by #14172 at `d15cf41cfa`) to 7377. - Output follows the pinned [PS5-WebKit-11.x](https://github.com/neonmodder123/PS5-WebKit-11.x/tree/80f77e94c63ee7202eec3d4b5b1a021dd89011ba) sources `FloatPoint.cpp`, `IntPoint.cpp`, `IntSize.cpp`, `IntRect.cpp`, `FloatSize.cpp`, `FloatRect.cpp`, `FloatPoint3D.cpp`, `LayoutUnit.h`, `LayoutPoint.h`, `LayoutSize.h`, `LayoutRect.h`, `AffineTransform.cpp`, `TransformationMatrix.cpp`, `ScrollTypes.cpp`, `ScrollAlignment.cpp`, `ScrollingCoordinatorTypes.cpp`, `ScrollingConstraints.cpp`, `GraphicsTypes.cpp`, `ColorSpace.cpp`, `AlphaPremultiplication.cpp` and `GraphicsLayer.cpp`. - Based on #14172 at `d15cf41cfa` (its head when this was rebuilt); the single commit of this PR sits on top of it. Depends on: #14172. - `WTF::TextStream` layout and its `operator<<` exports come from #14172, so this branch contains that PR's commits until it merges. - `FormatNumberRespectingIntegers` is not an NKWebKit export, so it is emulated by setting the stream's formatting flag for the duration of the write and restoring it afterwards, then calling the exported `double` writer. - `ColorSpace::XYZ_D65` prints `XYZ-D50`, as the pinned source does. - Not implemented here: `RectEdges<float>` (box side order cannot be confirmed in the pinned tree) and the dumps of `FloatRoundedRect`, `Region`, `ImageData`, `VelocityData`, `TimingFunction`, `EventRegion`, filters, `Color`, `TouchAction` and the scrolling constraint types, which have no matching source or layout evidence. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Linux x86_64, GCC 14.2 (g++ extracted from Debian trixie packages), `-DBUILD_TESTING=ON`. Hardware and titles: not tested. - New test `nkwebkit_webcoredump` (auto-registered from `tests/WebCoreDump.cpp`) runs in well under a second. No public tests exist for these dumps and native WebKit cannot be run for a differential test, so every expected string is derived by hand from the pinned source, including indentation, multi-line mode and the integer-respecting number format. `ctest -R nkwebkit` passes all 13 tests. - `tools/check_conventions.py` passes against both `origin/main` and #14172's head; `tools/check_test_registration.py` and `core/libs/tests/test_public_headers.py --audit-only` pass. - `tools/pr_overlap.py --branch fix/nkwebkit-textstream-dumps-v2` reports no open PR with the same new files. Its only same-exports hit is #13486, a stacked draft relinker PR whose own diff is 3 relinker files; the exports it lists are the `WTF::TextStream` ones this branch inherits from #14172. It reports textual overlap with the `docs/dev/debt/libSceNKWebKit.md` count line of many open libSceNKWebKit PRs, and could not compare #13486, #13515, #14138, #14152, #14212, #14259, #14999, #15011, #15173, #15175, #15184, #15216, #15217, #15218 and #15224 because they conflict with `main`. - Not run: the rest of the suite, Windows and the PS5 behaviour of these exports. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #14172 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!15517
No description provided.