summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Libraries/LibWeb/CSS/Selector.h6
-rw-r--r--Libraries/LibWeb/DOM/Comment.h4
-rw-r--r--Libraries/LibWeb/DOM/Document.h3
-rw-r--r--Libraries/LibWeb/DOM/DocumentFragment.h3
-rw-r--r--Libraries/LibWeb/DOM/DocumentType.h3
-rw-r--r--Libraries/LibWeb/DOM/Element.cpp2
-rw-r--r--Libraries/LibWeb/DOM/Element.h6
-rw-r--r--Libraries/LibWeb/DOM/ElementFactory.cpp2
-rw-r--r--Libraries/LibWeb/DOM/ElementFactory.h2
-rw-r--r--Libraries/LibWeb/DOM/HTMLAnchorElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLAnchorElement.h4
-rw-r--r--Libraries/LibWeb/DOM/HTMLBRElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLBRElement.h4
-rw-r--r--Libraries/LibWeb/DOM/HTMLBlinkElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLBlinkElement.h2
-rw-r--r--Libraries/LibWeb/DOM/HTMLBodyElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLBodyElement.h4
-rw-r--r--Libraries/LibWeb/DOM/HTMLCanvasElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLCanvasElement.h4
-rw-r--r--Libraries/LibWeb/DOM/HTMLElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLElement.h2
-rw-r--r--Libraries/LibWeb/DOM/HTMLFontElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLFontElement.h2
-rw-r--r--Libraries/LibWeb/DOM/HTMLFormElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLFormElement.h4
-rw-r--r--Libraries/LibWeb/DOM/HTMLHRElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLHRElement.h2
-rw-r--r--Libraries/LibWeb/DOM/HTMLHeadElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLHeadElement.h4
-rw-r--r--Libraries/LibWeb/DOM/HTMLHeadingElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLHeadingElement.h2
-rw-r--r--Libraries/LibWeb/DOM/HTMLHtmlElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLHtmlElement.h4
-rw-r--r--Libraries/LibWeb/DOM/HTMLImageElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLImageElement.h2
-rw-r--r--Libraries/LibWeb/DOM/HTMLInputElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLInputElement.h4
-rw-r--r--Libraries/LibWeb/DOM/HTMLLinkElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLLinkElement.h4
-rw-r--r--Libraries/LibWeb/DOM/HTMLScriptElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLScriptElement.h2
-rw-r--r--Libraries/LibWeb/DOM/HTMLStyleElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLStyleElement.h2
-rw-r--r--Libraries/LibWeb/DOM/HTMLTitleElement.cpp2
-rw-r--r--Libraries/LibWeb/DOM/HTMLTitleElement.h4
-rw-r--r--Libraries/LibWeb/DOM/Node.h2
-rw-r--r--Libraries/LibWeb/DOM/Text.h3
-rw-r--r--Libraries/LibWeb/Dump.cpp2
48 files changed, 67 insertions, 63 deletions
diff --git a/Libraries/LibWeb/CSS/Selector.h b/Libraries/LibWeb/CSS/Selector.h
index 4abac988ff..19ad0ebf4c 100644
--- a/Libraries/LibWeb/CSS/Selector.h
+++ b/Libraries/LibWeb/CSS/Selector.h
@@ -26,7 +26,7 @@
#pragma once
-#include <AK/String.h>
+#include <AK/FlyString.h>
#include <AK/Vector.h>
#include <LibWeb/CSS/Specificity.h>
@@ -55,7 +55,7 @@ public:
};
PseudoClass pseudo_class { PseudoClass::None };
- String value;
+ FlyString value;
enum class AttributeMatchType {
None,
@@ -64,7 +64,7 @@ public:
};
AttributeMatchType attribute_match_type { AttributeMatchType::None };
- String attribute_name;
+ FlyString attribute_name;
String attribute_value;
};
diff --git a/Libraries/LibWeb/DOM/Comment.h b/Libraries/LibWeb/DOM/Comment.h
index 8530ad9191..e8a72cea08 100644
--- a/Libraries/LibWeb/DOM/Comment.h
+++ b/Libraries/LibWeb/DOM/Comment.h
@@ -26,7 +26,7 @@
#pragma once
-#include <AK/String.h>
+#include <AK/FlyString.h>
#include <LibWeb/DOM/CharacterData.h>
namespace Web {
@@ -36,7 +36,7 @@ public:
explicit Comment(Document&, const String&);
virtual ~Comment() override;
- virtual String tag_name() const override { return "#comment"; }
+ virtual FlyString tag_name() const override { return "#comment"; }
};
template<>
diff --git a/Libraries/LibWeb/DOM/Document.h b/Libraries/LibWeb/DOM/Document.h
index b4fef21bb2..911e4c9f35 100644
--- a/Libraries/LibWeb/DOM/Document.h
+++ b/Libraries/LibWeb/DOM/Document.h
@@ -26,6 +26,7 @@
#pragma once
+#include <AK/FlyString.h>
#include <AK/Function.h>
#include <AK/NonnullRefPtrVector.h>
#include <AK/OwnPtr.h>
@@ -69,7 +70,7 @@ public:
void add_sheet(const StyleSheet& sheet) { m_sheets.append(sheet); }
const NonnullRefPtrVector<StyleSheet>& stylesheets() const { return m_sheets; }
- virtual String tag_name() const override { return "#document"; }
+ virtual FlyString tag_name() const override { return "#document"; }
void set_hovered_node(Node*);
Node* hovered_node() { return m_hovered_node; }
diff --git a/Libraries/LibWeb/DOM/DocumentFragment.h b/Libraries/LibWeb/DOM/DocumentFragment.h
index 55e51feec4..7b4f6acf28 100644
--- a/Libraries/LibWeb/DOM/DocumentFragment.h
+++ b/Libraries/LibWeb/DOM/DocumentFragment.h
@@ -26,6 +26,7 @@
#pragma once
+#include <AK/FlyString.h>
#include <LibWeb/DOM/ParentNode.h>
namespace Web {
@@ -37,7 +38,7 @@ public:
{
}
- virtual String tag_name() const override { return "#document-fragment"; }
+ virtual FlyString tag_name() const override { return "#document-fragment"; }
};
template<>
diff --git a/Libraries/LibWeb/DOM/DocumentType.h b/Libraries/LibWeb/DOM/DocumentType.h
index b863ecb98c..0df0f634d4 100644
--- a/Libraries/LibWeb/DOM/DocumentType.h
+++ b/Libraries/LibWeb/DOM/DocumentType.h
@@ -26,6 +26,7 @@
#pragma once
+#include <AK/FlyString.h>
#include <LibWeb/DOM/Node.h>
namespace Web {
@@ -35,7 +36,7 @@ public:
explicit DocumentType(Document&);
virtual ~DocumentType() override;
- virtual String tag_name() const override { return "#doctype"; }
+ virtual FlyString tag_name() const override { return "#doctype"; }
};
template<>
diff --git a/Libraries/LibWeb/DOM/Element.cpp b/Libraries/LibWeb/DOM/Element.cpp
index f71f69dd0a..b7ebb004b1 100644
--- a/Libraries/LibWeb/DOM/Element.cpp
+++ b/Libraries/LibWeb/DOM/Element.cpp
@@ -39,7 +39,7 @@
namespace Web {
-Element::Element(Document& document, const String& tag_name)
+Element::Element(Document& document, const FlyString& tag_name)
: ParentNode(document, NodeType::ELEMENT_NODE)
, m_tag_name(tag_name)
{
diff --git a/Libraries/LibWeb/DOM/Element.h b/Libraries/LibWeb/DOM/Element.h
index 37f95200de..b23ac2c454 100644
--- a/Libraries/LibWeb/DOM/Element.h
+++ b/Libraries/LibWeb/DOM/Element.h
@@ -55,10 +55,10 @@ private:
class Element : public ParentNode {
public:
- Element(Document&, const String& tag_name);
+ Element(Document&, const FlyString& tag_name);
virtual ~Element() override;
- virtual String tag_name() const final { return m_tag_name; }
+ virtual FlyString tag_name() const final { return m_tag_name; }
bool has_attribute(const FlyString& name) const { return !attribute(name).is_null(); }
String attribute(const FlyString& name) const;
@@ -94,7 +94,7 @@ private:
Attribute* find_attribute(const FlyString& name);
const Attribute* find_attribute(const FlyString& name) const;
- String m_tag_name;
+ FlyString m_tag_name;
Vector<Attribute> m_attributes;
RefPtr<StyleProperties> m_resolved_style;
diff --git a/Libraries/LibWeb/DOM/ElementFactory.cpp b/Libraries/LibWeb/DOM/ElementFactory.cpp
index 6d0998d719..bb4f13fa00 100644
--- a/Libraries/LibWeb/DOM/ElementFactory.cpp
+++ b/Libraries/LibWeb/DOM/ElementFactory.cpp
@@ -45,7 +45,7 @@
namespace Web {
-NonnullRefPtr<Element> create_element(Document& document, const String& tag_name)
+NonnullRefPtr<Element> create_element(Document& document, const FlyString& tag_name)
{
auto lowercase_tag_name = tag_name.to_lowercase();
if (lowercase_tag_name == "a")
diff --git a/Libraries/LibWeb/DOM/ElementFactory.h b/Libraries/LibWeb/DOM/ElementFactory.h
index 3c494e78cd..371f571b57 100644
--- a/Libraries/LibWeb/DOM/ElementFactory.h
+++ b/Libraries/LibWeb/DOM/ElementFactory.h
@@ -30,6 +30,6 @@
namespace Web {
-NonnullRefPtr<Element> create_element(Document&, const String& tag_name);
+NonnullRefPtr<Element> create_element(Document&, const FlyString& tag_name);
}
diff --git a/Libraries/LibWeb/DOM/HTMLAnchorElement.cpp b/Libraries/LibWeb/DOM/HTMLAnchorElement.cpp
index 5fffa52fdf..10bd11de7d 100644
--- a/Libraries/LibWeb/DOM/HTMLAnchorElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLAnchorElement.cpp
@@ -28,7 +28,7 @@
namespace Web {
-HTMLAnchorElement::HTMLAnchorElement(Document& document, const String& tag_name)
+HTMLAnchorElement::HTMLAnchorElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLAnchorElement.h b/Libraries/LibWeb/DOM/HTMLAnchorElement.h
index 89d20c7be4..a663b718d9 100644
--- a/Libraries/LibWeb/DOM/HTMLAnchorElement.h
+++ b/Libraries/LibWeb/DOM/HTMLAnchorElement.h
@@ -32,7 +32,7 @@ namespace Web {
class HTMLAnchorElement : public HTMLElement {
public:
- HTMLAnchorElement(Document&, const String& tag_name);
+ HTMLAnchorElement(Document&, const FlyString& tag_name);
virtual ~HTMLAnchorElement() override;
String href() const { return attribute("href"); }
@@ -41,7 +41,7 @@ public:
template<>
inline bool is<HTMLAnchorElement>(const Node& node)
{
- return is<Element>(node) && to<Element>(node).tag_name().to_lowercase() == "a";
+ return is<Element>(node) && to<Element>(node).tag_name().equals_ignoring_case("a");
}
}
diff --git a/Libraries/LibWeb/DOM/HTMLBRElement.cpp b/Libraries/LibWeb/DOM/HTMLBRElement.cpp
index f7667c44d6..59c6a923a5 100644
--- a/Libraries/LibWeb/DOM/HTMLBRElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLBRElement.cpp
@@ -29,7 +29,7 @@
namespace Web {
-HTMLBRElement::HTMLBRElement(Document& document, const String& tag_name)
+HTMLBRElement::HTMLBRElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLBRElement.h b/Libraries/LibWeb/DOM/HTMLBRElement.h
index 4dcf6ff185..f032166438 100644
--- a/Libraries/LibWeb/DOM/HTMLBRElement.h
+++ b/Libraries/LibWeb/DOM/HTMLBRElement.h
@@ -32,7 +32,7 @@ namespace Web {
class HTMLBRElement final : public HTMLElement {
public:
- HTMLBRElement(Document&, const String& tag_name);
+ HTMLBRElement(Document&, const FlyString& tag_name);
virtual ~HTMLBRElement() override;
virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override;
@@ -41,7 +41,7 @@ public:
template<>
inline bool is<HTMLBRElement>(const Node& node)
{
- return is<Element>(node) && to<Element>(node).tag_name().to_lowercase() == "br";
+ return is<Element>(node) && to<Element>(node).tag_name().equals_ignoring_case("br");
}
}
diff --git a/Libraries/LibWeb/DOM/HTMLBlinkElement.cpp b/Libraries/LibWeb/DOM/HTMLBlinkElement.cpp
index 51f8d96642..f1ffb40238 100644
--- a/Libraries/LibWeb/DOM/HTMLBlinkElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLBlinkElement.cpp
@@ -32,7 +32,7 @@
namespace Web {
-HTMLBlinkElement::HTMLBlinkElement(Document& document, const String& tag_name)
+HTMLBlinkElement::HTMLBlinkElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
, m_timer(Core::Timer::construct())
{
diff --git a/Libraries/LibWeb/DOM/HTMLBlinkElement.h b/Libraries/LibWeb/DOM/HTMLBlinkElement.h
index 63d85b5093..743f8a8af0 100644
--- a/Libraries/LibWeb/DOM/HTMLBlinkElement.h
+++ b/Libraries/LibWeb/DOM/HTMLBlinkElement.h
@@ -33,7 +33,7 @@ namespace Web {
class HTMLBlinkElement : public HTMLElement {
public:
- HTMLBlinkElement(Document&, const String& tag_name);
+ HTMLBlinkElement(Document&, const FlyString& tag_name);
virtual ~HTMLBlinkElement() override;
private:
diff --git a/Libraries/LibWeb/DOM/HTMLBodyElement.cpp b/Libraries/LibWeb/DOM/HTMLBodyElement.cpp
index 962355eb25..260110b0fb 100644
--- a/Libraries/LibWeb/DOM/HTMLBodyElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLBodyElement.cpp
@@ -31,7 +31,7 @@
namespace Web {
-HTMLBodyElement::HTMLBodyElement(Document& document, const String& tag_name)
+HTMLBodyElement::HTMLBodyElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLBodyElement.h b/Libraries/LibWeb/DOM/HTMLBodyElement.h
index d4589d0d76..4dafb72633 100644
--- a/Libraries/LibWeb/DOM/HTMLBodyElement.h
+++ b/Libraries/LibWeb/DOM/HTMLBodyElement.h
@@ -32,7 +32,7 @@ namespace Web {
class HTMLBodyElement : public HTMLElement {
public:
- HTMLBodyElement(Document&, const String& tag_name);
+ HTMLBodyElement(Document&, const FlyString& tag_name);
virtual ~HTMLBodyElement() override;
virtual void parse_attribute(const FlyString&, const String&) override;
@@ -45,7 +45,7 @@ private:
template<>
inline bool is<HTMLBodyElement>(const Node& node)
{
- return is<Element>(node) && to<Element>(node).tag_name().to_lowercase() == "body";
+ return is<Element>(node) && to<Element>(node).tag_name().equals_ignoring_case("body");
}
}
diff --git a/Libraries/LibWeb/DOM/HTMLCanvasElement.cpp b/Libraries/LibWeb/DOM/HTMLCanvasElement.cpp
index cdd7ae86fc..dfced69444 100644
--- a/Libraries/LibWeb/DOM/HTMLCanvasElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLCanvasElement.cpp
@@ -33,7 +33,7 @@
namespace Web {
-HTMLCanvasElement::HTMLCanvasElement(Document& document, const String& tag_name)
+HTMLCanvasElement::HTMLCanvasElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLCanvasElement.h b/Libraries/LibWeb/DOM/HTMLCanvasElement.h
index 7407d6d9b9..7ac9e9195f 100644
--- a/Libraries/LibWeb/DOM/HTMLCanvasElement.h
+++ b/Libraries/LibWeb/DOM/HTMLCanvasElement.h
@@ -38,7 +38,7 @@ class HTMLCanvasElement : public HTMLElement {
public:
using WrapperType = Bindings::HTMLCanvasElementWrapper;
- HTMLCanvasElement(Document&, const String& tag_name);
+ HTMLCanvasElement(Document&, const FlyString& tag_name);
virtual ~HTMLCanvasElement() override;
int preferred_width() const;
@@ -59,7 +59,7 @@ private:
template<>
inline bool is<HTMLCanvasElement>(const Node& node)
{
- return is<Element>(node) && to<Element>(node).tag_name().to_lowercase() == "canvas";
+ return is<Element>(node) && to<Element>(node).tag_name().equals_ignoring_case("canvas");
}
diff --git a/Libraries/LibWeb/DOM/HTMLElement.cpp b/Libraries/LibWeb/DOM/HTMLElement.cpp
index 030a442854..6f52f4e807 100644
--- a/Libraries/LibWeb/DOM/HTMLElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLElement.cpp
@@ -28,7 +28,7 @@
namespace Web {
-HTMLElement::HTMLElement(Document& document, const String& tag_name)
+HTMLElement::HTMLElement(Document& document, const FlyString& tag_name)
: Element(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLElement.h b/Libraries/LibWeb/DOM/HTMLElement.h
index 56d8329b42..e99f5f5254 100644
--- a/Libraries/LibWeb/DOM/HTMLElement.h
+++ b/Libraries/LibWeb/DOM/HTMLElement.h
@@ -32,7 +32,7 @@ namespace Web {
class HTMLElement : public Element {
public:
- HTMLElement(Document&, const String& tag_name);
+ HTMLElement(Document&, const FlyString& tag_name);
virtual ~HTMLElement() override;
String title() const { return attribute("title"); }
diff --git a/Libraries/LibWeb/DOM/HTMLFontElement.cpp b/Libraries/LibWeb/DOM/HTMLFontElement.cpp
index 276daece4c..52521d01c4 100644
--- a/Libraries/LibWeb/DOM/HTMLFontElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLFontElement.cpp
@@ -30,7 +30,7 @@
namespace Web {
-HTMLFontElement::HTMLFontElement(Document& document, const String& tag_name)
+HTMLFontElement::HTMLFontElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLFontElement.h b/Libraries/LibWeb/DOM/HTMLFontElement.h
index 57d0088426..f958f03eeb 100644
--- a/Libraries/LibWeb/DOM/HTMLFontElement.h
+++ b/Libraries/LibWeb/DOM/HTMLFontElement.h
@@ -32,7 +32,7 @@ namespace Web {
class HTMLFontElement : public HTMLElement {
public:
- HTMLFontElement(Document&, const String& tag_name);
+ HTMLFontElement(Document&, const FlyString& tag_name);
virtual ~HTMLFontElement() override;
virtual void apply_presentational_hints(StyleProperties&) const override;
diff --git a/Libraries/LibWeb/DOM/HTMLFormElement.cpp b/Libraries/LibWeb/DOM/HTMLFormElement.cpp
index f7092a73d0..8cfc15e96b 100644
--- a/Libraries/LibWeb/DOM/HTMLFormElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLFormElement.cpp
@@ -32,7 +32,7 @@
namespace Web {
-HTMLFormElement::HTMLFormElement(Document& document, const String& tag_name)
+HTMLFormElement::HTMLFormElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLFormElement.h b/Libraries/LibWeb/DOM/HTMLFormElement.h
index bd99ce5c07..f50d9ea869 100644
--- a/Libraries/LibWeb/DOM/HTMLFormElement.h
+++ b/Libraries/LibWeb/DOM/HTMLFormElement.h
@@ -32,7 +32,7 @@ namespace Web {
class HTMLFormElement : public HTMLElement {
public:
- HTMLFormElement(Document&, const String& tag_name);
+ HTMLFormElement(Document&, const FlyString& tag_name);
virtual ~HTMLFormElement() override;
String action() const { return attribute("action"); }
@@ -44,7 +44,7 @@ public:
template<>
inline bool is<HTMLFormElement>(const Node& node)
{
- return is<Element>(node) && to<Element>(node).tag_name().to_lowercase() == "form";
+ return is<Element>(node) && to<Element>(node).tag_name().equals_ignoring_case("form");
}
}
diff --git a/Libraries/LibWeb/DOM/HTMLHRElement.cpp b/Libraries/LibWeb/DOM/HTMLHRElement.cpp
index 7d4dbb4a3b..88867b9b6c 100644
--- a/Libraries/LibWeb/DOM/HTMLHRElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLHRElement.cpp
@@ -28,7 +28,7 @@
namespace Web {
-HTMLHRElement::HTMLHRElement(Document& document, const String& tag_name)
+HTMLHRElement::HTMLHRElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLHRElement.h b/Libraries/LibWeb/DOM/HTMLHRElement.h
index 48a57026f9..d6d3bfdbfb 100644
--- a/Libraries/LibWeb/DOM/HTMLHRElement.h
+++ b/Libraries/LibWeb/DOM/HTMLHRElement.h
@@ -32,7 +32,7 @@ namespace Web {
class HTMLHRElement : public HTMLElement {
public:
- HTMLHRElement(Document&, const String& tag_name);
+ HTMLHRElement(Document&, const FlyString& tag_name);
virtual ~HTMLHRElement() override;
};
diff --git a/Libraries/LibWeb/DOM/HTMLHeadElement.cpp b/Libraries/LibWeb/DOM/HTMLHeadElement.cpp
index 6d828b269e..3b703b88d3 100644
--- a/Libraries/LibWeb/DOM/HTMLHeadElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLHeadElement.cpp
@@ -28,7 +28,7 @@
namespace Web {
-HTMLHeadElement::HTMLHeadElement(Document& document, const String& tag_name)
+HTMLHeadElement::HTMLHeadElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLHeadElement.h b/Libraries/LibWeb/DOM/HTMLHeadElement.h
index 5acb84ea91..f20f5ef414 100644
--- a/Libraries/LibWeb/DOM/HTMLHeadElement.h
+++ b/Libraries/LibWeb/DOM/HTMLHeadElement.h
@@ -32,14 +32,14 @@ namespace Web {
class HTMLHeadElement : public HTMLElement {
public:
- HTMLHeadElement(Document&, const String& tag_name);
+ HTMLHeadElement(Document&, const FlyString& tag_name);
virtual ~HTMLHeadElement() override;
};
template<>
inline bool is<HTMLHeadElement>(const Node& node)
{
- return is<Element>(node) && to<Element>(node).tag_name().to_lowercase() == "head";
+ return is<Element>(node) && to<Element>(node).tag_name().equals_ignoring_case("head");
}
}
diff --git a/Libraries/LibWeb/DOM/HTMLHeadingElement.cpp b/Libraries/LibWeb/DOM/HTMLHeadingElement.cpp
index fab61fda51..7e66054499 100644
--- a/Libraries/LibWeb/DOM/HTMLHeadingElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLHeadingElement.cpp
@@ -28,7 +28,7 @@
namespace Web {
-HTMLHeadingElement::HTMLHeadingElement(Document& document, const String& tag_name)
+HTMLHeadingElement::HTMLHeadingElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLHeadingElement.h b/Libraries/LibWeb/DOM/HTMLHeadingElement.h
index 0a8ad9ec4f..06e2e4af58 100644
--- a/Libraries/LibWeb/DOM/HTMLHeadingElement.h
+++ b/Libraries/LibWeb/DOM/HTMLHeadingElement.h
@@ -32,7 +32,7 @@ namespace Web {
class HTMLHeadingElement : public HTMLElement {
public:
- HTMLHeadingElement(Document&, const String& tag_name);
+ HTMLHeadingElement(Document&, const FlyString& tag_name);
virtual ~HTMLHeadingElement() override;
};
diff --git a/Libraries/LibWeb/DOM/HTMLHtmlElement.cpp b/Libraries/LibWeb/DOM/HTMLHtmlElement.cpp
index af1355cbde..7565dccd44 100644
--- a/Libraries/LibWeb/DOM/HTMLHtmlElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLHtmlElement.cpp
@@ -28,7 +28,7 @@
namespace Web {
-HTMLHtmlElement::HTMLHtmlElement(Document& document, const String& tag_name)
+HTMLHtmlElement::HTMLHtmlElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLHtmlElement.h b/Libraries/LibWeb/DOM/HTMLHtmlElement.h
index d926c3459d..814b869f7a 100644
--- a/Libraries/LibWeb/DOM/HTMLHtmlElement.h
+++ b/Libraries/LibWeb/DOM/HTMLHtmlElement.h
@@ -32,14 +32,14 @@ namespace Web {
class HTMLHtmlElement : public HTMLElement {
public:
- HTMLHtmlElement(Document&, const String& tag_name);
+ HTMLHtmlElement(Document&, const FlyString& tag_name);
virtual ~HTMLHtmlElement() override;
};
template<>
inline bool is<HTMLHtmlElement>(const Node& node)
{
- return is<Element>(node) && to<Element>(node).tag_name().to_lowercase() == "html";
+ return is<Element>(node) && to<Element>(node).tag_name().equals_ignoring_case("html");
}
}
diff --git a/Libraries/LibWeb/DOM/HTMLImageElement.cpp b/Libraries/LibWeb/DOM/HTMLImageElement.cpp
index 5d65a68190..6643af2349 100644
--- a/Libraries/LibWeb/DOM/HTMLImageElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLImageElement.cpp
@@ -34,7 +34,7 @@
namespace Web {
-HTMLImageElement::HTMLImageElement(Document& document, const String& tag_name)
+HTMLImageElement::HTMLImageElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLImageElement.h b/Libraries/LibWeb/DOM/HTMLImageElement.h
index 01d40c3e03..ab653a8f09 100644
--- a/Libraries/LibWeb/DOM/HTMLImageElement.h
+++ b/Libraries/LibWeb/DOM/HTMLImageElement.h
@@ -36,7 +36,7 @@ class LayoutDocument;
class HTMLImageElement : public HTMLElement {
public:
- HTMLImageElement(Document&, const String& tag_name);
+ HTMLImageElement(Document&, const FlyString& tag_name);
virtual ~HTMLImageElement() override;
virtual void parse_attribute(const FlyString& name, const String& value) override;
diff --git a/Libraries/LibWeb/DOM/HTMLInputElement.cpp b/Libraries/LibWeb/DOM/HTMLInputElement.cpp
index bd7194f251..78009d5329 100644
--- a/Libraries/LibWeb/DOM/HTMLInputElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLInputElement.cpp
@@ -36,7 +36,7 @@
namespace Web {
-HTMLInputElement::HTMLInputElement(Document& document, const String& tag_name)
+HTMLInputElement::HTMLInputElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLInputElement.h b/Libraries/LibWeb/DOM/HTMLInputElement.h
index f54d6efa6b..5e693437c0 100644
--- a/Libraries/LibWeb/DOM/HTMLInputElement.h
+++ b/Libraries/LibWeb/DOM/HTMLInputElement.h
@@ -32,7 +32,7 @@ namespace Web {
class HTMLInputElement : public HTMLElement {
public:
- HTMLInputElement(Document&, const String& tag_name);
+ HTMLInputElement(Document&, const FlyString& tag_name);
virtual ~HTMLInputElement() override;
virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override;
@@ -45,7 +45,7 @@ public:
template<>
inline bool is<HTMLInputElement>(const Node& node)
{
- return is<Element>(node) && to<Element>(node).tag_name().to_lowercase() == "input";
+ return is<Element>(node) && to<Element>(node).tag_name().equals_ignoring_case("input");
}
}
diff --git a/Libraries/LibWeb/DOM/HTMLLinkElement.cpp b/Libraries/LibWeb/DOM/HTMLLinkElement.cpp
index f2bd9e8aed..88ef395a52 100644
--- a/Libraries/LibWeb/DOM/HTMLLinkElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLLinkElement.cpp
@@ -34,7 +34,7 @@
namespace Web {
-HTMLLinkElement::HTMLLinkElement(Document& document, const String& tag_name)
+HTMLLinkElement::HTMLLinkElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLLinkElement.h b/Libraries/LibWeb/DOM/HTMLLinkElement.h
index ad005b4e93..af44746b8c 100644
--- a/Libraries/LibWeb/DOM/HTMLLinkElement.h
+++ b/Libraries/LibWeb/DOM/HTMLLinkElement.h
@@ -32,7 +32,7 @@ namespace Web {
class HTMLLinkElement final : public HTMLElement {
public:
- HTMLLinkElement(Document&, const String& tag_name);
+ HTMLLinkElement(Document&, const FlyString& tag_name);
virtual ~HTMLLinkElement() override;
virtual void inserted_into(Node&) override;
@@ -45,7 +45,7 @@ public:
template<>
inline bool is<HTMLLinkElement>(const Node& node)
{
- return is<Element>(node) && to<Element>(node).tag_name().to_lowercase() == "link";
+ return is<Element>(node) && to<Element>(node).tag_name().equals_ignoring_case("link");
}
}
diff --git a/Libraries/LibWeb/DOM/HTMLScriptElement.cpp b/Libraries/LibWeb/DOM/HTMLScriptElement.cpp
index f92f2e2504..8361215704 100644
--- a/Libraries/LibWeb/DOM/HTMLScriptElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLScriptElement.cpp
@@ -33,7 +33,7 @@
namespace Web {
-HTMLScriptElement::HTMLScriptElement(Document& document, const String& tag_name)
+HTMLScriptElement::HTMLScriptElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLScriptElement.h b/Libraries/LibWeb/DOM/HTMLScriptElement.h
index 90b3c8e784..bb9f7e139c 100644
--- a/Libraries/LibWeb/DOM/HTMLScriptElement.h
+++ b/Libraries/LibWeb/DOM/HTMLScriptElement.h
@@ -32,7 +32,7 @@ namespace Web {
class HTMLScriptElement : public HTMLElement {
public:
- HTMLScriptElement(Document&, const String& tag_name);
+ HTMLScriptElement(Document&, const FlyString& tag_name);
virtual ~HTMLScriptElement() override;
virtual void inserted_into(Node&) override;
diff --git a/Libraries/LibWeb/DOM/HTMLStyleElement.cpp b/Libraries/LibWeb/DOM/HTMLStyleElement.cpp
index 4a48fb3fa1..f3f7775348 100644
--- a/Libraries/LibWeb/DOM/HTMLStyleElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLStyleElement.cpp
@@ -32,7 +32,7 @@
namespace Web {
-HTMLStyleElement::HTMLStyleElement(Document& document, const String& tag_name)
+HTMLStyleElement::HTMLStyleElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLStyleElement.h b/Libraries/LibWeb/DOM/HTMLStyleElement.h
index f4534c9dab..e7dac784c2 100644
--- a/Libraries/LibWeb/DOM/HTMLStyleElement.h
+++ b/Libraries/LibWeb/DOM/HTMLStyleElement.h
@@ -34,7 +34,7 @@ class StyleSheet;
class HTMLStyleElement : public HTMLElement {
public:
- HTMLStyleElement(Document&, const String& tag_name);
+ HTMLStyleElement(Document&, const FlyString& tag_name);
virtual ~HTMLStyleElement() override;
virtual void inserted_into(Node&) override;
diff --git a/Libraries/LibWeb/DOM/HTMLTitleElement.cpp b/Libraries/LibWeb/DOM/HTMLTitleElement.cpp
index c523c8812e..a56b1795ac 100644
--- a/Libraries/LibWeb/DOM/HTMLTitleElement.cpp
+++ b/Libraries/LibWeb/DOM/HTMLTitleElement.cpp
@@ -28,7 +28,7 @@
namespace Web {
-HTMLTitleElement::HTMLTitleElement(Document& document, const String& tag_name)
+HTMLTitleElement::HTMLTitleElement(Document& document, const FlyString& tag_name)
: HTMLElement(document, tag_name)
{
}
diff --git a/Libraries/LibWeb/DOM/HTMLTitleElement.h b/Libraries/LibWeb/DOM/HTMLTitleElement.h
index 6485a3d428..d769f26b65 100644
--- a/Libraries/LibWeb/DOM/HTMLTitleElement.h
+++ b/Libraries/LibWeb/DOM/HTMLTitleElement.h
@@ -32,14 +32,14 @@ namespace Web {
class HTMLTitleElement : public HTMLElement {
public:
- HTMLTitleElement(Document&, const String& tag_name);
+ HTMLTitleElement(Document&, const FlyString& tag_name);
virtual ~HTMLTitleElement() override;
};
template<>
inline bool is<HTMLTitleElement>(const Node& node)
{
- return is<Element>(node) && to<Element>(node).tag_name().to_lowercase() == "title";
+ return is<Element>(node) && to<Element>(node).tag_name().equals_ignoring_case("title");
}
}
diff --git a/Libraries/LibWeb/DOM/Node.h b/Libraries/LibWeb/DOM/Node.h
index cfb56c0fe3..6d86a991da 100644
--- a/Libraries/LibWeb/DOM/Node.h
+++ b/Libraries/LibWeb/DOM/Node.h
@@ -84,7 +84,7 @@ public:
virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const;
- virtual String tag_name() const = 0;
+ virtual FlyString tag_name() const = 0;
virtual String text_content() const;
diff --git a/Libraries/LibWeb/DOM/Text.h b/Libraries/LibWeb/DOM/Text.h
index 5a482ed6a0..f3da78baae 100644
--- a/Libraries/LibWeb/DOM/Text.h
+++ b/Libraries/LibWeb/DOM/Text.h
@@ -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;
diff --git a/Libraries/LibWeb/Dump.cpp b/Libraries/LibWeb/Dump.cpp
index 9da4607d19..6f377b3187 100644
--- a/Libraries/LibWeb/Dump.cpp
+++ b/Libraries/LibWeb/Dump.cpp
@@ -75,7 +75,7 @@ void dump_tree(const LayoutNode& layout_node)
for (size_t i = 0; i < indent; ++i)
dbgprintf(" ");
- String tag_name;
+ FlyString tag_name;
if (layout_node.is_anonymous())
tag_name = "(anonymous)";
else if (is<Text>(layout_node.node()))