Closed Bug 1597348 Opened 4 months ago Closed 4 months ago

Purge interrupted flex items' cached measurements during the same frametree-walk that we use to mark their ancestors as dirty

Categories

(Core :: Layout: Flexbox, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Right now, if some flex item gets interrupted via interruptible reflow, we purge all of the flex-item-measurements for its flex container (i.e. we purge all of its siblings' measurements). This may be unnecessary, e.g. if only the last item was interrupted.

We can do this cache-purging more surgically by doing it in the same frametree-walk where we mark the interrupted frame's ancestors as having a dirty child. We should purge any cached-flex-measurement for the interrupted frame and for all of its ancestors that are flex items. (That should be all the cache-purging that's necessary.)

This means we no longer have any use for the frame state bit
"NS_STATE_FLEX_MEASUREMENTS_INTERRUPTED". Now, if a flex container
has N children and only the last child is interrupted, we'll only
purge the last child's measurement (and we'll do it promptly at the
end of the whole interrupted reflow).

Depends on D53670

Patch is still rebuilding locally [frame state bit creation/destruction invalidates the whole build], so not requesting review yet.

But feel free to take a look if you like; I think this is approximately ready for review. :)

Attachment #9109737 - Attachment description: Bug 1597348: When reflow is interrupted, purge flex items' cached measurements during the same traversal that we use to mark ancestor-chain as dirty. → Bug 1597348: When reflow is interrupted, purge flex items' cached measurements during the same traversal that we use to mark ancestor-chain as dirty. r?emilio
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3ec96c0dd696
When reflow is interrupted, purge flex items' cached measurements during the same traversal that we use to mark ancestor-chain as dirty. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.