mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Make Element::tag_name() return a const FlyString&
The more generic virtual variant is renamed to node_name() and now only Element has tag_name(). This removes a huge amount of String ctor/dtor churn in selector matching.
This commit is contained in:
parent
ea1ebe8662
commit
6242e029ed
Notes:
sideshowbarker
2024-07-19 05:37:02 +09:00
Author: https://github.com/awesomekling
Commit: 6242e029ed
12 changed files with 13 additions and 12 deletions
|
@ -45,7 +45,8 @@ public:
|
|||
Element(Document&, const FlyString& tag_name);
|
||||
virtual ~Element() override;
|
||||
|
||||
virtual FlyString tag_name() const final { return m_tag_name; }
|
||||
virtual FlyString node_name() const final { return m_tag_name; }
|
||||
const FlyString& tag_name() const { return m_tag_name; }
|
||||
|
||||
bool has_attribute(const FlyString& name) const { return !attribute(name).is_null(); }
|
||||
String attribute(const FlyString& name) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue