LibWeb: Prepare WrapperGenerator for Fetch bindings

This commit is contained in:
Linus Groh 2022-07-18 00:09:04 +01:00
parent 2726fc9c73
commit 6b64ca4bb8
Notes: sideshowbarker 2024-07-17 08:49:19 +09:00
2 changed files with 8 additions and 1 deletions

View file

@ -1975,6 +1975,7 @@ void generate_implementation(IDL::Interface const& interface)
using namespace Web::CSS;
using namespace Web::DOM;
using namespace Web::DOMParsing;
using namespace Web::Fetch;
using namespace Web::FileAPI;
using namespace Web::Geometry;
using namespace Web::HTML;
@ -2852,6 +2853,8 @@ void generate_constructor_implementation(IDL::Interface const& interface)
# include <LibWeb/DOM/@name@.h>
#elif __has_include(<LibWeb/Encoding/@name@.h>)
# include <LibWeb/Encoding/@name@.h>
#elif __has_include(<LibWeb/Fetch/@name@.h>)
# include <LibWeb/Fetch/@name@.h>
#elif __has_include(<LibWeb/FileAPI/@name@.h>)
# include <LibWeb/FileAPI/@name@.h>
#elif __has_include(<LibWeb/Geometry/@name@.h>)
@ -2894,6 +2897,7 @@ void generate_constructor_implementation(IDL::Interface const& interface)
using namespace Web::CSS;
using namespace Web::DOM;
using namespace Web::DOMParsing;
using namespace Web::Fetch;
using namespace Web::FileAPI;
using namespace Web::Geometry;
using namespace Web::HTML;
@ -3173,6 +3177,7 @@ using namespace Web::Crypto;
using namespace Web::CSS;
using namespace Web::DOM;
using namespace Web::DOMParsing;
using namespace Web::Fetch;
using namespace Web::FileAPI;
using namespace Web::Geometry;
using namespace Web::HTML;
@ -3624,6 +3629,7 @@ void generate_iterator_implementation(IDL::Interface const& interface)
using namespace Web::CSS;
using namespace Web::DOM;
using namespace Web::DOMParsing;
using namespace Web::Fetch;
using namespace Web::FileAPI;
using namespace Web::Geometry;
using namespace Web::HTML;
@ -3739,6 +3745,7 @@ void generate_iterator_prototype_implementation(IDL::Interface const& interface)
using namespace Web::CSS;
using namespace Web::DOM;
using namespace Web::DOMParsing;
using namespace Web::Fetch;
using namespace Web::FileAPI;
using namespace Web::Geometry;
using namespace Web::HTML;

View file

@ -85,7 +85,7 @@ 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", "FileAPI", "HTML", "UIEvents", "Geometry", "HighResolutionTime", "IntersectionObserver", "NavigationTiming", "RequestIdleCallback", "ResizeObserver", "SVG", "Selection", "URL", "WebGL", "WebSockets", "XHR")) {
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")) {
StringBuilder builder;
builder.append(namespace_);
builder.append("::"sv);