Chromium Code Reviews
DescriptionAvoid pathological layout on nested percent height tables
A second go at https://codereview.chromium.org/2670603002.
In the test, the nested percent height tables mean that each cell will get at
least three layouts (LayoutTableRow::layout(),calcRowLogicalHeight(), layoutRows())
during the layout of the section - and this cascades down the tree with the lowest
children getting hundreds of repeated layouts.
This inefficiency has always been there, we've just introduced it for the
percent height situation with crrev.com/2441373002.
To avoid this don't bother computing the height of the section based on row sizes (calcRowLogicalHeight()),
unless the section itself needed a layout - the previously calculated value will do.
The only complication this introduces is: any extra logical height from the
table that we previously discarded when distributing to the rows we will now
try to distribute again. This can change the size of the section and cause extra
paints.
BUG=687061
Review-Url: https://codereview.chromium.org/2701163002
Cr-Commit-Position: refs/heads/master@{#451662}
Committed: https://chromium.googlesource.com/chromium/src/+/a4b3b0ba32356230afd307830442db9a807008ad
Patch Set 1 #
Total comments: 7
Patch Set 2 : bug 687061 #Messages
Total messages: 20 (12 generated)
|