mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 22:15:07 +00:00
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. :^)
This commit is contained in:
parent
ff55d00261
commit
2149820260
16 changed files with 71 additions and 43 deletions
|
@ -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('#');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue