Fix static position of block-level abspos elements in inline layout - #608
Merged
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:
|
devin-ai-integration
Bot
force-pushed
the
devin/1785858220-abspos-static-position
branch
from
August 4, 2026 16:31
f326b11 to
46d08af
Compare
nicoburns
marked this pull request as ready for review
August 4, 2026 16:40
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
Follow-up to #607 (split into two PRs per review; the companion iframe/embed/video dimension-attribute fix is a separate PR).
layout_abspos_childin inline layout used the inline box's line position (ibox.x/ibox.y) as the static position for every abspos element with auto insets. That's only correct for elements whose hypothetical box is inline-level. Adiv { position: absolute }sibling of an inline replaced element was being placed beside it on the line instead of at the containing block's content-box left edge. The call site now checksoriginal_display.outside() == DisplayOutside::Inline(the display before abspos blockification) and passes an explicit static position:The RTL inline static-position adjustment also only applies when the box is inline-level.
WPT results
Newly passing vs main (no regressions in css-flexbox, css/CSS2/normal-flow, css/CSS2/positioning):
css/CSS2/normal-flow/inline-replaced-height-004/007.xhtcss/CSS2/normal-flow/inline-block-replaced-height-004/007.xhtThe
*-005variants andabsolute-replaced-height-*tests additionally need the percentage dimension attribute mapping from the companion PR.Link to Devin session: https://app.devin.ai/sessions/0f8547b7fbb949e28e9acdbedb1ca8d2
Requested by: @nicoburns
WPT results
5 newly passing, 1 newly failing (net +4).
Full diff (6 changed tests)
Generated by the WPT workflow.