1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

LibWeb: Add namespace qualifier to type names equal to a C++ namespace

For example, Document.getSelection returns Selection, which is in the
Selection namespace.

Namespaces.h has Linus' copyright since he changed the "is_one_of" list
to an Array.
This commit is contained in:
Luke Wilde 2022-12-09 18:58:52 +00:00 committed by Linus Groh
parent 34c130b336
commit 565dc0f296
3 changed files with 53 additions and 27 deletions

View file

@ -0,0 +1,40 @@
/*
* Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Array.h>
#include <AK/StringView.h>
namespace IDL {
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,
"WebIDL"sv,
"WebSockets"sv,
"XHR"sv,
};
}