mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
7bb865052a
To facilitate the implementation of "delete" and all associated algorithms, split off this piece of `Document` into a separate directory. This sets up the infrastructure for arbitrary commands to be supported.
29 lines
614 B
C++
29 lines
614 B
C++
/*
|
|
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/Editing/CommandNames.h>
|
|
|
|
namespace Web::Editing::CommandNames {
|
|
|
|
#define __ENUMERATE_COMMAND_NAME(name) FlyString name;
|
|
ENUMERATE_COMMAND_NAMES
|
|
#undef __ENUMERATE_COMMAND_NAME
|
|
FlyString delete_;
|
|
|
|
void initialize_strings()
|
|
{
|
|
static bool s_initialized = false;
|
|
VERIFY(!s_initialized);
|
|
|
|
#define __ENUMERATE_COMMAND_NAME(name) name = #name##_fly_string;
|
|
ENUMERATE_COMMAND_NAMES
|
|
#undef __ENUMERATE_MATHML_TAG
|
|
delete_ = "delete"_fly_string;
|
|
|
|
s_initialized = true;
|
|
}
|
|
|
|
}
|