LibWeb: Use correct value when parsing datetime-local input type

This commit is contained in:
Tim Ledbetter 2024-09-10 10:43:22 +01:00 committed by Tim Ledbetter
parent c4b82318f4
commit eb4e40bc49
Notes: github-actions[bot] 2024-09-10 15:14:13 +00:00
3 changed files with 24 additions and 24 deletions

View file

@ -1291,7 +1291,7 @@ WebIDL::ExceptionOr<void> HTMLInputElement::handle_src_attribute(String const& v
HTMLInputElement::TypeAttributeState HTMLInputElement::parse_type_attribute(StringView type)
{
#define __ENUMERATE_HTML_INPUT_TYPE_ATTRIBUTE(keyword, state) \
if (type.equals_ignoring_ascii_case(#keyword##sv)) \
if (type.equals_ignoring_ascii_case(keyword##sv)) \
return HTMLInputElement::TypeAttributeState::state;
ENUMERATE_HTML_INPUT_TYPE_ATTRIBUTES
#undef __ENUMERATE_HTML_INPUT_TYPE_ATTRIBUTE
@ -1308,7 +1308,7 @@ StringView HTMLInputElement::type() const
switch (m_type) {
#define __ENUMERATE_HTML_INPUT_TYPE_ATTRIBUTE(keyword, state) \
case TypeAttributeState::state: \
return #keyword##sv;
return keyword##sv;
ENUMERATE_HTML_INPUT_TYPE_ATTRIBUTES
#undef __ENUMERATE_HTML_INPUT_TYPE_ATTRIBUTE
}