1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

Ladybird: Specify window size in layout dump mode

This commit is contained in:
Aliaksandr Kalenik 2023-01-30 23:38:19 +03:00 committed by Andreas Kling
parent e249d751c8
commit 12eca612bc
4 changed files with 14 additions and 6 deletions

View file

@ -88,6 +88,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (dump_layout_tree) {
WebContentView view({});
view.set_viewport_rect(Gfx::IntRect({}, { 800, 600 }));
view.on_load_finish = [&](auto&) {
auto dump = view.dump_layout_tree().release_value_but_fixme_should_propagate_errors();
outln("{}", dump);