mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Derive HasViewportPercentage 🍷
This commit is contained in:
parent
d1e31f7aa4
commit
90bae7f802
27 changed files with 202 additions and 452 deletions
|
@ -81,13 +81,6 @@
|
|||
use values::HasViewportPercentage;
|
||||
use style_traits::ToCss;
|
||||
|
||||
impl HasViewportPercentage for SpecifiedValue {
|
||||
fn has_viewport_percentage(&self) -> bool {
|
||||
let &SpecifiedValue(ref vec) = self;
|
||||
vec.iter().any(|ref x| x.has_viewport_percentage())
|
||||
}
|
||||
}
|
||||
|
||||
pub mod single_value {
|
||||
use cssparser::Parser;
|
||||
use parser::{Parse, ParserContext};
|
||||
|
@ -168,7 +161,7 @@
|
|||
}
|
||||
|
||||
/// The specified value of ${name}.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Clone, Debug, HasViewportPercentage, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub struct SpecifiedValue(pub Vec<single_value::SpecifiedValue>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue