LibWeb: Add attribute list that must always be compared without casing

This commit is contained in:
Edwin Hoksberg
2024-06-22 13:33:48 +02:00
committed by Andreas Kling
parent 68d84755f4
commit 2b30414c1d
4 changed files with 75 additions and 2 deletions

View File

@@ -75,6 +75,56 @@ public:
[[nodiscard]] LengthOrCalculated parse_as_sizes_attribute();
// https://html.spec.whatwg.org/multipage/semantics-other.html#case-sensitivity-of-selectors
static constexpr Array case_insensitive_html_attributes = {
"accept"sv,
"accept-charset"sv,
"align"sv,
"alink"sv,
"axis"sv,
"bgcolor"sv,
"charset"sv,
"checked"sv,
"clear"sv,
"codetype"sv,
"color"sv,
"compact"sv,
"declare"sv,
"defer"sv,
"dir"sv,
"direction"sv,
"disabled"sv,
"enctype"sv,
"face"sv,
"frame"sv,
"hreflang"sv,
"http-equiv"sv,
"lang"sv,
"language"sv,
"link"sv,
"media"sv,
"method"sv,
"multiple"sv,
"nohref"sv,
"noresize"sv,
"noshade"sv,
"nowrap"sv,
"readonly"sv,
"rel"sv,
"rev"sv,
"rules"sv,
"scope"sv,
"scrolling"sv,
"selected"sv,
"shape"sv,
"target"sv,
"text"sv,
"type"sv,
"valign"sv,
"valuetype"sv,
"vlink"sv,
};
private:
Parser(ParsingContext const&, Vector<Token>);