summaryrefslogtreecommitdiff
path: root/Meta/Lagom/Tools
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-09-13 00:33:23 +0300
committerAndreas Kling <kling@serenityos.org>2021-09-13 01:43:10 +0200
commit4629f2e4ad0640087d48e9e427e117620b09d7e8 (patch)
tree55f77b9b91c9dba677a7fd7e4b512fc75a49f27b /Meta/Lagom/Tools
parent2b78e227f2bba96ebdf10f5aa0a83e0c9fd022cb (diff)
downloadserenity-4629f2e4ad0640087d48e9e427e117620b09d7e8.zip
LibWeb: Add the Web::URL namespace and move URLEncoder to it
This namespace will be used for all interfaces defined in the URL specification, like URL and URLSearchParams. This has the unfortunate side-effect of requiring us to use the fully qualified AK::URL name whenever we want to refer to the AK class, so this commit also fixes all such references.
Diffstat (limited to 'Meta/Lagom/Tools')
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp
index 7929915f55..ffe3f64c11 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp
+++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp
@@ -437,7 +437,7 @@ int main(int argc, char** argv)
return 1;
}
- if (namespace_.is_one_of("CSS", "DOM", "HTML", "UIEvents", "HighResolutionTime", "NavigationTiming", "SVG", "XHR")) {
+ if (namespace_.is_one_of("CSS", "DOM", "HTML", "UIEvents", "HighResolutionTime", "NavigationTiming", "SVG", "XHR", "URL")) {
StringBuilder builder;
builder.append(namespace_);
builder.append("::");
@@ -968,6 +968,8 @@ static void generate_header(IDL::Interface const& interface)
# include <LibWeb/SVG/@name@.h>
#elif __has_include(<LibWeb/XHR/@name@.h>)
# include <LibWeb/XHR/@name@.h>
+#elif __has_include(<LibWeb/URL/@name@.h>)
+# include <LibWeb/URL/@name@.h>
#endif
)~~~");
@@ -1235,6 +1237,8 @@ void generate_constructor_implementation(IDL::Interface const& interface)
# include <LibWeb/SVG/@name@.h>
#elif __has_include(<LibWeb/XHR/@name@.h>)
# include <LibWeb/XHR/@name@.h>
+#elif __has_include(<LibWeb/URL/@name@.h>)
+# include <LibWeb/URL/@name@.h>
#endif
// FIXME: This is a total hack until we can figure out the namespace for a given type somehow.
@@ -1504,6 +1508,8 @@ void generate_prototype_implementation(IDL::Interface const& interface)
# include <LibWeb/SVG/@name@.h>
#elif __has_include(<LibWeb/XHR/@name@.h>)
# include <LibWeb/XHR/@name@.h>
+#elif __has_include(<LibWeb/URL/@name@.h>)
+# include <LibWeb/URL/@name@.h>
#endif
// FIXME: This is a total hack until we can figure out the namespace for a given type somehow.
@@ -1512,6 +1518,7 @@ using namespace Web::DOM;
using namespace Web::HTML;
using namespace Web::NavigationTiming;
using namespace Web::XHR;
+using namespace Web::URL;
namespace Web::Bindings {