mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 11:09:18 +00:00
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.
This commit is contained in:
parent
6381ed26f2
commit
4152870b85
Notes:
github-actions[bot]
2024-12-05 17:10:40 +00:00
Author: https://github.com/trflynn89
Commit: 4152870b85
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2784
5 changed files with 105 additions and 224 deletions
16
Libraries/LibWeb/ARIA/AttributeNames.cpp
Normal file
16
Libraries/LibWeb/ARIA/AttributeNames.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* 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
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue