LibWeb: Implement autofocus candidate processing

This change implements the algorithms necessary to focus elements with
the autofocus attribute on page load.
This commit is contained in:
Tim Ledbetter
2026-04-21 18:17:38 +01:00
committed by Shannon Booth
parent baefb51902
commit e5d615cb11
Notes: github-actions[bot] 2026-04-21 21:48:16 +00:00
19 changed files with 345 additions and 4 deletions

View File

@@ -365,7 +365,12 @@ void EventLoop::update_the_rendering()
// FIXME: 6. For each doc of docs, reveal doc.
// FIXME: 7. For each doc of docs, flush autofocus candidates for doc if its node navigable is a top-level traversable.
// 7. For each doc of docs, flush autofocus candidates for doc if its node navigable is a top-level traversable.
for (auto& document : docs) {
auto navigable = document->navigable();
if (navigable && navigable->is_top_level_traversable())
document->flush_autofocus_candidates();
}
// 8. For each doc of docs, run the resize steps for doc. [CSSOMVIEW]
for (auto& document : docs) {