LibWeb: Port AttributeNames to FlyString

This commit is contained in:
Shannon Booth 2023-10-08 11:42:00 +13:00 committed by Tim Flynn
parent 6a3f27509f
commit e4f8c59210
Notes: sideshowbarker 2024-07-18 04:46:35 +09:00
93 changed files with 148 additions and 149 deletions

View file

@ -95,7 +95,7 @@ void HTMLImageElement::apply_presentational_hints(CSS::StyleProperties& style) c
});
}
void HTMLImageElement::attribute_changed(DeprecatedFlyString const& name, DeprecatedString const& value)
void HTMLImageElement::attribute_changed(FlyString const& name, DeprecatedString const& value)
{
HTMLElement::attribute_changed(name, value);
@ -190,7 +190,7 @@ unsigned HTMLImageElement::width() const
WebIDL::ExceptionOr<void> HTMLImageElement::set_width(unsigned width)
{
return set_attribute(HTML::AttributeNames::width, DeprecatedString::number(width));
return set_attribute(HTML::AttributeNames::width, MUST(String::number(width)));
}
// https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-height
@ -218,7 +218,7 @@ unsigned HTMLImageElement::height() const
WebIDL::ExceptionOr<void> HTMLImageElement::set_height(unsigned height)
{
return set_attribute(HTML::AttributeNames::height, DeprecatedString::number(height));
return set_attribute(HTML::AttributeNames::height, MUST(String::number(height)));
}
// https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-naturalwidth