mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
LibWeb: Use TraversalDecision for multi level Node traversal methods
This adds the `SkipChildrenAndContinue` option, where traversal continues but child nodes are not included.
This commit is contained in:
committed by
Andrew Kaster
parent
c57d395a48
commit
398bf10b92
Notes:
sideshowbarker
2024-07-17 08:59:18 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/398bf10b92 Pull-request: https://github.com/SerenityOS/serenity/pull/24207 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/shannonbooth ✅
@@ -1398,7 +1398,7 @@ void HTMLInputElement::set_checked_within_group()
|
||||
document().for_each_in_inclusive_subtree_of_type<HTML::HTMLInputElement>([&](auto& element) {
|
||||
if (element.checked() && &element != this && is_in_same_radio_button_group(*this, element))
|
||||
element.set_checked(false, ChangeSource::User);
|
||||
return IterationDecision::Continue;
|
||||
return TraversalDecision::Continue;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1425,9 +1425,9 @@ void HTMLInputElement::legacy_pre_activation_behavior()
|
||||
document().for_each_in_inclusive_subtree_of_type<HTML::HTMLInputElement>([&](auto& element) {
|
||||
if (element.checked() && is_in_same_radio_button_group(*this, element)) {
|
||||
m_legacy_pre_activation_behavior_checked_element_in_group = &element;
|
||||
return IterationDecision::Break;
|
||||
return TraversalDecision::Break;
|
||||
}
|
||||
return IterationDecision::Continue;
|
||||
return TraversalDecision::Continue;
|
||||
});
|
||||
|
||||
set_checked_within_group();
|
||||
|
||||
Reference in New Issue
Block a user