LibWeb: Allow focusing individual (focusable) elements with Tab key

You can now cycle through focusable elements (currently only hyperlinks
are focusable) with the Tab key.

The focus outline is rendered in a new FocusOutline paint phase.
This commit is contained in:
Andreas Kling 2020-08-14 19:40:37 +02:00
commit 01022eb5d6
Notes: sideshowbarker 2024-07-19 03:38:16 +09:00
11 changed files with 92 additions and 2 deletions

View file

@ -295,4 +295,9 @@ String Element::inner_html() const
return builder.to_string();
}
bool Element::is_focused() const
{
return document().focused_element() == this;
}
}