mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
LibWeb: Make Element::tag_name() return a const FlyString&
The more generic virtual variant is renamed to node_name() and now only Element has tag_name(). This removes a huge amount of String ctor/dtor churn in selector matching.
This commit is contained in:
@@ -134,7 +134,7 @@ GUI::Variant LayoutTreeModel::data(const GUI::ModelIndex& index, Role role) cons
|
||||
if (node.is_anonymous()) {
|
||||
builder.append("[anonymous]");
|
||||
} else if (!node.node()->is_element()) {
|
||||
builder.append(node.node()->tag_name());
|
||||
builder.append(node.node()->node_name());
|
||||
} else {
|
||||
auto& element = to<Element>(*node.node());
|
||||
builder.append('<');
|
||||
|
||||
Reference in New Issue
Block a user