diff options
author | kleines Filmröllchen <filmroellchen@serenityos.org> | 2022-02-04 17:19:22 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-07 18:39:50 +0100 |
commit | 41ef4f11dcd595441e44d03e3bbd5f84f2c4a268 (patch) | |
tree | 95872899f72d7434960f9185daa57d7c49476fd3 /Userland/Libraries/LibGUI/ScrollableContainerWidget.h | |
parent | 1806b297b6d555162b45337fb33552c12337d76d (diff) | |
download | serenity-41ef4f11dcd595441e44d03e3bbd5f84f2c4a268.zip |
LibGUI: Move GML parsing and formatting to new AST
This commit introduces a couple of connected changes that are hard to
untangle, unfortunately:
- Parse GML into the AST instead of JSON
- Change the load_from_json API on Widget to load_from_gml_ast
- Remove this same API from Core::Object as it isn't used outside of
LibGUI and was a workaround for the object registration detection;
by verifying the objects we're getting and casting we can remove this
constraint.
- Format GML by calling the formating APIs on the AST itself; remove
GMLFormatter.cpp as it's not needed anymore.
After this change, GML formatting already respects comments :^)
Diffstat (limited to 'Userland/Libraries/LibGUI/ScrollableContainerWidget.h')
-rw-r--r-- | Userland/Libraries/LibGUI/ScrollableContainerWidget.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/ScrollableContainerWidget.h b/Userland/Libraries/LibGUI/ScrollableContainerWidget.h index 755a0966d6..5fc3f8b0a5 100644 --- a/Userland/Libraries/LibGUI/ScrollableContainerWidget.h +++ b/Userland/Libraries/LibGUI/ScrollableContainerWidget.h @@ -27,7 +27,7 @@ protected: private: void update_widget_size(); void update_widget_position(); - virtual bool load_from_json(const JsonObject&, RefPtr<Core::Object> (*unregistered_child_handler)(const String&)) override; + virtual bool load_from_gml_ast(NonnullRefPtr<GUI::GML::Node> ast, RefPtr<Core::Object> (*unregistered_child_handler)(const String&)) override; ScrollableContainerWidget(); |