mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
Only restyle viewport-relative nodes on viewport size change
This commit is contained in:
parent
e7a55ae55e
commit
f754cacbd5
28 changed files with 515 additions and 11 deletions
|
@ -32,6 +32,7 @@ use parser::{ParserContext, ParserContextExtraData, log_css_error};
|
|||
use selectors::matching::DeclarationBlock;
|
||||
use stylesheets::Origin;
|
||||
use values::LocalToCss;
|
||||
use values::HasViewportPercentage;
|
||||
use values::computed::{self, TContext, ToComputedValue};
|
||||
use values::specified::BorderStyle;
|
||||
|
||||
|
@ -825,6 +826,19 @@ impl ToCss for PropertyDeclaration {
|
|||
}
|
||||
}
|
||||
|
||||
impl HasViewportPercentage for PropertyDeclaration {
|
||||
fn has_viewport_percentage(&self) -> bool {
|
||||
match *self {
|
||||
% for property in data.longhands:
|
||||
PropertyDeclaration::${property.camel_case}(DeclaredValue::Value(ref val)) => {
|
||||
val.has_viewport_percentage()
|
||||
},
|
||||
% endfor
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl PropertyDeclaration {
|
||||
pub fn name(&self) -> PropertyDeclarationName {
|
||||
match *self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue