mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 01:32:14 -05:00
4152870b85
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.
16 lines
352 B
C++
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
|
|
|
|
}
|