mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb/Bindings: Resolve inherited interfaces via IDL context
When creating an inheritance stack, look up parent interfaces from the parsed IDL context instead of the current interface's imported modules. This removes a dependency on explicit #import directives during bindings generation.
This commit is contained in:
committed by
Shannon Booth
parent
64736db9e4
commit
e8c221bed4
Notes:
github-actions[bot]
2026-04-23 20:13:19 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/e8c221bed4e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/9054
@@ -3384,15 +3384,12 @@ static Vector<Interface const&> create_an_inheritance_stack(IDL::Interface const
|
||||
auto const* current_interface = &start_interface;
|
||||
while (current_interface && !current_interface->parent_name.is_empty()) {
|
||||
// 1. Let I be that interface.
|
||||
auto imported_interface = find_imported_interface(start_interface, current_interface->parent_name);
|
||||
|
||||
// Inherited interfaces must have their IDL files imported.
|
||||
VERIFY(imported_interface.has_value());
|
||||
auto inhereted_interface = start_interface.context.interfaces.get(current_interface->parent_name);
|
||||
VERIFY(inhereted_interface.has_value());
|
||||
|
||||
// 2. Push I onto stack.
|
||||
inheritance_chain.append(imported_interface.value());
|
||||
|
||||
current_interface = &imported_interface.value();
|
||||
inheritance_chain.append(*inhereted_interface.value());
|
||||
current_interface = inhereted_interface.value();
|
||||
}
|
||||
|
||||
// 4. Return stack.
|
||||
|
||||
Reference in New Issue
Block a user