summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Layout
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-16 19:09:14 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-16 19:09:14 +0200
commit6242e029ede784af7230c17769b03f3d29268ac8 (patch)
tree682bad0031e2af600bfa0bb052e6a0776bbd63be /Libraries/LibWeb/Layout
parentea1ebe866299ef75376dc79c9406faa35c431d24 (diff)
downloadserenity-6242e029ede784af7230c17769b03f3d29268ac8.zip
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.
Diffstat (limited to 'Libraries/LibWeb/Layout')
-rw-r--r--Libraries/LibWeb/Layout/StackingContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Layout/StackingContext.cpp b/Libraries/LibWeb/Layout/StackingContext.cpp
index a95ff04dfa..2ca5cb3b68 100644
--- a/Libraries/LibWeb/Layout/StackingContext.cpp
+++ b/Libraries/LibWeb/Layout/StackingContext.cpp
@@ -65,7 +65,7 @@ void StackingContext::dump(int indent) const
{
for (int i = 0; i < indent; ++i)
dbgprintf(" ");
- dbgprintf("SC for %s{%s} %s [children: %zu]\n", m_box.class_name(), m_box.node() ? m_box.node()->tag_name().characters() : "(anonymous)", m_box.absolute_rect().to_string().characters(), m_children.size());
+ dbgprintf("SC for %s{%s} %s [children: %zu]\n", m_box.class_name(), m_box.node() ? m_box.node()->node_name().characters() : "(anonymous)", m_box.absolute_rect().to_string().characters(), m_children.size());
for (auto& child : m_children)
child->dump(indent + 1);
}