mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibWeb: Switch to using AK::is and AK::downcast
This commit is contained in:
@@ -128,10 +128,10 @@ GUI::Variant DOMTreeModel::data(const GUI::ModelIndex& index, Role role) const
|
||||
}
|
||||
if (role == Role::Display) {
|
||||
if (node.is_text())
|
||||
return String::format("%s", with_whitespace_collapsed(to<Text>(node).data()).characters());
|
||||
return String::format("%s", with_whitespace_collapsed(downcast<Text>(node).data()).characters());
|
||||
if (!node.is_element())
|
||||
return node.node_name();
|
||||
auto& element = to<Element>(node);
|
||||
auto& element = downcast<Element>(node);
|
||||
StringBuilder builder;
|
||||
builder.append('<');
|
||||
builder.append(element.local_name());
|
||||
|
||||
Reference in New Issue
Block a user