2021-09-14 19:26:16 -03:00
|
|
|
/*
|
2024-10-04 08:19:50 -03:00
|
|
|
* Copyright (c) 2021, Andreas Kling <andreas@ladybird.org>
|
2021-09-14 19:26:16 -03:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/SVG/AttributeNames.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::SVG::AttributeNames {
|
|
|
|
|
|
2023-10-07 19:42:00 -03:00
|
|
|
#define __ENUMERATE_SVG_ATTRIBUTE(name) FlyString name;
|
2021-09-14 19:26:16 -03:00
|
|
|
ENUMERATE_SVG_ATTRIBUTES(__ENUMERATE_SVG_ATTRIBUTE)
|
|
|
|
|
#undef __ENUMERATE_SVG_ATTRIBUTE
|
|
|
|
|
|
2023-08-07 07:07:35 -03:00
|
|
|
void initialize_strings()
|
2021-09-14 19:26:16 -03:00
|
|
|
{
|
|
|
|
|
static bool s_initialized = false;
|
2023-03-18 11:39:37 -03:00
|
|
|
VERIFY(!s_initialized);
|
2021-09-14 19:26:16 -03:00
|
|
|
|
|
|
|
|
#define __ENUMERATE_SVG_ATTRIBUTE(name) \
|
2023-10-07 19:42:00 -03:00
|
|
|
name = #name##_fly_string;
|
2021-09-14 19:26:16 -03:00
|
|
|
ENUMERATE_SVG_ATTRIBUTES(__ENUMERATE_SVG_ATTRIBUTE)
|
|
|
|
|
#undef __ENUMERATE_SVG_ATTRIBUTE
|
|
|
|
|
|
2024-07-09 16:59:00 -03:00
|
|
|
// NOTE: Special cases for C++ keywords.
|
|
|
|
|
class_ = "class"_fly_string;
|
|
|
|
|
|
2023-11-13 21:52:56 -03:00
|
|
|
// NOTE: Special case for attributes with ':' in them.
|
|
|
|
|
xlink_href = "xlink:href"_fly_string;
|
|
|
|
|
|
2021-09-14 19:26:16 -03:00
|
|
|
s_initialized = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|