mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +00:00
LibWeb: Use GC::Ref<Node> in Range for start/end containers
Let's propagate the GC'ness of it all to the users of Range.
This commit is contained in:
committed by
Andreas Kling
parent
bf724ba2f6
commit
c87960f8f3
@@ -2173,7 +2173,7 @@ static String visible_text_in_range(DOM::Range const& range)
|
||||
if (is<DOM::Text>(*range.start_container()) && range.start_container()->layout_node())
|
||||
builder.append(static_cast<DOM::Text const&>(*range.start_container()).data().bytes_as_string_view().substring_view(range.start_offset()));
|
||||
|
||||
for (DOM::Node const* node = range.start_container(); node != range.end_container()->next_sibling(); node = node->next_in_pre_order()) {
|
||||
for (GC::Ptr<DOM::Node> node = range.start_container(); node != range.end_container()->next_sibling(); node = node->next_in_pre_order()) {
|
||||
if (is<DOM::Text>(*node) && range.contains_node(*node) && node->layout_node())
|
||||
builder.append(static_cast<DOM::Text const&>(*node).data());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user