layout: Allow block-levels inside an inline directly, without wrapper#43586
Merged
Loirooriol merged 1 commit intoservo:mainfrom Mar 24, 2026
Merged
layout: Allow block-levels inside an inline directly, without wrapper#43586Loirooriol merged 1 commit intoservo:mainfrom
Loirooriol merged 1 commit intoservo:mainfrom
Conversation
|
🔨 Triggering try run (#23464064994) for Linux (WPT) |
e2cffdf to
8ec359b
Compare
|
Test results for linux-wpt from try job (#23464064994): Flaky unexpected result (37)
Stable unexpected results that are known to be intermittent (10)
|
|
✨ Try run (#23464064994) succeeded. |
When encountering a block-level inside an inline box, we would wrap it (together with other block-level siblings, if any) inside an anonymous block box. That was complicating the logic for no real benefit, so just get rid of these anonymous wrappers, and allow block-levels as direct children of inlines. This aligns Servo with WebKit, which did the same refactoring: https://commits.webkit.org/304357@main Blink still generates these wrappers, but its design doc acknowledges that "the anonymous box is not strictly required". Signed-off-by: Oriol Brufau <[email protected]>
8ec359b to
f8819b5
Compare
|
🔨 Triggering try run (#23492450291) for Linux (WPT) |
|
Test results for linux-wpt from try job (#23492450291): Flaky unexpected result (34)
Stable unexpected results that are known to be intermittent (15)
|
|
✨ Try run (#23492450291) succeeded. |
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.
When encountering a block-level inside an inline box, we would wrap it (together with other block-level siblings, if any) inside an anonymous block box.
That was complicating the logic for no real benefit, so just get rid of these anonymous wrappers, and allow block-levels as direct children of inlines.
This aligns Servo with WebKit, which did the same refactoring: https://commits.webkit.org/304357@main
Blink still generates these wrappers, but its design doc acknowledges that "the anonymous box is not strictly required".
Testing: No existing test fails. But note that, while minimal, this may have some observable implications. For example, as an accidental side-effect of #41492, Servo aligned with the CSSWG resolution in w3c/csswg-drafts#11462, but now we will revert to the previous behavior. I will address it in a follow-up, and add a test.
Fixes: #41636