mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
LibWeb: Generate Window{Constructor,Prototype} from IDL
The Window object is massive, so let's do the conversion to IDL step by step. First up: getting rid of the manual constructor and prototype definitions, which can be generated from an empty `interface Window`.
This commit is contained in:
parent
cdc77407bf
commit
de83f5422d
8 changed files with 7 additions and 151 deletions
|
@ -89,12 +89,6 @@ class @legacy_constructor_class@;)~~~");
|
|||
add_interface(gen, interface.prototype_class, interface.constructor_class, lookup_legacy_constructor(interface));
|
||||
}
|
||||
|
||||
// FIXME: Special case window. We should convert Window to use IDL.
|
||||
{
|
||||
auto gen = generator.fork();
|
||||
add_interface(gen, "WindowPrototype"sv, "WindowConstructor"sv, {});
|
||||
}
|
||||
|
||||
// FIXME: Special case WebAssembly. We should convert WASM to use IDL.
|
||||
{
|
||||
auto gen = generator.fork();
|
||||
|
@ -142,11 +136,6 @@ static ErrorOr<void> generate_intrinsic_definitions(StringView output_path, Vect
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: Special case window. We should convert Window to use IDL.
|
||||
generator.append(R"~~~(
|
||||
#include <LibWeb/Bindings/WindowConstructor.h>
|
||||
#include <LibWeb/Bindings/WindowPrototype.h>)~~~");
|
||||
|
||||
// FIXME: Special case WebAssembly. We should convert WASM to use IDL.
|
||||
generator.append(R"~~~(
|
||||
#include <LibWeb/WebAssembly/WebAssemblyMemoryConstructor.h>
|
||||
|
@ -204,12 +193,6 @@ void Intrinsics::create_web_prototype_and_constructor<@prototype_class@>(JS::Rea
|
|||
add_interface(gen, interface.name, interface.prototype_class, interface.constructor_class, lookup_legacy_constructor(interface));
|
||||
}
|
||||
|
||||
// FIXME: Special case window. We should convert Window to use IDL
|
||||
{
|
||||
auto gen = generator.fork();
|
||||
add_interface(gen, "Window"sv, "WindowPrototype"sv, "WindowConstructor"sv, {});
|
||||
}
|
||||
|
||||
// FIXME: Special case WebAssembly. We should convert WASM to use IDL.
|
||||
{
|
||||
auto gen = generator.fork();
|
||||
|
@ -285,13 +268,6 @@ static ErrorOr<void> generate_exposed_interface_implementation(StringView class_
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: Special case window. We should convert Window to use IDL
|
||||
if (class_name == "Window"sv) {
|
||||
generator.append(R"~~~(#include <LibWeb/Bindings/WindowConstructor.h>
|
||||
#include <LibWeb/Bindings/WindowPrototype.h>
|
||||
)~~~");
|
||||
}
|
||||
|
||||
generator.append(R"~~~(
|
||||
namespace Web::Bindings {
|
||||
|
||||
|
@ -319,12 +295,6 @@ void add_@global_object_snake_name@_exposed_interfaces(JS::Object& global)
|
|||
add_interface(gen, interface.name, interface.prototype_class, lookup_legacy_constructor(interface));
|
||||
}
|
||||
|
||||
// FIXME: Special case window. We should convert Window to use IDL
|
||||
if (class_name == "Window"sv) {
|
||||
auto gen = generator.fork();
|
||||
add_interface(gen, "Window"sv, "WindowPrototype"sv, {});
|
||||
}
|
||||
|
||||
generator.append(R"~~~(
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue