LibWeb: Stub out an "open" state on <select> elements

The CSS Selectors-4 spec suggests that `:open` and `:closed` should
apply to `<select>` elements, so let's add a way of storing and
exposing that state. We don't yet actually generate any layout for
`<select>` elements, so they will always report that they are closed.
This commit is contained in:
Sam Atkins 2023-09-13 17:15:27 +01:00 committed by Andreas Kling
parent b1632c58bf
commit 29bb0f0ae6
Notes: sideshowbarker 2024-07-17 09:37:30 +09:00
2 changed files with 13 additions and 0 deletions

View file

@ -175,4 +175,13 @@ Optional<ARIA::Role> HTMLSelectElement::default_role() const
return ARIA::Role::combobox;
}
void HTMLSelectElement::set_is_open(bool open)
{
if (open == m_is_open)
return;
m_is_open = open;
invalidate_style();
}
}