From 6b64ca4bb8ac226a01e71ea887d2a35281c42a90 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Mon, 18 Jul 2022 00:09:04 +0100 Subject: [PATCH] LibWeb: Prepare WrapperGenerator for Fetch bindings --- .../LibWeb/WrapperGenerator/IDLGenerators.cpp | 7 +++++++ .../Tools/CodeGenerators/LibWeb/WrapperGenerator/main.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp index da61c83a33..4cc4792fa7 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp @@ -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 #elif __has_include() # include +#elif __has_include() +# include #elif __has_include() # include #elif __has_include() @@ -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; diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/main.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/main.cpp index 03b76a36c7..11a9b1c8cc 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/main.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/main.cpp @@ -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);