feat(libSceNKWebKit): implement the TextStream operators for absolute and fixed position constraints #24165
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24165"
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 ToRaNek on 2026-11-20T08:44:59Z.
What
Two more
WebCore::operator<<(TextStream&, ...)exports were stubs that threw: the ones forAbsolutePositionConstraintsandFixedPositionViewportConstraints. They now print what WebKit prints (ScrollingConstraints.cppL113-L126):dumpPropertyisstartGroup(), the name, a space, the value,endGroup(); the port calls the existingstartGroup,endGroup,FloatPointandFloatRectexports, so the multi-line mode, the indent and theSVGStyleRectflag behave as they already do.Which revision. The two functions, the two classes,
dumpPropertyand theFloatPointandFloatRectoperators are the same text atc55364d53f97,e12a212a531a,73a35b43be7aand in the pinned 11.x tree, so the output does not depend on which one the console follows.Layout.
AbsolutePositionConstraintsis aFloatSizethen aFloatPoint, 16 bytes.FixedPositionViewportConstraintsderives from the polymorphicViewportConstraints(FloatSize,unsigned), whose data ends at byte 20; under the Itanium ABI the derived members start there, so the viewport rectangle is at offset 20, the layer position at 36 and the object is 48 bytes. I checked those numbers withoffsetofon a copy of the class declarations compiled with GCC, and the header asserts them.\n(layer-position-at-last-layout (1,2.50))\n(viewport-rect-at-last-layout (1,2.50) width=3 height=4)\n(layer-position-at-last-layout (-1.50,2))The
StickyPositionViewportConstraintsoperator is left a stub on purpose: its text differs between the three older revisions and 11.x.This is stacked on #24161, which adds the neighbouring operators to the same header and test file; the first commit of this branch is that PR.
Tested
Windows 11 IoT Enterprise LTSC 2024 (10.0.26100), WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON.core/libs/prx/libSceNKWebKit/tests/WebCoreDump.cpp(nkwebkit_webcoredump): both objects in multi-line mode, in single-line mode and, for the fixed one, withSVGStyleRectand on a stream already indented by two, with the indent checked afterwards. The alignment offset and anchor edges are set to values that must not appear.maine825fa1492the two exports are the stubs removed here, which throwNotImplemented.maine825fa1492:ctest -R "^nkwebkit_"passes 162 of 162.python tools/check_conventions.py --base origin/mainpasses.python tools/pr_overlap.py --branch feat/nkwebkit-text-stream-position-constraints: it fails closed on 32 open PRs that editExport.cppor the export headers. I fetched the head of each reported PR and searched the added and removed lines of its diff for the two symbols: none implements them. #22454 implements two other members of these classes (layerPositionForViewportRect,layerPositionForConstrainingRect) in a newsrc/ScrollingConstraints.cppand declares the same 48-byte layout, with the same four offsets, in its own header and namespace. To stay clear of it this PR names its filesrc/ScrollingConstraintsDump.cppand keeps its record types inWebCoreDumpExports.hpp, so the two merge in either order. #24011 touches neighbouring lines of the same header and test file, as noted on #24161.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 PrivacyOnion on 2026-11-20T08:46:38Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
463cbd574d: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/Region.cpp,core/libs/prx/libSceNKWebKit/src/ActivityState.cpp,core/libs/prx/libSceNKWebKit/src/ScrollingConstraintsDump.cpp,core/libs/prx/libSceNKWebKit/src/TouchAction.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-20T09:07:23Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected implementation follows the described WebKit output behavior; the review is incomplete because two changed files were not read in full and no checks were run.
What I ran
Reviewed head
463cbd574d501dd1fef7c8e94d6a718bb9472d36using the prepared diff and repository reader. No build or tests were run.Results
Findings
Blocking
None identified in the code inspected.
Non-blocking
None.
Sources
The implementation and test cases were reviewed at the pinned head using the prepared diff and reader.
Not verified
Export.cppandInventoryExports.hppwere not read in full;LegacyExports.hppandRegion.cppwere read only around the changed areas. Other changed files were read in full:WebCoreDumpExports.hpp,ActivityState.cpp,ScrollingConstraintsDump.cpp,TouchAction.cpp,WebCoreDump.cpp, and both debt change notes. The full review bundle lists 11 changed files; only 6 were read in full. No build or tests were run, and console behavior was not confirmed. The description reports 162 passing tests and a successful conventions check; these were not run as part of this review.To get this to a good state
Nothing is required. Optional: run the reported build, tests, and conventions check at this head.