1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:37:34 +00:00

LibWeb: Support implicit <label> targets

We already supported "<input id=id><label for=id>".
This patch implements the other labeling mode, where the first labelable
descendant of the <label> element becomes the labeled control.
This commit is contained in:
Andreas Kling 2022-02-15 18:37:33 +01:00
parent 1a323ec8d4
commit f318045a8f
2 changed files with 28 additions and 19 deletions

View file

@ -30,7 +30,7 @@ private:
virtual bool is_label() const override { return true; }
static Label* label_for_control_node(LabelableNode&);
LabelableNode* control_node();
LabelableNode* labeled_control();
bool m_tracking_mouse { false };
};