summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-07-18 00:09:04 +0100
committerLinus Groh <mail@linusgroh.de>2022-07-19 00:27:35 +0100
commit6b64ca4bb8ac226a01e71ea887d2a35281c42a90 (patch)
tree275209466eb419fdb417ea1988b326721d5b7c64
parent2726fc9c7376b52cdedc5b6c18f990f0e22daed7 (diff)
downloadserenity-6b64ca4bb8ac226a01e71ea887d2a35281c42a90.zip
LibWeb: Prepare WrapperGenerator for Fetch bindings
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp7
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/main.cpp2
2 files changed, 8 insertions, 1 deletions
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 <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;
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);