aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/flexbox
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2025-01-15 14:24:14 +0100
committerGitHub <noreply@github.com>2025-01-15 13:24:14 +0000
commite81951a973d39ed5cacb067318e05d0d6a078559 (patch)
treefac08a5c385f1bbea25feaca5be559317c02a3f2 /components/layout_2020/flexbox
parent2cd5e1356c8383935608cc1c719141628d8e21c9 (diff)
downloadservo-e81951a973d39ed5cacb067318e05d0d6a078559.tar.gz
servo-e81951a973d39ed5cacb067318e05d0d6a078559.zip
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>
Diffstat (limited to 'components/layout_2020/flexbox')
-rw-r--r--components/layout_2020/flexbox/geom.rs5
-rw-r--r--components/layout_2020/flexbox/mod.rs10
2 files changed, 5 insertions, 10 deletions
diff --git a/components/layout_2020/flexbox/geom.rs b/components/layout_2020/flexbox/geom.rs
index 9e18561d8bd..6a302e27486 100644
--- a/components/layout_2020/flexbox/geom.rs
+++ b/components/layout_2020/flexbox/geom.rs
@@ -4,7 +4,6 @@
//! <https://drafts.csswg.org/css-flexbox/#box-model>
-use serde::Serialize;
use style::properties::longhands::flex_direction::computed_value::T as FlexDirection;
use crate::geom::{LogicalRect, LogicalSides, LogicalVec2};
@@ -68,7 +67,7 @@ impl<T> FlexRelativeSides<T> {
/// One of the two bits set by the `flex-direction` property
/// (The other is "forward" v.s. reverse.)
-#[derive(Clone, Copy, Debug, PartialEq, Serialize)]
+#[derive(Clone, Copy, Debug, PartialEq)]
pub(super) enum FlexAxis {
/// The main axis is the inline axis of the container (not necessarily of flex items!),
/// cross is block.
@@ -79,7 +78,7 @@ pub(super) enum FlexAxis {
/// Which flow-relative sides map to the main-start and cross-start sides, respectively.
/// See <https://drafts.csswg.org/css-flexbox/#box-model>
-#[derive(Clone, Copy, Debug, Serialize)]
+#[derive(Clone, Copy, Debug)]
pub(super) enum MainStartCrossStart {
InlineStartBlockStart,
InlineStartBlockEnd,
diff --git a/components/layout_2020/flexbox/mod.rs b/components/layout_2020/flexbox/mod.rs
index 06cffac3df9..32c1023214f 100644
--- a/components/layout_2020/flexbox/mod.rs
+++ b/components/layout_2020/flexbox/mod.rs
@@ -4,7 +4,6 @@
use app_units::Au;
use geom::{FlexAxis, MainStartCrossStart};
-use serde::Serialize;
use servo_arc::Arc as ServoArc;
use style::logical_geometry::WritingMode;
use style::properties::longhands::align_items::computed_value::T as AlignItems;
@@ -30,7 +29,7 @@ mod layout;
/// A structure to hold the configuration of a flex container for use during layout
/// and preferred width calculation.
-#[derive(Clone, Debug, Serialize)]
+#[derive(Clone, Debug)]
pub(crate) struct FlexContainerConfig {
container_is_single_line: bool,
writing_mode: WritingMode,
@@ -88,11 +87,10 @@ impl FlexContainerConfig {
}
}
-#[derive(Debug, Serialize)]
+#[derive(Debug)]
pub(crate) struct FlexContainer {
children: Vec<ArcRefCell<FlexLevelBox>>,
- #[serde(skip_serializing)]
style: ServoArc<ComputedValues>,
/// The configuration of this [`FlexContainer`].
@@ -143,16 +141,14 @@ impl FlexContainer {
}
}
-#[derive(Debug, Serialize)]
+#[derive(Debug)]
pub(crate) enum FlexLevelBox {
FlexItem(FlexItemBox),
OutOfFlowAbsolutelyPositionedBox(ArcRefCell<AbsolutelyPositionedBox>),
}
-#[derive(Serialize)]
pub(crate) struct FlexItemBox {
independent_formatting_context: IndependentFormattingContext,
- #[serde(skip)]
block_content_size_cache: ArcRefCell<Option<CachedBlockSizeContribution>>,
}