mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 01:38:52 +00:00
LibWeb: Ensure that radio group is updated when radio is checked from JS
Fixes test 56 in Acid3. Farewell, radio eyes, you will be missed. :^(
This commit is contained in:
parent
436262ea3a
commit
57a85b1017
Notes:
sideshowbarker
2024-07-17 17:20:36 +09:00
Author: https://github.com/sin-ack
Commit: 57a85b1017
Pull-request: https://github.com/SerenityOS/serenity/pull/13052
Reviewed-by: https://github.com/Lubrsi
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/linusg ✅
Reviewed-by: https://github.com/trflynn89
3 changed files with 16 additions and 1 deletions
|
@ -70,6 +70,18 @@ void HTMLInputElement::set_checked(bool checked, ChangeSource change_source)
|
|||
set_needs_style_update(true);
|
||||
}
|
||||
|
||||
void HTMLInputElement::set_checked_binding(bool checked)
|
||||
{
|
||||
if (type() == "radio") {
|
||||
if (checked)
|
||||
set_checked_within_group();
|
||||
else
|
||||
set_checked(false, ChangeSource::Programmatic);
|
||||
} else {
|
||||
set_checked(checked, ChangeSource::Programmatic);
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/input.html#input-activation-behavior
|
||||
void HTMLInputElement::run_input_activation_behavior()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue