ladybird/Libraries/LibWeb/ARIA/AttributeNames.cpp
Timothy Flynn 4152870b85 LibWeb: Use a standard x-macro to create FlyString ARIA attribute names
We are currently constructing the attribute names as FlyStrings every
time we invoke one of the ARIA attributes getters/setters. If there are
not any other instances of these strings in-memory, then we're thrashing
the FlyString cache.

Instead, let's follow suit of all other Web attributes - use an x-macro
to generate the attribute names.
2024-12-05 11:45:58 -05:00

16 lines
352 B
C++

/*
* Copyright (c) 2024, Tim Flynn <trflynn89@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/ARIA/AttributeNames.h>
namespace Web::ARIA::AttributeNames {
#define __ENUMERATE_ARIA_ATTRIBUTE(name, attribute) \
FlyString name = attribute##_fly_string;
ENUMERATE_ARIA_ATTRIBUTES
#undef __ENUMERATE_ARIA_ATTRIBUTE
}