diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-03 20:51:28 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-03 21:53:00 +0200 |
commit | 214982026080f411ea38e1dbb1a51186d10362fe (patch) | |
tree | e085f127f47bc49a751b03efa66b1907a37889cf /Libraries/LibWeb/Dump.cpp | |
parent | ff55d00261adc0add19e910b33896eacd33b0ec2 (diff) | |
download | serenity-214982026080f411ea38e1dbb1a51186d10362fe.zip |
LibWeb: Use HTML::AttributeNames::foo instead of FlyString("foo")
To avoid the costly instantiation of FlyStrings whenever we're looking
up attributes, use the premade HTML::AttributeNames globals. :^)
Diffstat (limited to 'Libraries/LibWeb/Dump.cpp')
-rw-r--r-- | Libraries/LibWeb/Dump.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Dump.cpp b/Libraries/LibWeb/Dump.cpp index 42cd88fb33..c6173c1696 100644 --- a/Libraries/LibWeb/Dump.cpp +++ b/Libraries/LibWeb/Dump.cpp @@ -93,7 +93,7 @@ void dump_tree(const LayoutNode& layout_node) String identifier = ""; if (layout_node.node() && is<Element>(*layout_node.node())) { - auto id = to<Element>(*layout_node.node()).attribute("id"); + auto id = to<Element>(*layout_node.node()).attribute(HTML::AttributeNames::id); if (!id.is_empty()) { StringBuilder builder; builder.append('#'); |