mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-19 00:31:52 +00:00
LibWeb: Implement selectedness algorithm
Implement selectedness setting algorithm in HTMLSelectElement
This commit is contained in:
parent
9cbb3fac12
commit
f4102b1dc9
Notes:
github-actions[bot]
2024-07-26 08:16:49 +00:00
Author: https://github.com/TSultanov
Commit: f4102b1dc9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/832
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 65 additions and 15 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue