mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: More fine-grained viewport units invalidation
This should speed up window resize significantly. Differential Revision: https://phabricator.services.mozilla.com/D118878
This commit is contained in:
parent
85b7a60a69
commit
25edb3c21b
6 changed files with 88 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
//! `<length>` computed values, and related ones.
|
||||
|
||||
use super::{Context, Number, ToComputedValue};
|
||||
use crate::computed_value_flags::ComputedValueFlags;
|
||||
use crate::values::animated::ToAnimatedValue;
|
||||
use crate::values::computed::NonNegativeNumber;
|
||||
use crate::values::generics::length as generics;
|
||||
|
@ -36,6 +37,7 @@ impl ToComputedValue for specified::NoCalcLength {
|
|||
length.to_computed_value(context, FontBaseSize::CurrentStyle)
|
||||
},
|
||||
specified::NoCalcLength::ViewportPercentage(length) => {
|
||||
context.builder.add_flags(ComputedValueFlags::USES_VIEWPORT_UNITS);
|
||||
length.to_computed_value(context.viewport_size_for_viewport_unit_resolution())
|
||||
},
|
||||
specified::NoCalcLength::ServoCharacterWidth(length) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue