mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 18:37:58 +03:00
4143f6f906
Previously this section of code would blindly add *anything* as a child as long as it has been registered as an object. Since there is no guarentee that those objects are, in fact, Widgets, this feels like a logical fallacy. For example, up until this change, this is perfectly valid GML: ``` @GUI::Widget { layout: @GUI::VerticalBoxLayout { } @GUI::VerticalBoxLayout { } } ``` What exactly does it do? Who knows! It doesn't seem to *break*, but I think we can all agree it shouldn't be valid. Instead, we now actually verify that the registered class inherets from GUI::Widget before adding it as a child. We also error if it's not, which should hopefully help new GML writers from forgetting to write 'layout: ' before the layout definition and being confused as to why it's not working. |
||
---|---|---|
.. | ||
Applets | ||
Applications | ||
Demos | ||
DevTools | ||
DynamicLoader | ||
Games | ||
Libraries | ||
Services | ||
Shell | ||
Utilities | ||
CMakeLists.txt |