style: Kill -servo-under-display-none.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
Emilio Cobos Álvarez 2017-09-17 00:17:58 +02:00
parent 7d91b30172
commit 2c88248b87
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 8 additions and 43 deletions

View file

@ -249,43 +249,3 @@ ${helpers.single_keyword("image-rendering",
}
}
</%helpers:longhand>
// Used in the bottom-up flow construction traversal to avoid constructing flows for
// descendants of nodes with `display: none`.
<%helpers:longhand name="-servo-under-display-none"
derived_from="display"
products="servo"
animation_value_type="none"
spec="Nonstandard (internal layout use only)">
use std::fmt;
use style_traits::ToCss;
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(Deserialize, HeapSizeOf, Serialize))]
#[derive(Clone, Copy, Debug, Eq, PartialEq, ToComputedValue)]
pub struct SpecifiedValue(pub bool);
pub mod computed_value {
pub type T = super::SpecifiedValue;
}
pub fn get_initial_value() -> computed_value::T {
SpecifiedValue(false)
}
impl ToCss for SpecifiedValue {
fn to_css<W>(&self, _: &mut W) -> fmt::Result where W: fmt::Write {
Ok(()) // Internal property
}
}
#[inline]
pub fn derive_from_display(context: &mut Context) {
use super::display::computed_value::T as Display;
if context.style().get_box().clone_display() == Display::none {
context.builder
.set__servo_under_display_none(SpecifiedValue(true));
}
}
</%helpers:longhand>