aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/table/layout.rs
diff options
context:
space:
mode:
authorDelan Azabani <dazabani@igalia.com>2024-10-16 18:24:24 +0800
committerGitHub <noreply@github.com>2024-10-16 10:24:24 +0000
commitfa1f7e5839a35019d5ac2f105a45b555292b74fd (patch)
tree10725cd46d2c49d09cce022f6fda6c50016295f9 /components/layout_2020/table/layout.rs
parent103d3aa7bb6341957c31a1aae4f925068e39e951 (diff)
downloadservo-fa1f7e5839a35019d5ac2f105a45b555292b74fd.tar.gz
servo-fa1f7e5839a35019d5ac2f105a45b555292b74fd.zip
Gate all use of `tracing` behind Cargo feature (#33845)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
Diffstat (limited to 'components/layout_2020/table/layout.rs')
-rw-r--r--components/layout_2020/table/layout.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/components/layout_2020/table/layout.rs b/components/layout_2020/table/layout.rs
index 5ce34111ef7..455e0e3d25d 100644
--- a/components/layout_2020/table/layout.rs
+++ b/components/layout_2020/table/layout.rs
@@ -24,7 +24,6 @@ use style::values::computed::{
use style::values::generics::box_::{GenericVerticalAlign as VerticalAlign, VerticalAlignKeyword};
use style::values::generics::length::GenericLengthPercentageOrAuto::{Auto, LengthPercentage};
use style::Zero;
-use tracing::instrument;
use super::{Table, TableCaption, TableSlot, TableSlotCell, TableTrack, TableTrackGroup};
use crate::context::LayoutContext;
@@ -1634,7 +1633,10 @@ impl<'a> TableLayout<'a> {
/// Lay out the table (grid and captions) of this [`TableLayout`] into fragments. This should
/// only be be called after calling [`TableLayout.compute_measures`].
- #[instrument(name = "Table::layout", skip_all, fields(servo_profiling = true))]
+ #[cfg_attr(
+ feature = "tracing",
+ tracing::instrument(name = "Table::layout", skip_all, fields(servo_profiling = true))
+ )]
fn layout(
mut self,
layout_context: &LayoutContext,
@@ -2606,10 +2608,13 @@ impl Table {
}
}
- #[instrument(
- name = "Table::inline_content_sizes",
- skip_all,
- fields(servo_profiling = true)
+ #[cfg_attr(
+ feature = "tracing",
+ tracing::instrument(
+ name = "Table::inline_content_sizes",
+ skip_all,
+ fields(servo_profiling = true)
+ )
)]
pub(crate) fn inline_content_sizes(
&mut self,