mirror of
https://github.com/servo/servo
synced 2026-05-11 17:37:21 +02:00
Fixed layout flow tree JSON serialization <!-- Please describe your changes on the following line: --> The second argument for the `emit_struct()` is the number of fields, if given `0`, the output JSON will always be empty. This is used in `./mach run -d -Z trace-layout https://servo.org`, which will dump the layout flow tree into a `layout_trace.json` file for debugging. This also unblocks https://github.com/servo/servo/issues/12675 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] These changes do not require tests because its a debugging tool, not critical for normal code path <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12935) <!-- Reviewable:end -->