Bug 249024 - [css-grid] Clean up management of masonry items
Summary: [css-grid] Clean up management of masonry items
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-09 09:05 PST by Sammy Gill
Modified: 2022-12-09 09:06 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sammy Gill 2022-12-09 09:05:59 PST
During the initial steps of masonry, we iterate over all the grid items and separate them into different structures to use in different parts of the algorithm. There are 2 main things that can be done to improve the quality of the code:

1.) Instead of storing the items using raw pointers, we should use WeakPtrs/CheckPtrs or std::reference_wrapper 
2.) At the end of the layout we should probably clear these collections so it is obvious we intend not to use them after layout
Comment 1 Radar WebKit Bug Importer 2022-12-09 09:06:16 PST
<rdar://problem/103182671>