mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibWeb: Split WrapperGenerator namespace check into an Array + contains
Also sort the entries alphabetically while we're here :^)
This commit is contained in:
parent
ed49b66f25
commit
f33df0ee05
Notes:
sideshowbarker
2024-07-17 08:49:03 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/f33df0ee05 Pull-request: https://github.com/SerenityOS/serenity/pull/14620 Reviewed-by: https://github.com/sin-ack ✅
1 changed files with 25 additions and 1 deletions
|
@ -85,7 +85,31 @@ int main(int argc, char** argv)
|
|||
|
||||
auto& interface = IDL::Parser(path, data, import_base_path).parse();
|
||||
|
||||
if (namespace_.is_one_of("Crypto", "CSS", "DOM", "DOMParsing", "Encoding", "Fetch", "FileAPI", "HTML", "UIEvents", "Geometry", "HighResolutionTime", "IntersectionObserver", "NavigationTiming", "RequestIdleCallback", "ResizeObserver", "SVG", "Selection", "URL", "WebGL", "WebSockets", "XHR")) {
|
||||
static constexpr Array libweb_interface_namespaces = {
|
||||
"CSS"sv,
|
||||
"Crypto"sv,
|
||||
"DOM"sv,
|
||||
"DOMParsing"sv,
|
||||
"Encoding"sv,
|
||||
"Fetch"sv,
|
||||
"FileAPI"sv,
|
||||
"Geometry"sv,
|
||||
"HTML"sv,
|
||||
"HighResolutionTime"sv,
|
||||
"IntersectionObserver"sv,
|
||||
"NavigationTiming"sv,
|
||||
"RequestIdleCallback"sv,
|
||||
"ResizeObserver"sv,
|
||||
"SVG"sv,
|
||||
"Selection"sv,
|
||||
"UIEvents"sv,
|
||||
"URL"sv,
|
||||
"WebGL"sv,
|
||||
"WebSockets"sv,
|
||||
"XHR"sv,
|
||||
};
|
||||
|
||||
if (libweb_interface_namespaces.span().contains_slow(namespace_)) {
|
||||
StringBuilder builder;
|
||||
builder.append(namespace_);
|
||||
builder.append("::"sv);
|
||||
|
|
Loading…
Reference in a new issue