Block: clamp and synthesize scroll-container baselines - #1126
Merged
nicoburns merged 2 commits intoAug 19, 2026
Conversation
🤖 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:
|
nicoburns
enabled auto-merge (squash)
August 18, 2026 23:59
staging-devin-ai-integration
Bot
force-pushed
the
devin/1787096047-block-scroll-container-baseline
branch
from
August 19, 2026 00:00
654454f to
e84ffd0
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.
Objective
Give block layout the same scroll-container baseline treatment as flexbox/grid, per the CSSWG resolution in w3c/csswg-drafts#7660: a scroll container's baseline is determined from its content as if scrolled to the initial position but clamped to its border box, and when it has no natural baseline, one is synthesized at its border-box bottom edge.
In
perform_final_layout_on_in_flow_children, for each in-flow child that is a scroll container (overflow.y.is_scroll_container()):Fixes WPT
css/CSS2/linebox/baseline-block-with-overflow-001.htmlin Blitz: previously (a) the baseline of clipped text inside a blockoverflow: hiddenchild leaked out and the outer inline-block aligned to it, and (b) an emptyoverflow: hiddenchild contributed no baseline where browsers synthesize one at its bottom border edge.Context
clamp_to_border_box/.unwrap_or(size.height)insrc/compute/flexbox.rs) and grid behaviour.test_fixtures/blockflex/blockflex_baseline_overflow_hidden_clamp.htmlcovers the clamping case (a block scroll-container child with taller content, baseline-aligned in a flex container).tests/hand_written/baseline.rscover baseline synthesis for a scroll-container child with no natural baseline, clamping, and that a non-scroll-container child without a baseline still contributes nothing. Chrome does not propagate the synthesized empty-scroll-container baseline in flexbox first-baseline contexts (it does in inline-block contexts, which taffy doesn't model), so the synthesis case cannot be expressed as a gentest.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/e9fbc6900f2c469d84ca90d71a628d7b
Requested by: @nicoburns