Auto merge of #26968 - servo:layout-2020-lazy-content-sizes, r=SimonSapin

Compute content sizes lazily in layout 2020
This commit is contained in:
bors-servo 2020-06-19 13:50:29 -04:00 committed by GitHub
commit 53263595f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 184 additions and 264 deletions

View file

@ -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(),