Repository navigation
Auto margins share an inset-modified containing block no smaller than zero - #2485
Merged
Merged
Conversation
… zero solve_axis (Exact patch 18) computed the free space for an absolutely positioned box's auto margins as area - start - end - size - margins even when the insets alone left less than nothing. CSS Position 3 (4.1) reduces the inset that gives way so the inset-modified containing block is zero, never negative, and Chrome follows it: a 50px box with top:0; bottom:130px; margin-top:auto in a 100px block sits at y=-50, not -80. The free space now starts from max(area - start - end, 0) (Exact patch 86); the offset still comes from the inset that holds.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
# Conflicts: # kernel/tests/it/browser_cases.rs # vendor/taffy/EXACT-PATCHES.md
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.
solve_axisin the vendored Taffy (vendor/taffy/src/compute/common/absolute.rs, Exact patch 18) computedfree = area - start - end - size - marginsfor an absolutely positioned box's auto margins, even when the insets alone leave less than nothing. CSS Position 3 §4.1 reduces the inset that gives way so the inset-modified containing block is zero, never negative, and Chrome follows it.top:0; bottom:130px; margin-top:autoauto, same insetstop:60px; bottom:60px),margin-top:automargin-left:autoon an RTL boxFix (Exact patch 86, with its EXACT-PATCHES.md entry):
free_space = (area - start - end).max(0.0) - size - margins. The offset still comes from the inset that holds, so only auto margins change.Test:
kernel/tests/it/browser_cases.rs::auto_margins_share_an_inset_modified_containing_block_no_smaller_than_zero(seven Chrome cases), failing without the fix.cargo test -p exact-kernel --liband--test itpass, fmt, clippy on taffy andscripts/caps.mjspass. Found with a differential layout fuzz against Chrome.