mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 19:45:12 +00:00
LibWeb: Stop trying to guess include paths in IDL codegen
It turns out we were already generating all the necessary include statements, and we can simply remove all this goofy code soup that uses the C preprocessor to speculatively look for include files.
This commit is contained in:
parent
59778d2b36
commit
2daaa22a15
Notes:
github-actions[bot]
2024-07-26 15:34:20 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/2daaa22a15c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/844
1 changed files with 0 additions and 48 deletions
|
@ -274,11 +274,8 @@ static void generate_include_for_iterator(auto& generator, auto& iterator_path)
|
|||
{
|
||||
auto iterator_generator = generator.fork();
|
||||
iterator_generator.set("iterator_class.path", iterator_path);
|
||||
// FIXME: These may or may not exist, because REASONS.
|
||||
iterator_generator.append(R"~~~(
|
||||
//#if __has_include(<LibWeb/@iterator_class.path@.h>)
|
||||
# include <LibWeb/@iterator_class.path@.h>
|
||||
//#endif
|
||||
)~~~");
|
||||
}
|
||||
|
||||
|
@ -4361,47 +4358,6 @@ void generate_constructor_implementation(IDL::Interface const& interface, String
|
|||
#include <LibWeb/Bindings/@prototype_class@.h>
|
||||
#include <LibWeb/Bindings/ExceptionOrUtils.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#if __has_include(<LibWeb/Animations/@name@.h>)
|
||||
# include <LibWeb/Animations/@name@.h>
|
||||
#elif __has_include(<LibWeb/Crypto/@name@.h>)
|
||||
# include <LibWeb/Crypto/@name@.h>
|
||||
#elif __has_include(<LibWeb/CSS/@name@.h>)
|
||||
# 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/Fetch/@name@.h>)
|
||||
# include <LibWeb/Fetch/@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>)
|
||||
# include <LibWeb/HTML/@name@.h>
|
||||
#elif __has_include(<LibWeb/UIEvents/@name@.h>)
|
||||
# include <LibWeb/UIEvents/@name@.h>
|
||||
#elif __has_include(<LibWeb/HighResolutionTime/@name@.h>)
|
||||
# include <LibWeb/HighResolutionTime/@name@.h>
|
||||
#elif __has_include(<LibWeb/IntersectionObserver/@name@.h>)
|
||||
# include <LibWeb/IntersectionObserver/@name@.h>
|
||||
#elif __has_include(<LibWeb/NavigationTiming/@name@.h>)
|
||||
# include <LibWeb/NavigationTiming/@name@.h>
|
||||
#elif __has_include(<LibWeb/RequestIdleCallback/@name@.h>)
|
||||
# include <LibWeb/RequestIdleCallback/@name@.h>
|
||||
#elif __has_include(<LibWeb/ResizeObserver/@name@.h>)
|
||||
# include <LibWeb/ResizeObserver/@name@.h>
|
||||
#elif __has_include(<LibWeb/SVG/@name@.h>)
|
||||
# include <LibWeb/SVG/@name@.h>
|
||||
#elif __has_include(<LibWeb/Selection/@name@.h>)
|
||||
# include <LibWeb/Selection/@name@.h>
|
||||
#elif __has_include(<LibWeb/WebSockets/@name@.h>)
|
||||
# include <LibWeb/WebSockets/@name@.h>
|
||||
#elif __has_include(<LibWeb/XHR/@name@.h>)
|
||||
# include <LibWeb/XHR/@name@.h>
|
||||
#elif __has_include(<LibWeb/DOMURL/@name@.h>)
|
||||
# include <LibWeb/DOMURL/@name@.h>
|
||||
#endif
|
||||
#include <LibWeb/HTML/WindowProxy.h>
|
||||
#include <LibWeb/WebIDL/AbstractOperations.h>
|
||||
#include <LibWeb/WebIDL/Buffers.h>
|
||||
|
@ -4796,10 +4752,6 @@ void generate_iterator_prototype_implementation(IDL::Interface const& interface,
|
|||
#include <LibWeb/Bindings/ExceptionOrUtils.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/WebIDL/Tracing.h>
|
||||
|
||||
#if __has_include(<LibWeb/@possible_include_path@.h>)
|
||||
# include <LibWeb/@possible_include_path@.h>
|
||||
#endif
|
||||
)~~~");
|
||||
|
||||
emit_includes_for_all_imports(interface, generator, true);
|
||||
|
|
Loading…
Add table
Reference in a new issue