[css-grid] Optimize setting GridColTrackSizes/GridRowTrackSizes

NEW
Unassigned

Status

()

Core
Layout
--
enhancement
2 years ago
2 years ago

People

(Reporter: tobytailor, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
There are concerns about performance impacts on setting GridColTrackSizes/GridRowTrackSizes on every reflow. We should only set those frame properties when they are needed.
Flags: needinfo?(mats)
We will have the same problem with the data we want to provide for
the DevTools API (bug 1241932).

Perhaps we can solve it by making the consumers of the data set a bit on
the GridContainerFrame, call FrameNeedsReflow on it, then Flush_Layout.
GridContainerFrame::Reflow can then setup the frame properties only
if requested by those bits.

Then we only pay the price when the data is actually requested,
at the cost of an extra (likely unnecessary) reflow on the first
request.
Depends on: 1241932
Flags: needinfo?(mats)
You need to log in before you can comment on or make changes to this bug.