LibWeb: Always compare attribute names directly

Attributes are already stored with their names in lowercase, so we can
do a direct comparison instead of a case-insensitive one.
This commit is contained in:
Sam Atkins 2025-06-04 14:34:04 +01:00
parent bc8a97589f
commit 6f4df83917
Notes: github-actions[bot] 2025-06-05 11:11:21 +00:00
7 changed files with 13 additions and 13 deletions

View file

@ -190,7 +190,7 @@ void HTMLCanvasElement::attribute_changed(FlyString const& local_name, Optional<
{
Base::attribute_changed(local_name, old_value, value, namespace_);
if (local_name.equals_ignoring_ascii_case(HTML::AttributeNames::width) || local_name.equals_ignoring_ascii_case(HTML::AttributeNames::height)) {
if (local_name.is_one_of(HTML::AttributeNames::width, HTML::AttributeNames::height)) {
notify_context_about_canvas_size_change();
reset_context_to_default_state();
if (auto layout_node = this->layout_node())