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

@ -11,6 +11,16 @@
use cssparser::ToCss;
use std::fmt;
use values::LocalToCss;
use values::HasViewportPercentage;
impl HasViewportPercentage for SpecifiedValue {
fn has_viewport_percentage(&self) -> bool {
match *self {
SpecifiedValue::Specified(length) => length.has_viewport_percentage(),
_ => false
}
}
}
#[derive(Debug, Clone, Copy, PartialEq)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
@ -75,6 +85,9 @@
<%helpers:longhand name="column-count" experimental="True" animatable="False">
use cssparser::ToCss;
use std::fmt;
use values::NoViewportPercentage;
impl NoViewportPercentage for SpecifiedValue {}
#[derive(Debug, Clone, Copy, PartialEq)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
@ -144,6 +157,16 @@
use cssparser::ToCss;
use std::fmt;
use values::LocalToCss;
use values::HasViewportPercentage;
impl HasViewportPercentage for SpecifiedValue {
fn has_viewport_percentage(&self) -> bool {
match *self {
SpecifiedValue::Specified(length) => length.has_viewport_percentage(),
_ => false
}
}
}
#[derive(Debug, Clone, Copy, PartialEq)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]