mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 17:15:26 +00:00
LibWeb: Implement selectedness algorithm
Implement selectedness setting algorithm in HTMLSelectElement
This commit is contained in:
committed by
Sam Atkins
parent
9cbb3fac12
commit
f4102b1dc9
@@ -57,11 +57,16 @@ void HTMLOptionElement::attribute_changed(FlyString const& name, Optional<String
|
||||
void HTMLOptionElement::set_selected(bool selected)
|
||||
{
|
||||
// On setting, it must set the element's selectedness to the new value, set its dirtiness to true, and then cause the element to ask for a reset.
|
||||
m_selected = selected;
|
||||
set_selected_internal(selected);
|
||||
m_dirty = true;
|
||||
ask_for_a_reset();
|
||||
}
|
||||
|
||||
void HTMLOptionElement::set_selected_internal(bool selected)
|
||||
{
|
||||
m_selected = selected;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#dom-option-value
|
||||
String HTMLOptionElement::value() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user