Skip to content

LibWeb: Tolerate stale layout when text control sizing changes - #11132

Merged
tcl3 merged 1 commit into
LadybirdBrowser:masterfrom
tcl3:libweb_text_control_stale_layout
Aug 17, 2026
Merged

LibWeb: Tolerate stale layout when text control sizing changes#11132
tcl3 merged 1 commit into
LadybirdBrowser:masterfrom
tcl3:libweb_text_control_stale_layout

Conversation

@tcl3

@tcl3 tcl3 commented Aug 14, 2026

Copy link
Copy Markdown
Member

Attribute change steps may run while layout is dirty. These handlers fetched their layout node through the checked accessor, which asserts that layout is up to date. Use the node-level helper instead, which tolerates a stale layout node.

Fixes a regression introduced in #11105

Found with domato, where this crash was present in 56 / 1000 cases.

Attribute change steps may run while layout is dirty. These handlers
fetched their layout node through the checked accessor, which asserts
that layout is up to date. Use the node-level helper instead, which
tolerates a stale layout node.
@coderabbitai

coderabbitai Bot commented Aug 14, 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: d491e0ea-bb8a-4386-af6e-219b4d40b72f

📥 Commits

Reviewing files that changed from the base of the PR and between 5ddcff8 and 7bbd966.

📒 Files selected for processing (4)
  • Libraries/LibWeb/HTML/HTMLInputElement.cpp
  • Libraries/LibWeb/HTML/HTMLTextAreaElement.cpp
  • Tests/LibWeb/Crash/Layout/input-size-attribute-with-stale-layout.html
  • Tests/LibWeb/Crash/Layout/textarea-cols-attribute-with-stale-layout.html

📝 Walkthrough

Walkthrough

Input size changes and textarea rows or cols changes now request layout updates through their owning elements. The previous conditional layout-node lookups were removed. Two regression tests cover attribute changes after layout reads and DOM mutations that can leave layout state stale.

Possibly related PRs

Suggested reviewers: awesomekling, kalenikaliaksandr

Merge Risk: ⚪ Minimal · up to 7bbd9

This localized change makes text-control attribute handling tolerate stale layout state and adds regression coverage; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description accurately explains the stale-layout crash fix and matches the changes to input and textarea attribute handlers.
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.

@tcl3
tcl3 merged commit 6016a49 into LadybirdBrowser:master Aug 17, 2026
21 of 22 checks passed
@tcl3
tcl3 deleted the libweb_text_control_stale_layout branch August 17, 2026 12:12
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