mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
LibWeb: Rename "for_each_in_subtree(_of_type)" to "for_each_in_inclusive_subtree(_of_type)"
This is because it includes the initial node that the function was called on, which makes it "inclusive" as according to the spec. This is important as there are non-inclusive variants, particularly used in the node mutation algorithms.
This commit is contained in:
parent
f482628fe5
commit
ca71ac484b
12 changed files with 29 additions and 29 deletions
|
@ -48,7 +48,7 @@ void InitialContainingBlockBox::build_stacking_context_tree()
|
|||
|
||||
set_stacking_context(make<StackingContext>(*this, nullptr));
|
||||
|
||||
for_each_in_subtree_of_type<Box>([&](Box& box) {
|
||||
for_each_in_inclusive_subtree_of_type<Box>([&](Box& box) {
|
||||
if (&box == this)
|
||||
return IterationDecision::Continue;
|
||||
if (!box.establishes_stacking_context()) {
|
||||
|
@ -101,7 +101,7 @@ void InitialContainingBlockBox::recompute_selection_states()
|
|||
|
||||
auto selection = this->selection().normalized();
|
||||
|
||||
for_each_in_subtree([&](auto& layout_node) {
|
||||
for_each_in_inclusive_subtree([&](auto& layout_node) {
|
||||
if (!selection.is_valid()) {
|
||||
// Everything gets SelectionState::None.
|
||||
} else if (&layout_node == selection.start().layout_node && &layout_node == selection.end().layout_node) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue