mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-20 06:36:16 +00:00
LibWeb: Rename Element::attribute to Element::deprecated_attribute
This should allow us to add a Element::attribute which returns an Optional<String>. Eventually all callers should be ported to switch from the DeprecatedString version, but in the meantime, this should allow us to port some more IDL interfaces away from DeprecatedString.
This commit is contained in:
@@ -59,7 +59,7 @@ void HTMLButtonElement::initialize(JS::Realm& realm)
|
||||
|
||||
DeprecatedString HTMLButtonElement::type() const
|
||||
{
|
||||
auto value = attribute(HTML::AttributeNames::type);
|
||||
auto value = deprecated_attribute(HTML::AttributeNames::type);
|
||||
|
||||
#define __ENUMERATE_HTML_BUTTON_TYPE_ATTRIBUTE(keyword, _) \
|
||||
if (value.equals_ignoring_ascii_case(#keyword##sv)) \
|
||||
@@ -73,7 +73,7 @@ DeprecatedString HTMLButtonElement::type() const
|
||||
|
||||
HTMLButtonElement::TypeAttributeState HTMLButtonElement::type_state() const
|
||||
{
|
||||
auto value = attribute(HTML::AttributeNames::type);
|
||||
auto value = deprecated_attribute(HTML::AttributeNames::type);
|
||||
|
||||
#define __ENUMERATE_HTML_BUTTON_TYPE_ATTRIBUTE(keyword, state) \
|
||||
if (value.equals_ignoring_ascii_case(#keyword##sv)) \
|
||||
@@ -110,7 +110,7 @@ DeprecatedString HTMLButtonElement::value() const
|
||||
{
|
||||
if (!has_attribute(AttributeNames::value))
|
||||
return DeprecatedString::empty();
|
||||
return attribute(AttributeNames::value);
|
||||
return deprecated_attribute(AttributeNames::value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user