mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
LibWeb: Remember last focus trigger in Document
We will need this to implement focus indication.
This commit is contained in:
parent
e4586abc18
commit
7016921067
Notes:
github-actions[bot]
2025-06-13 15:40:30 +00:00
Author: https://github.com/gmta
Commit: 7016921067
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5074
5 changed files with 20 additions and 4 deletions
|
@ -30,6 +30,7 @@
|
|||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/CrossOrigin/OpenerPolicy.h>
|
||||
#include <LibWeb/HTML/DocumentReadyState.h>
|
||||
#include <LibWeb/HTML/Focus.h>
|
||||
#include <LibWeb/HTML/HTMLScriptElement.h>
|
||||
#include <LibWeb/HTML/History.h>
|
||||
#include <LibWeb/HTML/LazyLoadingElement.h>
|
||||
|
@ -433,6 +434,9 @@ public:
|
|||
|
||||
void set_focused_element(GC::Ptr<Element>);
|
||||
|
||||
HTML::FocusTrigger last_focus_trigger() const { return m_last_focus_trigger; }
|
||||
void set_last_focus_trigger(HTML::FocusTrigger trigger) { m_last_focus_trigger = trigger; }
|
||||
|
||||
Element const* active_element() const { return m_active_element.ptr(); }
|
||||
void set_active_element(GC::Ptr<Element>);
|
||||
|
||||
|
@ -1013,6 +1017,8 @@ private:
|
|||
bool m_editable { false };
|
||||
|
||||
GC::Ptr<Element> m_focused_element;
|
||||
HTML::FocusTrigger m_last_focus_trigger { HTML::FocusTrigger::Other };
|
||||
|
||||
GC::Ptr<Element> m_active_element;
|
||||
GC::Ptr<Element> m_target_element;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue