layout: Remove the obsolete layout tracing functionality (#35001)

There were two kinds of layout tracing controlled by the same debugging
option:

 - modern layout: Functionality that dumped a JSON serialization of the
   layout tree before and after layout.
 - legacy layout: A scope based tracing that reported the process of
   layout in a structured way.

I don't think anyone working on layout is using either of these two
features. For modern layout requiring data structure to implement
`serde` serialization is incredibly inconvenient and also generates a
lot of extra code.

We also have a more modern tracing functionality based on perfetto that
we have started to use for layout and IMO it's actually being used and
more robust.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-01-15 14:24:14 +01:00 committed by GitHub
parent 2cd5e1356c
commit e81951a973
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 64 additions and 675 deletions

View file

@ -41,7 +41,6 @@ use crate::table_row::{
TableRowSizeData,
};
use crate::table_wrapper::TableLayout;
use crate::{layout_debug, layout_debug_scope};
#[allow(unsafe_code)]
unsafe impl crate::flow::HasBaseFlow for TableFlow {}
@ -292,11 +291,6 @@ impl Flow for TableFlow {
/// The maximum min/pref inline-sizes of each column are set from the rows for the automatic
/// table layout calculation.
fn bubble_inline_sizes(&mut self) {
let _scope = layout_debug_scope!(
"table::bubble_inline_sizes {:x}",
self.block_flow.base.debug_id()
);
// Get column inline sizes from colgroups
for kid in self
.block_flow
@ -415,10 +409,6 @@ impl Flow for TableFlow {
/// Recursively (top-down) determines the actual inline-size of child contexts and fragments.
/// When called on this context, the context has had its inline-size set by the parent context.
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
let _scope = layout_debug_scope!(
"table::assign_inline_sizes {:x}",
self.block_flow.base.debug_id()
);
debug!(
"assign_inline_sizes({}): assigning inline_size for flow",
"table"