mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #26968 - servo:layout-2020-lazy-content-sizes, r=SimonSapin
Compute content sizes lazily in layout 2020
This commit is contained in:
commit
53263595f1
11 changed files with 184 additions and 264 deletions
|
@ -75,7 +75,7 @@ where
|
|||
{
|
||||
/// Resolves `auto` values by calling `f`.
|
||||
#[inline]
|
||||
pub fn auto_is(&self, f: impl Fn() -> LengthPercentage) -> LengthPercentage {
|
||||
pub fn auto_is(&self, f: impl FnOnce() -> LengthPercentage) -> LengthPercentage {
|
||||
match self {
|
||||
LengthPercentageOrAuto::LengthPercentage(length) => length.clone(),
|
||||
LengthPercentageOrAuto::Auto => f(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue