Repository navigation
Let an inline root claim abspos boxes on behalf of its inline spans - #1167
Merged
Merged
Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
staging-devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Oct 9, 2026
Cargo.toml: parley and parlance from crates.io (0.12, 0.1), as #1159 does. Cargo.lock: main's lockfile with the winkin, fontwich and stylo fork entries resolved on top at the revisions the branch pins. layout/inline.rs stays deleted and node/text.rs stays the branch's; #1167's change to them is carried over in the next commit.
staging-devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Oct 9, 2026
…inline layout main computes, in layout/inline.rs, the out-of-flow positions an inline span is a containing block for, and stores them on the Parley TextLayout. This branch replaces both, so the same is done in layout/inline/lines.rs as the inline boxes are placed, and each backend's TextLayout holds the flags.
staging-devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Oct 10, 2026
… now The text backend commits that follow move and replace layout/inline.rs and the Parley TextLayout, which #1167 changed. Its blitz-dom part is taken out here so that they apply as written, and is put back for the shared inline layout once they have. The stylo_taffy part stays.
staging-devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Oct 10, 2026
…nline layout main computes, in layout/inline.rs, the out-of-flow positions an inline span is a containing block for, and stores them on the Parley TextLayout. The text backend commits replace both, so the same is done in layout/inline/lines.rs as the inline boxes are placed, and each backend's TextLayout holds the flags, which Node::layout_style reads as on main.
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.
Summary
An ultra-minimal alternative to #1164 (itself a minimal version of #974). Compare the two and merge at most one.
An inline span has no layout node, so today an out-of-flow box whose containing block is a span (e.g.
position: relativeon an<a>) bubbles past it to a further ancestor. Here the inline root claims such boxes in the span's place, so they are positioned against the root's padding box by the regularcompute_oof_layoutpass. Span geometry is not resolved.RunMode::PerformLayout, inline layout's existing loop over inline boxes walks each box's ancestors up to the root (inline_span_cb_flags) and ORs the span claims together. The result is written toTextLayout::span_cb_flagsbefore theTextLayoutis put back on the node.Node::layout_style()copies it into two newStyleFlags(SPAN_ABSOLUTE_CB,SPAN_FIXED_CB), whichis_containing_block()ORs in. The only reader iscompute_oof_layout, which runs after inline layout returns.inline_containing_block_claimsiscontaining_block_claimswithout the properties that don't apply to non-atomic inlines (transforms, containment).RELAYOUT, which recomputes the flags, and a cache hit skipscompute_oof_layouttoo.Known imprecision
Claims are per inline root, not per box:
fixedbox is trapped at the root if any span in the root with an inline box below it has a filter.Roots with no such span behave exactly as before.
Verification
box-shadow/slice-inline-fragmentation-*tests newly fail because they need span fragment geometry.mainon saved real pages (one fullresolve_layout()with all layout caches cleared, release build, pinned core): Wikipedia "Barack Obama" 19.26 ms -> 19.41 ms (+0.7%, from the ancestor walk); BBC News 5.11 ms -> 5.09 ms (within noise).Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/058ee880f4b3405ba452dbd2fb6b2284
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/058ee880f4b3405ba452dbd2fb6b2284?variant=devin-insiders
Requested by: @nicoburns
WPT results
Subtests: 4 newly passing, 3 newly failing (net +1).
Subtest changes by area (6 areas)
Full diff (7 changed tests)
Generated by the WPT workflow.