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:
Andreas Kling 2020-06-03 20:51:28 +02:00
commit 2149820260
Notes: sideshowbarker 2024-07-19 05:51:40 +09:00
16 changed files with 71 additions and 43 deletions

View file

@ -40,9 +40,9 @@ public:
virtual void inserted_into(Node&) override;
String rel() const { return attribute("rel"); }
String type() const { return attribute("type"); }
String href() const { return attribute("href"); }
String rel() const { return attribute(HTML::AttributeNames::rel); }
String type() const { return attribute(HTML::AttributeNames::type); }
String href() const { return attribute(HTML::AttributeNames::href); }
private:
// ^ResourceClient