Repository navigation
Add transpose helpers for Size, Rect, LayoutInput and LayoutOutput - #1265
Merged
Merged
Conversation
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
Document that container style getters are only called for the node being laid out and child/oof item getters only by the node laying them out, so tree implementations can express each in different axes (CSS writing modes).
staging-devin-ai-integration
Bot
force-pushed
the
devin/1791396700-transpose-helpers
branch
from
October 7, 2026 18:44
f88f806 to
1a839a6
Compare
nicoburns
enabled auto-merge (squash)
October 7, 2026 18:46
nicoburns
disabled auto-merge
October 7, 2026 18:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Small, layout-neutral helpers so that a tree implementation can run a node's layout algorithm in the axes of a CSS vertical
writing-modewhile Taffy itself stays horizontal-tb: Blitz transposes theLayoutInputit receives from the parent before dispatching an orthogonal child, and transposes theLayoutOutputback.Size<T>::transpose(),Rect<T>::transpose()(left↔top, right↔bottom),RequestedAxis::transpose()LayoutInput::transpose()— swaps every per-axis input;vertical_margins_are_collapsibleis reset toLine::FALSEsince margins cannot collapse across a change of block axisLayoutOutput::transpose()— swapssize/scrollable_overflow_rect/oof_positioning_area; drops baselines and collapsible margins (block-axis quantities that would otherwise land on the parent's inline axis)LayoutPartialTree/LayoutBlockContainer/LayoutFlexboxContainer/LayoutGridContainer/LayoutContainingBlockstating the contract the algorithms already follow: container getters are only called for the node being laid out, child/OOF-item getters only by the node laying them out. This is what lets the two be expressed in different axes.No behaviour change;
CHANGELOG.mdupdated.Context
Companion to the Blitz
writing-modesfeature (see the Blitz PR referenced from this one). An audit ofsrc/computeconfirmed no child style is read through a container getter, so no API change beyond the docs is needed.Pre-existing
clippy -D warningsfailures onmain(incompatible_msrvincompact_length.rs,useless_borrows_in_formattinginparse.rs) are unrelated and left alone.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/518900d464cb4cd0be95740dba21d3f1
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/518900d464cb4cd0be95740dba21d3f1?variant=devin-insiders
Requested by: @nicoburns