mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
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:
committed by
Shannon Booth
parent
baefb51902
commit
e5d615cb11
Notes:
github-actions[bot]
2026-04-21 21:48:16 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/e5d615cb11c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/9016 Reviewed-by: https://github.com/shannonbooth
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user