LibWeb: Separate the active element and the element being activated

We were conflating elements being the active element and elements being
activated. The :active pseudo class is supposed to be based on whether
an element will have its activation behavior run upon a button being
released.

Store whether an element is being activated as a flag that is set/reset
by EventHandler.

Doing this allows label elements to visually activate their control
without doing a weird paintable hack, so the Labelable classes have
been yeeted.
This commit is contained in:
Zaggy1024
2026-03-07 12:47:47 -06:00
committed by Gregory Bertilson
parent 2c2ad598a0
commit 44ed698d4f
Notes: github-actions[bot] 2026-03-17 09:04:00 +00:00
29 changed files with 166 additions and 272 deletions

View File

@@ -67,6 +67,7 @@ public:
virtual GC::Ptr<Layout::Node> create_layout_node(GC::Ref<CSS::ComputedProperties>) override;
virtual void adjust_computed_style(CSS::ComputedProperties&) override;
virtual void set_being_activated(bool) override;
enum class TypeAttributeState {
#define __ENUMERATE_HTML_INPUT_TYPE_ATTRIBUTE(_, state) state,