summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/DOM/AttributeNames.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-30 13:06:26 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-30 13:06:26 +0200
commit7f22e2a3c47e53ffa31f864a99481865cfbd6867 (patch)
tree3fddee8126d663f72a2abed36650cdac512c9dc9 /Libraries/LibWeb/DOM/AttributeNames.cpp
parent770372ad029f211dbd0d7e9f3d4ffd59737b8660 (diff)
downloadserenity-7f22e2a3c47e53ffa31f864a99481865cfbd6867.zip
LibWeb: Use the globals from HTML::AttributeNames in style resolution
Using these avoids the FlyString lookups, so we should basically always prefer them over string literal attribute names.
Diffstat (limited to 'Libraries/LibWeb/DOM/AttributeNames.cpp')
-rw-r--r--Libraries/LibWeb/DOM/AttributeNames.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Libraries/LibWeb/DOM/AttributeNames.cpp b/Libraries/LibWeb/DOM/AttributeNames.cpp
index c4c5b2b135..eda5c3f7e1 100644
--- a/Libraries/LibWeb/DOM/AttributeNames.cpp
+++ b/Libraries/LibWeb/DOM/AttributeNames.cpp
@@ -33,6 +33,8 @@ namespace AttributeNames {
FlyString id;
FlyString class_;
FlyString type;
+FlyString href;
+FlyString style;
void initialize()
{
@@ -42,6 +44,8 @@ void initialize()
id = "id";
class_ = "class";
type = "type";
+ href = "href";
+ style = "style";
s_initialized = true;
}