LibWeb: Remember last focus trigger in Document

We will need this to implement focus indication.
This commit is contained in:
Jelle Raaijmakers 2025-06-13 14:10:30 +02:00 committed by Alexander Kalenik
commit 7016921067
Notes: github-actions[bot] 2025-06-13 15:40:30 +00:00
5 changed files with 20 additions and 4 deletions

View file

@ -12,7 +12,14 @@
namespace Web::HTML {
void run_focusing_steps(DOM::Node* new_focus_target, DOM::Node* fallback_target = nullptr, Optional<ByteString> focus_trigger = {});
enum class FocusTrigger : u8 {
Click,
Key,
Script,
Other,
};
void run_focusing_steps(DOM::Node* new_focus_target, DOM::Node* fallback_target = nullptr, FocusTrigger focus_trigger = FocusTrigger::Other);
void run_unfocusing_steps(DOM::Node* old_focus_target);
}