diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/SVG/AttributeNames.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/SVG/AttributeNames.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/SVG/AttributeNames.cpp b/Userland/Libraries/LibWeb/SVG/AttributeNames.cpp new file mode 100644 index 0000000000..f8953aa822 --- /dev/null +++ b/Userland/Libraries/LibWeb/SVG/AttributeNames.cpp @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2021, Andreas Kling <kling@serenityos.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include <LibWeb/SVG/AttributeNames.h> + +namespace Web::SVG::AttributeNames { + +#define __ENUMERATE_SVG_ATTRIBUTE(name) FlyString name; +ENUMERATE_SVG_ATTRIBUTES(__ENUMERATE_SVG_ATTRIBUTE) +#undef __ENUMERATE_SVG_ATTRIBUTE + +[[gnu::constructor]] static void initialize() +{ + static bool s_initialized = false; + if (s_initialized) + return; + +#define __ENUMERATE_SVG_ATTRIBUTE(name) \ + name = #name; + ENUMERATE_SVG_ATTRIBUTES(__ENUMERATE_SVG_ATTRIBUTE) +#undef __ENUMERATE_SVG_ATTRIBUTE + + s_initialized = true; +} + +} |