1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00

LibWeb: Add the TextEncoder interface

This is from the Encoding Standard (https://encoding.spec.whatwg.org),
and therefore gets its own namespace and subdirectory within LibWeb :^)
This commit is contained in:
Linus Groh 2021-12-12 18:03:22 +00:00 committed by Andreas Kling
parent 0306cf2030
commit 35d3a1e77b
6 changed files with 69 additions and 1 deletions

View file

@ -807,7 +807,7 @@ int main(int argc, char** argv)
auto interface = IDL::parse_interface(path, data, import_base_path);
if (namespace_.is_one_of("Crypto", "CSS", "DOM", "HTML", "UIEvents", "Geometry", "HighResolutionTime", "IntersectionObserver", "NavigationTiming", "RequestIdleCallback", "ResizeObserver", "SVG", "Selection", "XHR", "URL")) {
if (namespace_.is_one_of("Crypto", "CSS", "DOM", "Encoding", "HTML", "UIEvents", "Geometry", "HighResolutionTime", "IntersectionObserver", "NavigationTiming", "RequestIdleCallback", "ResizeObserver", "SVG", "Selection", "XHR", "URL")) {
StringBuilder builder;
builder.append(namespace_);
builder.append("::");
@ -1452,6 +1452,8 @@ static void generate_header(IDL::Interface const& interface)
# include <LibWeb/CSS/@name@.h>
#elif __has_include(<LibWeb/DOM/@name@.h>)
# include <LibWeb/DOM/@name@.h>
#elif __has_include(<LibWeb/Encoding/@name@.h>)
# include <LibWeb/Encoding/@name@.h>
#elif __has_include(<LibWeb/Geometry/@name@.h>)
# include <LibWeb/Geometry/@name@.h>
#elif __has_include(<LibWeb/HTML/@name@.h>)
@ -2500,6 +2502,8 @@ void generate_constructor_implementation(IDL::Interface const& interface)
# include <LibWeb/CSS/@name@.h>
#elif __has_include(<LibWeb/DOM/@name@.h>)
# include <LibWeb/DOM/@name@.h>
#elif __has_include(<LibWeb/Encoding/@name@.h>)
# include <LibWeb/Encoding/@name@.h>
#elif __has_include(<LibWeb/Geometry/@name@.h>)
# include <LibWeb/Geometry/@name@.h>
#elif __has_include(<LibWeb/HTML/@name@.h>)
@ -2815,6 +2819,8 @@ void generate_prototype_implementation(IDL::Interface const& interface)
# include <LibWeb/CSS/@name@.h>
#elif __has_include(<LibWeb/DOM/@name@.h>)
# include <LibWeb/DOM/@name@.h>
#elif __has_include(<LibWeb/Encoding/@name@.h>)
# include <LibWeb/Encoding/@name@.h>
#elif __has_include(<LibWeb/Geometry/@name@.h>)
# include <LibWeb/Geometry/@name@.h>
#elif __has_include(<LibWeb/HTML/@name@.h>)
@ -3268,6 +3274,8 @@ static void generate_iterator_header(IDL::Interface const& interface)
# include <LibWeb/CSS/@name@.h>
#elif __has_include(<LibWeb/DOM/@name@.h>)
# include <LibWeb/DOM/@name@.h>
#elif __has_include(<LibWeb/Encoding/@name@.h>)
# include <LibWeb/Encoding/@name@.h>
#elif __has_include(<LibWeb/Geometry/@name@.h>)
# include <LibWeb/Geometry/@name@.h>
#elif __has_include(<LibWeb/HTML/@name@.h>)
@ -3456,6 +3464,8 @@ void generate_iterator_prototype_implementation(IDL::Interface const& interface)
# include <LibWeb/CSS/@name@.h>
#elif __has_include(<LibWeb/DOM/@name@.h>)
# include <LibWeb/DOM/@name@.h>
#elif __has_include(<LibWeb/Encoding/@name@.h>)
# include <LibWeb/Encoding/@name@.h>
#elif __has_include(<LibWeb/Geometry/@name@.h>)
# include <LibWeb/Geometry/@name@.h>
#elif __has_include(<LibWeb/HTML/@name@.h>)