Skip to content

LibWeb: Remove NodeWithStyleAndBoxModelMetrics - #11072

Merged
gmta merged 1 commit into
LadybirdBrowser:masterfrom
kalenikaliaksandr:libweb/remove-node-with-style-box-model-metrics
Aug 10, 2026
Merged

LibWeb: Remove NodeWithStyleAndBoxModelMetrics#11072
gmta merged 1 commit into
LadybirdBrowser:masterfrom
kalenikaliaksandr:libweb/remove-node-with-style-box-model-metrics

Conversation

@kalenikaliaksandr

Copy link
Copy Markdown
Member

NodeWithStyleAndBoxModelMetrics has no state or behavior. Inline-flow interruption detection now lives in Rust, so retaining the intermediate base class leaves redundant type predicates across layout and painting.

Make Box, InlineNode, and BreakNode inherit directly from NodeWithStyle. Retype paintables and fragmented-inline helpers with NodeWithStyle, and remove the obsolete C++ type predicate and Rust node kind. The numeric values of the remaining kinds stay unchanged across the FFI boundary.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

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: b9f769aa-ac2b-4c10-9443-9eaae5476a7d

📥 Commits

Reviewing files that changed from the base of the PR and between db22221 and cd98e65.

📒 Files selected for processing (1)
  • Libraries/LibWeb/Rust/src/layout/tree_builder.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • Libraries/LibWeb/Rust/src/layout/tree_builder.rs

📝 Walkthrough

Walkthrough

The change removes NodeWithStyleAndBoxModelMetrics from the LibWeb layout hierarchy. Box, BreakNode, and InlineNode now use NodeWithStyle. Node ancestor APIs and painting interfaces use the broader type. DOM caret handling and inset resolution use updated casts. Rust layout classification no longer references the removed node-kind variant.

Possibly related PRs

Suggested reviewers: gmta

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description directly matches the changes by removing NodeWithStyleAndBoxModelMetrics and retyping related layout and painting APIs.
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.

@gmta
gmta enabled auto-merge (rebase) August 10, 2026 09:59
NodeWithStyleAndBoxModelMetrics has no state or behavior. Inline-flow
interruption detection now lives in Rust, so retaining the intermediate
base class leaves redundant type predicates across layout and painting.

Make Box, InlineNode, and BreakNode inherit directly from NodeWithStyle.
Retype paintables and fragmented-inline helpers with NodeWithStyle, and
remove the obsolete C++ type predicate and Rust node kind. The numeric
values of the remaining kinds stay unchanged across the FFI boundary.
@kalenikaliaksandr
kalenikaliaksandr force-pushed the libweb/remove-node-with-style-box-model-metrics branch from db22221 to cd98e65 Compare August 10, 2026 10:03
@gmta
gmta merged commit 5c4882c into LadybirdBrowser:master Aug 10, 2026
15 checks passed
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.

2 participants