From 4629f2e4ad0640087d48e9e427e117620b09d7e8 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Mon, 13 Sep 2021 00:33:23 +0300 Subject: 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. --- Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Meta/Lagom/Tools') 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 #elif __has_include() # include +#elif __has_include() +# include #endif )~~~"); @@ -1235,6 +1237,8 @@ void generate_constructor_implementation(IDL::Interface const& interface) # include #elif __has_include() # include +#elif __has_include() +# include #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 #elif __has_include() # include +#elif __has_include() +# include #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 { -- cgit v1.2.3