mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 10:01:13 +09:00
LibWeb: Add support for select options disabled state
This commit is contained in:
parent
4408581ee0
commit
1475c1810f
Notes:
sideshowbarker
2024-07-17 03:45:48 +09:00
Author: https://github.com/bplaat
Commit: 1475c1810f
Pull-request: https://github.com/SerenityOS/serenity/pull/23511
Reviewed-by: https://github.com/trflynn89
7 changed files with 10 additions and 8 deletions
|
@ -290,7 +290,7 @@ void HTMLSelectElement::activation_behavior(DOM::Event const&)
|
|||
for (auto const& child : opt_group_element.children_as_vector()) {
|
||||
if (is<HTMLOptionElement>(*child)) {
|
||||
auto& option_element = verify_cast<HTMLOptionElement>(*child);
|
||||
option_group_items.append(SelectItemOption { id_counter++, strip_newlines(option_element.text_content()), option_element.value(), option_element.selected(), option_element });
|
||||
option_group_items.append(SelectItemOption { id_counter++, strip_newlines(option_element.text_content()), option_element.value(), option_element.selected(), option_element.disabled(), option_element });
|
||||
}
|
||||
}
|
||||
m_select_items.append(SelectItemOptionGroup { opt_group_element.get_attribute(AttributeNames::label).value_or(String {}), option_group_items });
|
||||
|
@ -298,7 +298,7 @@ void HTMLSelectElement::activation_behavior(DOM::Event const&)
|
|||
|
||||
if (is<HTMLOptionElement>(*child)) {
|
||||
auto& option_element = verify_cast<HTMLOptionElement>(*child);
|
||||
m_select_items.append(SelectItemOption { id_counter++, strip_newlines(option_element.text_content()), option_element.value(), option_element.selected(), option_element });
|
||||
m_select_items.append(SelectItemOption { id_counter++, strip_newlines(option_element.text_content()), option_element.value(), option_element.selected(), option_element.disabled(), option_element });
|
||||
}
|
||||
|
||||
if (is<HTMLHRElement>(*child))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue