LibWeb: Switch to using AK::is and AK::downcast

This commit is contained in:
Andreas Kling 2020-07-26 17:16:18 +02:00
commit 71556e39a4
Notes: sideshowbarker 2024-07-19 04:36:12 +09:00
73 changed files with 249 additions and 433 deletions

View file

@ -271,17 +271,17 @@ String Element::inner_html() const
for (auto* child = node.first_child(); child; child = child->next_sibling()) {
if (child->is_element()) {
builder.append('<');
builder.append(to<Element>(*child).local_name());
builder.append(downcast<Element>(*child).local_name());
builder.append('>');
recurse(*child);
builder.append("</");
builder.append(to<Element>(*child).local_name());
builder.append(downcast<Element>(*child).local_name());
builder.append('>');
}
if (child->is_text()) {
builder.append(to<Text>(*child).data());
builder.append(downcast<Text>(*child).data());
}
}
};