Make float slot search height-aware (boxes must avoid floats over their full height) - #1066
Draft
nicoburns wants to merge 3 commits into
Draft
Make float slot search height-aware (boxes must avoid floats over their full height)#1066nicoburns wants to merge 3 commits into
nicoburns wants to merge 3 commits into
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:
|
This was referenced Aug 7, 2026
devin-ai-integration
Bot
force-pushed
the
devin/1786127796-float-height-aware
branch
from
August 7, 2026 20:24
658a159 to
06f10a4
Compare
nicoburns
force-pushed
the
devin/1786127796-float-height-aware
branch
from
August 7, 2026 20:27
06f10a4 to
4fad2f3
Compare
nicoburns
force-pushed
the
devin/1786127796-float-height-aware
branch
from
August 7, 2026 20:30
4fad2f3 to
caac94e
Compare
devin-ai-integration
Bot
force-pushed
the
devin/1786127796-float-height-aware
branch
from
August 13, 2026 21:10
caac94e to
ced00d1
Compare
devin-ai-integration
Bot
force-pushed
the
devin/1786127796-float-height-aware
branch
from
August 18, 2026 21:15
69e04d8 to
5a288a1
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
Part 3/5 of the float placement fixes split from #1063 (stacked on #1065).
A box establishing a BFC must not overlap floats over its entire vertical extent, and a line box is shortened by any float its extent intersects — the slot search previously only considered the float insets of the starting segment.
FloatContext::find_content_slotandfind_bfc_slot(and theBlockContextwrappers) take a newheightparameter and union float insets across all segments that[y, y + height)crosses.ContentSlot::heightnow reports the extent over which the slot's width remains valid.compute_block_layoutestimates BFC-establishing children's height up-front from their style, then re-runs the slot search with the actual height after layout (re-laying the child out, up to 4 iterations, if the slot changes).min_y, so content can't be placed higher than existing floats.Fixes WPT
css/CSS2/floats/floats-wrap-top-below-bfc-*(6 tests) and, with the companion Blitz inline changes (DioxusLabs/blitz#628),floats-wrap-top-below-inline-*(6 tests). Regression test added intests/hand_written/floats.rs.Context
Stack (bottom-up): rules 3&7 overflow (#1064) → margin collapse (#1065) → this PR → zero-height floats → float snapshot API. Together they supersede #1063 (closed). Latest WPT verification after rebasing onto v0.13-era main: blitz
css/CSS2/floats+floats-clear= 247 PASS / 90 FAIL / 0 CRASH of 337 with the stack + DioxusLabs/blitz#628, vs 227 PASS / 110 FAIL on current blitz main (20 newly passing, 0 regressions).Link to Devin session: https://app.devin.ai/sessions/2aa49a15ca484966b5b71922bfd2bb58
Requested by: @nicoburns