@@ -307,7 +307,7 @@ class HTMLFastPathParser {
307307
308308 struct A : ContainerTag<HTMLAnchorElement, PermittedParents::FlowContent> {
309309 static constexpr ElementName tagName = ElementNames::HTML ::a;
310- static constexpr CharacterType tagNameCharacters[] = { ' a' };
310+ static constexpr std::array< CharacterType, 1 > tagNameCharacters { ' a' };
311311
312312 static RefPtr<HTMLElement> parseChild (ContainerNode& parent, HTMLFastPathParser& self)
313313 {
@@ -321,7 +321,7 @@ class HTMLFastPathParser {
321321
322322 struct AWithPhrasingContent : ContainsPhrasingContentTag<HTMLAnchorElement, PermittedParents::PhrasingOrFlowContent> {
323323 static constexpr ElementName tagName = ElementNames::HTML ::a;
324- static constexpr CharacterType tagNameCharacters[] = { ' a' };
324+ static constexpr std::array< CharacterType, 1 > tagNameCharacters { ' a' };
325325
326326 static RefPtr<HTMLElement> parseChild (ContainerNode& parent, HTMLFastPathParser& self)
327327 {
@@ -335,7 +335,7 @@ class HTMLFastPathParser {
335335
336336 struct B : ContainsPhrasingContentTag<HTMLElement, PermittedParents::PhrasingOrFlowContent> {
337337 static constexpr ElementName tagName = ElementNames::HTML ::b;
338- static constexpr CharacterType tagNameCharacters[] = { ' b' };
338+ static constexpr std::array< CharacterType, 1 > tagNameCharacters { ' b' };
339339
340340 static Ref<HTMLElement> create (Document& document)
341341 {
@@ -345,27 +345,27 @@ class HTMLFastPathParser {
345345
346346 struct Br : VoidTag<HTMLBRElement, PermittedParents::PhrasingOrFlowContent> {
347347 static constexpr ElementName tagName = ElementNames::HTML ::br;
348- static constexpr CharacterType tagNameCharacters[] = { ' b' , ' r' };
348+ static constexpr std::array< CharacterType, 2 > tagNameCharacters { ' b' , ' r' };
349349 };
350350
351351 struct Button : ContainsPhrasingContentTag<HTMLButtonElement, PermittedParents::PhrasingOrFlowContent> {
352352 static constexpr ElementName tagName = ElementNames::HTML ::button;
353- static constexpr CharacterType tagNameCharacters[] = { ' b' , ' u' , ' t' , ' t' , ' o' , ' n' };
353+ static constexpr std::array< CharacterType, 6 > tagNameCharacters { ' b' , ' u' , ' t' , ' t' , ' o' , ' n' };
354354 };
355355
356356 struct Div : ContainerTag<HTMLDivElement, PermittedParents::FlowContent> {
357357 static constexpr ElementName tagName = ElementNames::HTML ::div;
358- static constexpr CharacterType tagNameCharacters[] = { ' d' , ' i' , ' v' };
358+ static constexpr std::array< CharacterType, 3 > tagNameCharacters { ' d' , ' i' , ' v' };
359359 };
360360
361361 struct Body : ContainerTag<HTMLBodyElement, PermittedParents::Special> {
362362 static constexpr ElementName tagName = ElementNames::HTML ::body;
363- static constexpr CharacterType tagNameCharacters[] = { ' b' , ' o' , ' d' , ' y' };
363+ static constexpr std::array< CharacterType, 4 > tagNameCharacters { ' b' , ' o' , ' d' , ' y' };
364364 };
365365
366366 struct Footer : ContainerTag<HTMLElement, PermittedParents::FlowContent> {
367367 static constexpr ElementName tagName = ElementNames::HTML ::footer;
368- static constexpr CharacterType tagNameCharacters[] = { ' f' , ' o' , ' o' , ' t' , ' e' , ' r' };
368+ static constexpr std::array< CharacterType, 6 > tagNameCharacters { ' f' , ' o' , ' o' , ' t' , ' e' , ' r' };
369369
370370 static Ref<HTMLElement> create (Document& document)
371371 {
@@ -375,7 +375,7 @@ class HTMLFastPathParser {
375375
376376 struct I : ContainsPhrasingContentTag<HTMLElement, PermittedParents::PhrasingOrFlowContent> {
377377 static constexpr ElementName tagName = ElementNames::HTML ::i;
378- static constexpr CharacterType tagNameCharacters[] = { ' i' };
378+ static constexpr std::array< CharacterType, 1 > tagNameCharacters { ' i' };
379379
380380 static Ref<HTMLElement> create (Document& document)
381381 {
@@ -385,7 +385,7 @@ class HTMLFastPathParser {
385385
386386 struct Input : VoidTag<HTMLInputElement, PermittedParents::PhrasingOrFlowContent> {
387387 static constexpr ElementName tagName = ElementNames::HTML ::input;
388- static constexpr CharacterType tagNameCharacters[] = { ' i' , ' n' , ' p' , ' u' , ' t' };
388+ static constexpr std::array< CharacterType, 5 > tagNameCharacters { ' i' , ' n' , ' p' , ' u' , ' t' };
389389
390390 static Ref<HTMLInputElement> create (Document& document)
391391 {
@@ -395,17 +395,17 @@ class HTMLFastPathParser {
395395
396396 struct Li : ContainerTag<HTMLLIElement, PermittedParents::FlowContent> {
397397 static constexpr ElementName tagName = ElementNames::HTML ::li;
398- static constexpr CharacterType tagNameCharacters[] = { ' l' , ' i' };
398+ static constexpr std::array< CharacterType, 2 > tagNameCharacters { ' l' , ' i' };
399399 };
400400
401401 struct Label : ContainsPhrasingContentTag<HTMLLabelElement, PermittedParents::PhrasingOrFlowContent> {
402402 static constexpr ElementName tagName = ElementNames::HTML ::label;
403- static constexpr CharacterType tagNameCharacters[] = { ' l' , ' a' , ' b' , ' e' , ' l' };
403+ static constexpr std::array< CharacterType, 5 > tagNameCharacters { ' l' , ' a' , ' b' , ' e' , ' l' };
404404 };
405405
406406 struct Option : ContainerTag<HTMLOptionElement, PermittedParents::Special> {
407407 static constexpr ElementName tagName = ElementNames::HTML ::option;
408- static constexpr CharacterType tagNameCharacters[] = { ' o' , ' p' , ' t' , ' i' , ' o' , ' n' };
408+ static constexpr std::array< CharacterType, 6 > tagNameCharacters { ' o' , ' p' , ' t' , ' i' , ' o' , ' n' };
409409
410410 static RefPtr<HTMLElement> parseChild (ContainerNode&, HTMLFastPathParser& self)
411411 {
@@ -416,7 +416,7 @@ class HTMLFastPathParser {
416416
417417 struct Ol : ContainerTag<HTMLOListElement, PermittedParents::FlowContent> {
418418 static constexpr ElementName tagName = ElementNames::HTML ::ol;
419- static constexpr CharacterType tagNameCharacters[] = { ' o' , ' l' };
419+ static constexpr std::array< CharacterType, 2 > tagNameCharacters { ' o' , ' l' };
420420
421421 static RefPtr<HTMLElement> parseChild (ContainerNode& parent, HTMLFastPathParser& self)
422422 {
@@ -426,12 +426,12 @@ class HTMLFastPathParser {
426426
427427 struct P : ContainsPhrasingContentTag<HTMLParagraphElement, PermittedParents::FlowContent> {
428428 static constexpr ElementName tagName = ElementNames::HTML ::p;
429- static constexpr CharacterType tagNameCharacters[] = { ' p' };
429+ static constexpr std::array< CharacterType, 1 > tagNameCharacters { ' p' };
430430 };
431431
432432 struct Select : ContainerTag<HTMLSelectElement, PermittedParents::PhrasingOrFlowContent> {
433433 static constexpr ElementName tagName = ElementNames::HTML ::select;
434- static constexpr CharacterType tagNameCharacters[] = { ' s' , ' e' , ' l' , ' e' , ' c' , ' t' };
434+ static constexpr std::array< CharacterType, 6 > tagNameCharacters { ' s' , ' e' , ' l' , ' e' , ' c' , ' t' };
435435
436436 static RefPtr<HTMLElement> parseChild (ContainerNode& parent, HTMLFastPathParser& self)
437437 {
@@ -441,12 +441,12 @@ class HTMLFastPathParser {
441441
442442 struct Span : ContainsPhrasingContentTag<HTMLSpanElement, PermittedParents::PhrasingOrFlowContent> {
443443 static constexpr ElementName tagName = ElementNames::HTML ::span;
444- static constexpr CharacterType tagNameCharacters[] = { ' s' , ' p' , ' a' , ' n' };
444+ static constexpr std::array< CharacterType, 4 > tagNameCharacters { ' s' , ' p' , ' a' , ' n' };
445445 };
446446
447447 struct Strong : ContainsPhrasingContentTag<HTMLElement, PermittedParents::PhrasingOrFlowContent> {
448448 static constexpr ElementName tagName = ElementNames::HTML ::strong;
449- static constexpr CharacterType tagNameCharacters[] = { ' s' , ' t' , ' r' , ' o' , ' n' , ' g' };
449+ static constexpr std::array< CharacterType, 6 > tagNameCharacters { ' s' , ' t' , ' r' , ' o' , ' n' , ' g' };
450450
451451 static Ref<HTMLElement> create (Document& document)
452452 {
@@ -456,7 +456,7 @@ class HTMLFastPathParser {
456456
457457 struct Ul : ContainerTag<HTMLUListElement, PermittedParents::FlowContent> {
458458 static constexpr ElementName tagName = ElementNames::HTML ::ul;
459- static constexpr CharacterType tagNameCharacters[] = { ' u' , ' l' };
459+ static constexpr std::array< CharacterType, 2 > tagNameCharacters { ' u' , ' l' };
460460
461461 static RefPtr<HTMLElement> parseChild (ContainerNode& parent, HTMLFastPathParser& self)
462462 {
@@ -930,8 +930,8 @@ class HTMLFastPathParser {
930930 ASSERT (*m_parsingBuffer == ' /' );
931931 m_parsingBuffer.advance ();
932932
933- if (UNLIKELY (!skipCharactersExactly (m_parsingBuffer, Tag::tagNameCharacters))) {
934- if (UNLIKELY (!skipLettersExactlyIgnoringASCIICase (m_parsingBuffer, Tag::tagNameCharacters)))
933+ if (UNLIKELY (!skipCharactersExactly (m_parsingBuffer, std::span { Tag::tagNameCharacters } ))) {
934+ if (UNLIKELY (!skipLettersExactlyIgnoringASCIICase (m_parsingBuffer, std::span { Tag::tagNameCharacters } )))
935935 return didFail (HTMLFastPathResult::FailedEndTagNameMismatch, element);
936936 }
937937 skipWhile<isASCIIWhitespace>(m_parsingBuffer);
0 commit comments