mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 22:28:12 +00:00
LibWeb: Switch to using AK::is and AK::downcast
This commit is contained in:
parent
fe6474e692
commit
71556e39a4
73 changed files with 249 additions and 433 deletions
|
@ -50,7 +50,7 @@ static RefPtr<LayoutNode> create_layout_tree(Node& node, const StyleProperties*
|
|||
bool have_inline_children = false;
|
||||
bool have_noninline_children = false;
|
||||
|
||||
to<ParentNode>(node).for_each_child([&](Node& child) {
|
||||
downcast<ParentNode>(node).for_each_child([&](Node& child) {
|
||||
auto layout_child = create_layout_tree(child, &layout_node->specified_style());
|
||||
if (!layout_child)
|
||||
return;
|
||||
|
@ -63,7 +63,7 @@ static RefPtr<LayoutNode> create_layout_tree(Node& node, const StyleProperties*
|
|||
|
||||
for (auto& layout_child : layout_children) {
|
||||
if (have_noninline_children && have_inline_children && layout_child.is_inline()) {
|
||||
if (is<LayoutText>(layout_child) && to<LayoutText>(layout_child).text_for_style(*parent_style) == " ")
|
||||
if (is<LayoutText>(layout_child) && downcast<LayoutText>(layout_child).text_for_style(*parent_style) == " ")
|
||||
continue;
|
||||
layout_node->inline_wrapper().append_child(layout_child);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue