mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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
|
@ -50,7 +50,7 @@ use crate::fragment::{
|
|||
};
|
||||
use crate::model::IntrinsicISizesContribution;
|
||||
use crate::traversal::PreorderFlowTraversal;
|
||||
use crate::{layout_debug, layout_debug_scope, text, ServoArc};
|
||||
use crate::{text, ServoArc};
|
||||
|
||||
/// `Line`s are represented as offsets into the child list, rather than
|
||||
/// as an object that "owns" fragments. Choosing a different set of line
|
||||
|
@ -1479,8 +1479,6 @@ impl Flow for InlineFlow {
|
|||
fn bubble_inline_sizes(&mut self) {
|
||||
self.update_restyle_damage();
|
||||
|
||||
let _scope = layout_debug_scope!("inline::bubble_inline_sizes {:x}", self.base.debug_id());
|
||||
|
||||
let writing_mode = self.base.writing_mode;
|
||||
for kid in self.base.child_iter_mut() {
|
||||
kid.mut_base().floats = Floats::new(writing_mode);
|
||||
|
@ -1579,8 +1577,6 @@ impl Flow for InlineFlow {
|
|||
/// 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, _: &LayoutContext) {
|
||||
let _scope = layout_debug_scope!("inline::assign_inline_sizes {:x}", self.base.debug_id());
|
||||
|
||||
// Initialize content fragment inline-sizes if they haven't been initialized already.
|
||||
//
|
||||
// TODO: Combine this with `LineBreaker`'s walk in the fragment list, or put this into
|
||||
|
@ -1623,8 +1619,6 @@ impl Flow for InlineFlow {
|
|||
/// Note that we do not need to do in-order traversal because the children
|
||||
/// are always block formatting context.
|
||||
fn assign_block_size(&mut self, layout_context: &LayoutContext) {
|
||||
let _scope = layout_debug_scope!("inline::assign_block_size {:x}", self.base.debug_id());
|
||||
|
||||
// Divide the fragments into lines.
|
||||
//
|
||||
// TODO(pcwalton, #226): Get the CSS `line-height` property from the
|
||||
|
@ -2044,13 +2038,7 @@ impl Flow for InlineFlow {
|
|||
|
||||
impl fmt::Debug for InlineFlow {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"{:?}({:x}) {:?}",
|
||||
self.class(),
|
||||
self.base.debug_id(),
|
||||
self.base()
|
||||
)
|
||||
write!(f, "{:?} {:?}", self.class(), self.base())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue