Only restyle viewport-relative nodes on viewport size change

This commit is contained in:
Shing Lyu 2016-06-22 16:44:04 +08:00
parent e7a55ae55e
commit f754cacbd5
28 changed files with 515 additions and 11 deletions

View file

@ -19,6 +19,7 @@ ${helpers.single_keyword("caption-side", "top bottom",
<%helpers:longhand name="border-spacing" animatable="False">
use app_units::Au;
use values::LocalToCss;
use values::HasViewportPercentage;
use cssparser::ToCss;
use std::fmt;
@ -34,6 +35,12 @@ ${helpers.single_keyword("caption-side", "top bottom",
}
}
impl HasViewportPercentage for SpecifiedValue {
fn has_viewport_percentage(&self) -> bool {
return self.horizontal.has_viewport_percentage() || self.vertical.has_viewport_percentage()
}
}
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
pub struct SpecifiedValue {