Skip to content

LibWeb: Include strut descent below inline-block baselines - #11150

Merged
awesomekling merged 1 commit into
LadybirdBrowser:masterfrom
awesomekling:mushthing
Aug 16, 2026
Merged

LibWeb: Include strut descent below inline-block baselines#11150
awesomekling merged 1 commit into
LadybirdBrowser:masterfrom
awesomekling:mushthing

Conversation

@awesomekling

Copy link
Copy Markdown
Member

Keep the containing block strut descent below a baseline-aligned inline-block when that box raises the line baseline. This preserves the minimum depth required by line-height and advances wrapped lines from the corrected line-box end.

Add deterministic coverage for empty and text-bearing inline-blocks, wrapped content, and the overflow baseline fallback. Rebaseline affected layout and screenshot expectations.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • Tests/LibWeb/Screenshot/expected/color-scheme.png is excluded by !**/*.png

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a119b924-42c9-40a4-8b8d-34d84f09ca7b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0fb8ea25-5265-404b-9ba9-4f3273c3035d

📥 Commits

Reviewing files that changed from the base of the PR and between 9422579 and c0b7a73.

⛔ Files ignored due to path filters (6)
  • Tests/LibWeb/Screenshot/expected-macos/color-scheme.png is excluded by !**/*.png
  • Tests/LibWeb/Screenshot/expected/border-radius.png is excluded by !**/*.png
  • Tests/LibWeb/Screenshot/expected/clip-path-basic-shapes.png is excluded by !**/*.png
  • Tests/LibWeb/Screenshot/expected/clip-path-transformed.png is excluded by !**/*.png
  • Tests/LibWeb/Screenshot/expected/video-object-fit.png is excluded by !**/*.png
  • Tests/LibWeb/Screenshot/expected/video-on-canvas.png is excluded by !**/*.png
📒 Files selected for processing (49)
  • Libraries/LibWeb/Rust/src/layout/line_builder.rs
  • Tests/LibWeb/Layout/expected/bfc-root-auto-height-uses-child-run-result-inline-block-float-past-bottom.txt
  • Tests/LibWeb/Layout/expected/bfc-root-auto-height-uses-child-run-result-inline-block-margin-below-last-child.txt
  • Tests/LibWeb/Layout/expected/block-and-inline/button-image-only.txt
  • Tests/LibWeb/Layout/expected/block-and-inline/button-with-abspos-pseudo-element.txt
  • Tests/LibWeb/Layout/expected/block-and-inline/columns-33-percent-width.txt
  • Tests/LibWeb/Layout/expected/block-and-inline/float-with-inline-contents-hoisted.txt
  • Tests/LibWeb/Layout/expected/block-and-inline/inline-block-with-negative-margin-left.txt
  • Tests/LibWeb/Layout/expected/block-and-inline/inline-block-with-negative-margin-right.txt
  • Tests/LibWeb/Layout/expected/block-and-inline/inline-box-with-vertical-margins.txt
  • Tests/LibWeb/Layout/expected/block-and-inline/join-out-of-flow-box-with-previous-sibling-if-wrapped-in-anonymous-box.txt
  • Tests/LibWeb/Layout/expected/css-appearance-none.txt
  • Tests/LibWeb/Layout/expected/empty-editable-shows-cursor.txt
  • Tests/LibWeb/Layout/expected/flex/flex-item-with-percentage-width-in-flex-container-with-definite-max-width.txt
  • Tests/LibWeb/Layout/expected/flex/table-flex-item-stretch.txt
  • Tests/LibWeb/Layout/expected/form-control-baseline-alignment.txt
  • Tests/LibWeb/Layout/expected/grid/table-wrapper-sizing-matrix.txt
  • Tests/LibWeb/Layout/expected/grid/table-wrapper-stretch-auto-width.txt
  • Tests/LibWeb/Layout/expected/hide-audio-based-on-controls.txt
  • Tests/LibWeb/Layout/expected/html-dimensions.txt
  • Tests/LibWeb/Layout/expected/input-element-with-display-inline.txt
  • Tests/LibWeb/Layout/expected/input-file.txt
  • Tests/LibWeb/Layout/expected/input-image-to-text.txt
  • Tests/LibWeb/Layout/expected/input-image.txt
  • Tests/LibWeb/Layout/expected/input-number-placeholder.txt
  • Tests/LibWeb/Layout/expected/input-password-to-text.txt
  • Tests/LibWeb/Layout/expected/input-placeholder.txt
  • Tests/LibWeb/Layout/expected/input-text-node-invalidation-on-value-change.txt
  • Tests/LibWeb/Layout/expected/input-text-to-image.txt
  • Tests/LibWeb/Layout/expected/input-text-to-password.txt
  • Tests/LibWeb/Layout/expected/input-time.txt
  • Tests/LibWeb/Layout/expected/layout-tree-update/maintain-single-backdrop-pseudo-element.txt
  • Tests/LibWeb/Layout/expected/number-input-appearance.txt
  • Tests/LibWeb/Layout/expected/pseudo-element-with-custom-properties-2.txt
  • Tests/LibWeb/Layout/expected/quirks/input-in-pre-quirks-mode.txt
  • Tests/LibWeb/Layout/expected/tab-size-spacing-001.txt
  • Tests/LibWeb/Layout/expected/textarea-box-writing-modes.txt
  • Tests/LibWeb/Layout/expected/textarea-height-stretch.txt
  • Tests/LibWeb/Layout/expected/textarea-placeholder-with-text-align.txt
  • Tests/LibWeb/Layout/expected/textarea-reset.txt
  • Tests/LibWeb/Layout/expected/unicode-password-input.txt
  • Tests/LibWeb/Layout/expected/video-controls-default-object-size.txt
  • Tests/LibWeb/Ref/expected/inline-flex-baseline-affects-flex-line-height-ref.html
  • Tests/LibWeb/Text/expected/abspos-replaced-auto-insets-static-position.txt
  • Tests/LibWeb/Text/expected/display_list/page-focus-rendering.txt
  • Tests/LibWeb/Text/expected/display_list/patterned-border-on-a-short-side.txt
  • Tests/LibWeb/Text/expected/geometry/inline-block-strut-descent.txt
  • Tests/LibWeb/Text/expected/layout-run-cache-inline-damage.txt
  • Tests/LibWeb/Text/input/geometry/inline-block-strut-descent.html

Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The change extends line-box strut alignment to inline-blocks and inline flex containers for vertical-align keywords. It adds inline-block strut descent geometry coverage. It updates layout, paint-tree, stacking-context, display-list, reference, and cache expectations for the resulting fractional heights and positions.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description directly matches the inline layout change, added geometry coverage, and updated expectations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Keep the containing block strut descent below a baseline-aligned
inline-block when that box raises the line baseline. This preserves the
minimum depth required by line-height and advances wrapped lines from
the corrected line-box end.

Add deterministic coverage for empty and text-bearing inline-blocks,
wrapped content, and the overflow baseline fallback. Rebaseline affected
layout and screenshot expectations.
@awesomekling
awesomekling merged commit 56d551d into LadybirdBrowser:master Aug 16, 2026
13 of 15 checks passed
@awesomekling
awesomekling deleted the mushthing branch August 16, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant