Skip to content

fix(core): include child overflow in vector container paint bounds - #93

Merged
AsPulse merged 1 commit into
mainfrom
fix/vector-container-paint-bounds
Jul 29, 2026
Merged

AsPulse merged 1 commit into
mainfrom
fix/vector-container-paint-bounds

Conversation

@AsPulse

@AsPulse AsPulse commented Jul 29, 2026

Copy link
Copy Markdown
Member

VectorLayer, Frame, Flex, and Padding never overrode VectorComponent::paint_bounds, so they reported only their own (0,0)..size layout box while their render returned that same rectangle as view_box. The contract #84 enforces — view_box == paint_bounds — therefore held even though the bounds silently dropped whatever a child painted outside the box, and rasterization clipped it. The raster variants of all four have unioned their children's paint bounds into their own since #7; on the vector side only Fragment was corrected in #84.

Change

  • Override paint_bounds on the vector VectorLayer, Frame, Flex, and Padding to start from (0,0)..size and union in every child's paint bounds, and return that same rectangle as render().view_box.
  • Add a container paint-bounds contract test asserting that each container reports the same bounds in both worlds, which catches bounds that drop child overflow — something the view_box == paint_bounds enforcement cannot see — and records DecoratedBox and Clip as the containers that pin their bounds on purpose.
  • Add a CPU rasterization regression for children spilling off both corners of a VectorLayer, covering the negative view-box origin.
  • Correct the English and Japanese layout tutorials, which described paint_bounds as a raster-side responsibility.
  • Add a major changeset because corrected bounds can change existing rendered video pixels.

@AsPulse
AsPulse merged commit 7c25ae8 into main Jul 29, 2026
17 checks passed
@AsPulse
AsPulse deleted the fix/vector-container-paint-bounds branch July 29, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant