mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
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:
parent
2cd5e1356c
commit
e81951a973
45 changed files with 64 additions and 675 deletions
|
@ -6,7 +6,6 @@ use std::vec::IntoIter;
|
|||
|
||||
use app_units::Au;
|
||||
use fonts::FontMetrics;
|
||||
use serde::Serialize;
|
||||
use servo_arc::Arc;
|
||||
use style::properties::ComputedValues;
|
||||
|
||||
|
@ -19,10 +18,9 @@ use crate::fragment_tree::BaseFragmentInfo;
|
|||
use crate::style_ext::{ComputedValuesExt, PaddingBorderMargin};
|
||||
use crate::ContainingBlock;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct InlineBox {
|
||||
pub base_fragment_info: BaseFragmentInfo,
|
||||
#[serde(skip_serializing)]
|
||||
pub style: Arc<ComputedValues>,
|
||||
/// The identifier of this inline box in the containing [`super::InlineFormattingContext`].
|
||||
pub(super) identifier: InlineBoxIdentifier,
|
||||
|
@ -56,7 +54,7 @@ impl InlineBox {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Serialize)]
|
||||
#[derive(Debug, Default)]
|
||||
pub(crate) struct InlineBoxes {
|
||||
/// A collection of all inline boxes in a particular [`super::InlineFormattingContext`].
|
||||
inline_boxes: Vec<ArcRefCell<InlineBox>>,
|
||||
|
@ -158,7 +156,7 @@ impl InlineBoxes {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub(super) enum InlineBoxTreePathToken {
|
||||
Start(InlineBoxIdentifier),
|
||||
End(InlineBoxIdentifier),
|
||||
|
@ -179,7 +177,7 @@ impl InlineBoxTreePathToken {
|
|||
/// [`u32`] is used for the index, in order to save space. The value refers to the token
|
||||
/// in the start tree data structure which can be fetched to find the actual index of
|
||||
/// of the [`InlineBox`] in [`InlineBoxes::inline_boxes`].
|
||||
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
|
||||
pub(crate) struct InlineBoxIdentifier {
|
||||
pub index_of_start_in_tree: u32,
|
||||
pub index_in_inline_boxes: u32,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue