mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02: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:
Notes:
sideshowbarker
2024-07-19 05:51:40 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/21498202608
@@ -37,9 +37,9 @@ public:
|
||||
|
||||
virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override;
|
||||
|
||||
String type() const { return attribute("type"); }
|
||||
String value() const { return attribute("value"); }
|
||||
String name() const { return attribute("name"); }
|
||||
String type() const { return attribute(HTML::AttributeNames::type); }
|
||||
String value() const { return attribute(HTML::AttributeNames::value); }
|
||||
String name() const { return attribute(HTML::AttributeNames::name); }
|
||||
};
|
||||
|
||||
template<>
|
||||
|
||||
Reference in New Issue
Block a user