Skip to content

Conversation

@tomcur
Copy link
Contributor

@tomcur tomcur commented Dec 22, 2025

Prior to the introduction of ClipBehavior in #28, the old and only clipping behavior in the box tree was equivalent to ClipBehavior::PreferLocal, but both ClipBehavior::PreferLocal and ClipBehavior::None effectively allow children to opt out of ancestor clips, i.e. spilling out of ancestor nodes' clips. That may sometimes be useful for debugging, but is otherwise likely quite unexpected clipping behavior.

Always inheriting clips simplifies clip handling (including in follow ups to this PR where clipping correctness is improved).

@tomcur tomcur force-pushed the always-inherit-clips branch 3 times, most recently from 8126b0f to 0d4555d Compare December 22, 2025 11:32
Copy link
Contributor

@waywardmonkeys waywardmonkeys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as I think you discussed this with @no-materials ... but if he disagreed / disagrees, then let's discuss it more.

Prior to the introduction of `ClipBehavior` in
#28, the old and only clipping
behavior in the box tree was equivalent to `ClipBehavior::PreferLocal`,
but both `ClipBehavior::PreferLocal` and `ClipBehavior::None`
effectively allow children to opt out of ancestor clips, i.e. spilling
out of ancestor nodes' clips. That may sometimes be useful for
debugging, but is otherwise likely quite unexpected clipping behavior.

Always inheriting clips simplifies clip handling (including in follow
ups to this PR where clipping correctness is improved).
@tomcur tomcur force-pushed the always-inherit-clips branch from 0d4555d to f552433 Compare December 23, 2025 11:59
@tomcur
Copy link
Contributor Author

tomcur commented Dec 23, 2025

Approving as I think you discussed this with @no-materials ... but if he disagreed / disagrees, then let's discuss it more.

Indeed, my understanding is he agrees with this in principle (but happy to revisit otherwise).

@tomcur tomcur merged commit 99f24d2 into main Dec 23, 2025
15 checks passed
@tomcur tomcur deleted the always-inherit-clips branch December 23, 2025 16:00
@no-materials
Copy link
Contributor

Approving as I think you discussed this with @no-materials ... but if he disagreed / disagrees, then let's discuss it more.

Indeed, my understanding is he agrees with this in principle (but happy to revisit otherwise).

Yes, as discussed, I'm aligned with this approach.

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.

5 participants