LibWeb: Reuse block-independent intrinsic widths - #11210
Conversation
Canonicalize intrinsic inline-size cache keys across assigned block sizes when a horizontal subtree has no cross-axis dependency. Preserve separate entries for orthogonal flows, aspect-ratio transfers, and wrapping column flex containers. Cache the subtree dependency under the existing intrinsic-size epoch so mutations invalidate it without repeated scans. This avoids thousands of repeated measurement layouts in text-heavy flex content. Cover a column flex item whose intrinsic width changes after its parent resolves the item's block size.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe layout node arena now caches whether inline size depends on block size. The cache uses node generation and intrinsic cache epoch validation. Sequence Diagram(s)sequenceDiagram
participant LayoutTest
participant SizingContext
participant LayoutNodeArena
participant IntrinsicCache
LayoutTest->>SizingContext: request intrinsic inline measurement
SizingContext->>LayoutNodeArena: determine block-size dependency
LayoutNodeArena->>IntrinsicCache: read or compute dependency fact
IntrinsicCache-->>LayoutNodeArena: dependency result
LayoutNodeArena-->>SizingContext: normalized cache key
SizingContext->>IntrinsicCache: lookup or create measurement
IntrinsicCache-->>LayoutTest: computed intrinsic width
Possibly related PRs
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change is merge-ready after normal checks and review; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Canonicalize intrinsic inline-size cache keys across assigned block sizes when a horizontal subtree has no cross-axis dependency. Preserve separate entries for orthogonal flows, aspect-ratio transfers, and wrapping column flex containers.
Cache the subtree dependency under the existing intrinsic-size epoch so mutations invalidate it without repeated scans. This avoids thousands of repeated measurement layouts in text-heavy flex content.