diff --git a/components/style/dom.rs b/components/style/dom.rs index ff36f0dc52a..721625e33a9 100644 --- a/components/style/dom.rs +++ b/components/style/dom.rs @@ -243,24 +243,6 @@ pub trait TNode : Sized + Copy + Clone + Debug + NodeInfo + PartialEq { unsafe fn set_can_be_fragmented(&self, value: bool); } -/// Wrapper to output the ElementData along with the node when formatting for -/// Debug. -pub struct ShowData(pub N); -impl Debug for ShowData { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt_with_data(f, self.0) - } -} - -/// Wrapper to output the primary computed values along with the node when -/// formatting for Debug. This is very verbose. -pub struct ShowDataAndPrimaryValues(pub N); -impl Debug for ShowDataAndPrimaryValues { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt_with_data_and_primary_values(f, self.0) - } -} - /// Wrapper to output the subtree rather than the single node when formatting /// for Debug. pub struct ShowSubtree(pub N); @@ -283,7 +265,9 @@ impl Debug for ShowSubtreeData { /// Wrapper to output the subtree along with the ElementData and primary /// ComputedValues when formatting for Debug. This is extremely verbose. +#[cfg(feature = "servo")] pub struct ShowSubtreeDataAndPrimaryValues(pub N); +#[cfg(feature = "servo")] impl Debug for ShowSubtreeDataAndPrimaryValues { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { writeln!(f, "DOM Subtree:")?; @@ -305,6 +289,7 @@ fn fmt_with_data(f: &mut fmt::Formatter, n: N) -> fmt::Result { } } +#[cfg(feature = "servo")] fn fmt_with_data_and_primary_values(f: &mut fmt::Formatter, n: N) -> fmt::Result { if let Some(el) = n.as_element() { let dd = el.has_dirty_descendants(); diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 243759a7f89..32df616e3bf 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -71,7 +71,6 @@ pub mod style_structs { /// FIXME(emilio): This is completely duplicated with the other properties code. pub type ComputedValuesInner = ::gecko_bindings::structs::ServoComputedData; -#[derive(Debug)] #[repr(C)] pub struct ComputedValues(::gecko_bindings::structs::mozilla::ServoStyleContext);