Gate baseline export where CSS forbids it (scroll containers, contain:layout, vertical-align) - #684
Open
nicoburns wants to merge 3 commits into
Open
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
staging-devin-ai-integration
Bot
force-pushed
the
devin/1786131935-parley-git-dep
branch
from
August 18, 2026 21:18
262905f to
7d1d6b1
Compare
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
Fixes part of the baseline-export regression group on #627 (Group A). The parley baseline wiring passed Taffy's
first_baselines.ythrough toInlineBox::baselineunconditionally, but CSS requires several classes of atomic inline to synthesize their baseline from the bottom margin edge (baseline: Nonein parley 0.11) instead of exporting their content's baseline.Three gates:
compute_child_layout_internal(mod.rs) — split into a wrapper +compute_child_layout_dispatchso it covers every layout path (including tables/form controls), and suppressfirst_baselineswhen:Display::FlowRoot+ non-visible/clip overflow) — CSS2 §10.8.1; flex/grid containers keep exporting their content baseline even when scrollable (perbaseline-of-scrollable-1a), orcontain: layout(css-contain baseline suppression).inline box update (inline.rs) — parley has no per-box
vertical-align; it always anchors a box's baseline (or bottom edge if unset) to the line baseline. For alignments this cannot approximate (middle,text-bottom,sub, non-zero shifts, …) the baseline is left unset so the box aligns by its bottom edge.vertical-align: topkeeps exporting: its baseline-anchored rendering coincides with WPT reference emulations (* { vertical-align: top }+margin-top), and gating it regressed 4 flexbox vert tests. Also clampsibox.baselineto ≥0 to match the non-negative reserved line space when negativemargin-topis present (fixesflexbox_inline.html).inline container output (inline.rs) — an inline root whose first line has no glyph runs (e.g. only a lone image) no longer exports a
0.0"baseline"; per CSS a box with no in-flow line boxes synthesizes from the bottom margin edge (fixes theobject-view-box-*tests).WPT results (css/CSS2, css-align, css-flexbox, css-grid, css-contain, css-images)
Remaining 9 Group A failures are not fixable in blitz integration code:
baseline-of-scrollable-1b,baseline-block-with-overflow-001: need consumer-dependent suppression of a scrollable block child's baseline during block-layout baseline propagation — a Taffy-side question (Taffy's block algorithm forwards the child baseline; blitz can't see the consumer).grid-baseline-001/002,grid-inline-baseline,grid-inline-items-002,flexbox-baseline-multi-line-horiz-004: Taffy flex/grid baseline synthesis/alignment (e.g. grid's first-row baseline fallback incompute/grid/mod.rs), not blitz wiring.percentage-size-subitems-001(×2 flex/grid variants),scrollbar-gutter-001/002,floats-141.xht: need realvertical-alignsupport in parley (the refs rely onvertical-align: top/line-height details); gating them here regressed previously-passing tests.cargo check --workspace,cargo fmt,cargo clippyare clean.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/331985c4732e4248a71184626d9c4a38
Requested by: @nicoburns
WPT results
37 newly passing, 81 newly failing (net -44).
Full diff (118 changed tests)
Generated by the WPT workflow.