mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibWeb: Use FlyString for Element tag names
This makes selector matching a lot more efficient, and also reduces the number of strings on the heap.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/FlyString.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibWeb/DOM/CharacterData.h>
|
||||
|
||||
@@ -36,7 +37,7 @@ public:
|
||||
explicit Text(Document&, const String&);
|
||||
virtual ~Text() override;
|
||||
|
||||
virtual String tag_name() const override { return "#text"; }
|
||||
virtual FlyString tag_name() const override { return "#text"; }
|
||||
|
||||
private:
|
||||
virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override;
|
||||
|
||||
Reference in New Issue
Block a user