mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
LibWeb: Construct the IDL interface prototype chains automatically
Have each IDL prototype trigger the construction of its own prototype.
This commit is contained in:
parent
ee7fa49b88
commit
630cbc947a
Notes:
sideshowbarker
2024-07-18 23:07:32 +09:00
Author: https://github.com/awesomekling
Commit: 630cbc947a
3 changed files with 47 additions and 11 deletions
|
@ -217,13 +217,9 @@
|
|||
#include <LibWeb/Bindings/UIEventConstructor.h>
|
||||
#include <LibWeb/Bindings/UIEventPrototype.h>
|
||||
|
||||
#define ADD_WINDOW_OBJECT_INTERFACE(name) \
|
||||
{ \
|
||||
auto* prototype = heap().allocate<name##Prototype>(*this, *this); \
|
||||
name##Constructor* constructor = nullptr; \
|
||||
add_constructor(#name, constructor, prototype); \
|
||||
set_web_prototype(#name, prototype); \
|
||||
set_web_constructor(#name, constructor); \
|
||||
#define ADD_WINDOW_OBJECT_INTERFACE(name) \
|
||||
{ \
|
||||
ensure_web_constructor<name##Constructor>(#name); \
|
||||
}
|
||||
|
||||
#define ADD_WINDOW_OBJECT_INTERFACES \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue