|
@@ -154,8 +154,8 @@ void FlexFormattingContext::generate_anonymous_flex_items()
|
|
|
// Skip anonymous text runs that are only whitespace.
|
|
|
if (child_box.is_anonymous() && !child_box.first_child_of_type<BlockContainer>()) {
|
|
|
bool contains_only_white_space = true;
|
|
|
- child_box.for_each_in_inclusive_subtree_of_type<TextNode>([&contains_only_white_space](auto& text_node) {
|
|
|
- if (!text_node.dom_node().data().is_whitespace()) {
|
|
|
+ child_box.for_each_in_subtree([&](auto const& node) {
|
|
|
+ if (!is<TextNode>(node) || !static_cast<TextNode const&>(node).dom_node().data().is_whitespace()) {
|
|
|
contains_only_white_space = false;
|
|
|
return IterationDecision::Break;
|
|
|
}
|