mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00: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
@@ -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