mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 21:48:11 +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
|
@ -47,8 +47,8 @@ public:
|
|||
|
||||
virtual void parse_attribute(const FlyString& name, const String& value) override;
|
||||
|
||||
String alt() const { return attribute("alt"); }
|
||||
String src() const { return attribute("src"); }
|
||||
String alt() const { return attribute(HTML::AttributeNames::alt); }
|
||||
String src() const { return attribute(HTML::AttributeNames::src); }
|
||||
int preferred_width() const;
|
||||
int preferred_height() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue