1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:57:44 +00:00

LibWeb: Cache flex item main sizes to avoid relayout during same cycle

This makes twitter.com actually load & render (although not very well.)
This commit is contained in:
Andreas Kling 2022-07-06 00:21:37 +02:00
parent 8733fbae76
commit d2b7d2440f
2 changed files with 12 additions and 1 deletions

View file

@ -107,6 +107,8 @@ struct FormattingState {
};
HashMap<NodeWithStyleAndBoxModelMetrics const*, IntrinsicSizes> mutable intrinsic_sizes;
HashMap<Box const*, float> mutable flex_item_size_cache;
FormattingState const* m_parent { nullptr };
FormattingState const& m_root;
};