mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +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
|
@ -29,6 +29,7 @@
|
|||
#include <AK/FlyString.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibWeb/DOM/Attribute.h>
|
||||
#include <LibWeb/DOM/AttributeNames.h>
|
||||
#include <LibWeb/DOM/ParentNode.h>
|
||||
#include <LibWeb/Layout/LayoutNode.h>
|
||||
|
||||
|
@ -68,7 +69,7 @@ public:
|
|||
LayoutNodeWithStyle* layout_node() { return static_cast<LayoutNodeWithStyle*>(Node::layout_node()); }
|
||||
const LayoutNodeWithStyle* layout_node() const { return static_cast<const LayoutNodeWithStyle*>(Node::layout_node()); }
|
||||
|
||||
String name() const { return attribute("name"); }
|
||||
String name() const { return attribute(HTML::AttributeNames::name); }
|
||||
|
||||
const StyleProperties* resolved_style() const { return m_resolved_style.ptr(); }
|
||||
NonnullRefPtr<StyleProperties> computed_style();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue