mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 13:20:59 +00:00 
			
		
		
		
	 4152870b85
			
		
	
	
		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
 | |
| 
 | |
| }
 |