NEW 105512
Avoid a second layout of flex items in computeMainAxisPreferredSizes
https://bugs.webkit.org/show_bug.cgi?id=105512
Summary Avoid a second layout of flex items in computeMainAxisPreferredSizes
Carlos Garcia Campos
Reported 2012-12-20 01:47:34 PST
In case of orthogonal flow when the flex basis or min main axis are auto for child, we are laying out the child in computeMainAxisPreferredSizes. If called a second time, we don't need to re-layout the child unless its main axis size is a percentage.
Attachments
Patch (1.94 KB, patch)
2012-12-20 01:49 PST, Carlos Garcia Campos
no flags
Carlos Garcia Campos
Comment 1 2012-12-20 01:49:40 PST
Tony Chang
Comment 2 2012-12-20 10:09:36 PST
It seems like if the flex size is different from the preferred size, during a relayout, you'll use the previous flex size instead of recomputing the preferred size. I'm not sure we have a test case that does this, but we should try to add one. Another idea would be to cache the child's preferred size and if we don't need to relayout the child, we could use the cached preferred size. Not sure how much of a win that really is.
Build Bot
Comment 4 2012-12-20 21:29:42 PST
Comment on attachment 180302 [details] Patch Attachment 180302 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15460195 New failing tests: css3/flexbox/flexitem.html
Carlos Garcia Campos
Comment 5 2012-12-21 06:14:52 PST
Comment on attachment 180302 [details] Patch Clearing flags since the patch is not correct
Note You need to log in before you can comment on or make changes to this bug.