[FlexNG] Lazily calculate the MinMaxSize and IntrinsicBlockSize for flex-items.
This patch introduces variants of: Resolve{Main,Min,Max}{Inline,Block}Length With a callback function to provide the MinMaxSize, or IntrinsicBlockSize as needed. This in instead of logic used by other algorithms via. NeedMinMaxSize et. al. There are pros/cons to this approach: Pro - Much more precise (and easier to maintain) calls to NGBlockNode::ComputeMinMaxSize and NGBlockNode::Layout. Con - Duplicate logic for Resolve*Length. I tried moving Resolve*InlineLength to all being callback based but some other refactoring needs to occur first (mainly an additional ng cache). An alternate version of this patch would be either: 1) A NeedsMinMaxSize / NeedsIntrinsicBlockSize similar to other callers of these functions. 2) Adding the branch before the Resolve*Length calls to check if we need to provide the appropriate argument. Bug: 845235 Change-Id: I8e26e0171adc60a7e3d244af3cb21e119b2653f1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2027075Reviewed-by:Morten Stenshorne <mstensho@chromium.org> Reviewed-by:
David Grogan <dgrogan@chromium.org> Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/master@{#738379}
Showing
This diff is collapsed.
Please register or sign in to comment