1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:07:35 +00:00

LibWeb: Introduce Blob

This commit is contained in:
Kenneth Myhra 2022-07-10 18:31:17 +02:00 committed by Linus Groh
parent 0153514314
commit df8c49f6bf
9 changed files with 299 additions and 1 deletions

View file

@ -54,6 +54,8 @@ static bool is_wrappable_type(Type const& type)
return true;
if (type.name == "URLSearchParams")
return true;
if (type.name == "Blob")
return true;
return false;
}
@ -1973,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::FileAPI;
using namespace Web::Geometry;
using namespace Web::HTML;
using namespace Web::IntersectionObserver;
@ -2849,6 +2852,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/FileAPI/@name@.h>)
# include <LibWeb/FileAPI/@name@.h>
#elif __has_include(<LibWeb/Geometry/@name@.h>)
# include <LibWeb/Geometry/@name@.h>
#elif __has_include(<LibWeb/HTML/@name@.h>)
@ -2889,6 +2894,7 @@ void generate_constructor_implementation(IDL::Interface const& interface)
using namespace Web::CSS;
using namespace Web::DOM;
using namespace Web::DOMParsing;
using namespace Web::FileAPI;
using namespace Web::Geometry;
using namespace Web::HTML;
using namespace Web::IntersectionObserver;
@ -3167,6 +3173,7 @@ using namespace Web::Crypto;
using namespace Web::CSS;
using namespace Web::DOM;
using namespace Web::DOMParsing;
using namespace Web::FileAPI;
using namespace Web::Geometry;
using namespace Web::HTML;
using namespace Web::IntersectionObserver;
@ -3617,6 +3624,7 @@ void generate_iterator_implementation(IDL::Interface const& interface)
using namespace Web::CSS;
using namespace Web::DOM;
using namespace Web::DOMParsing;
using namespace Web::FileAPI;
using namespace Web::Geometry;
using namespace Web::HTML;
using namespace Web::IntersectionObserver;
@ -3731,6 +3739,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::FileAPI;
using namespace Web::Geometry;
using namespace Web::HTML;
using namespace Web::IntersectionObserver;

View file

@ -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", "HTML", "UIEvents", "Geometry", "HighResolutionTime", "IntersectionObserver", "NavigationTiming", "RequestIdleCallback", "ResizeObserver", "SVG", "Selection", "URL", "WebGL", "WebSockets", "XHR")) {
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")) {
StringBuilder builder;
builder.append(namespace_);
builder.append("::"sv);