summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
authorcbiesinger <cbiesinger@chromium.org>2015-10-28 15:17:29 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-28 22:18:28 +0000
commit8b2c57bf0ac6c22f5a4d593d326f5f239b7d5808 (patch)
tree14a373786cb40b70c9c04fd272a776ac64c779f7 /sandbox
parent22c213136c48cfc7fedc11d57a7d2509a6cab0a4 (diff)
downloadchromium_src-8b2c57bf0ac6c22f5a4d593d326f5f239b7d5808.zip
chromium_src-8b2c57bf0ac6c22f5a4d593d326f5f239b7d5808.tar.gz
chromium_src-8b2c57bf0ac6c22f5a4d593d326f5f239b7d5808.tar.bz2
[css-flexbox] Fix min-size: auto for a non-auto flex basis
[IF THIS BREAKS ANY CONTENT/CHROME UI: Please do not revert this change. Instead, add "min-width: 0; min-height: 0; to your flex items, which should fix any issues that may occur] In https://codereview.chromium.org/1098593002 I fixed a perf regression in an incorrect way, leading to a correctness in certain circumstances. This patch fixes the correctness issue while still fixing the performance issue, by re-using the cached intrinsic width in most cases. Specifically, the optimization was assuming that we only need to apply min-width: auto if we applied flex-shrink. However, that is not correct. We also need to apply it if we have a flex-basis that's less than the min-content width, for example (most common case) flex-basis: 0. There might be further cases that could lead us to calculate a width less than min-width that I can't think of right now, so this is the safest way to fix this. Local performance data: WITH THIS PATCH: RESULT flexbox-with-stretch-layout: flexbox-with-stretch-layout.html= [15.430194,14.878406,15.044268,15.965514,14.611712] runs/s Avg flexbox-with-stretch-layout: 15.186019runs/s Sd flexbox-with-stretch-layout: 0.527205runs/s BEFORE THIS PATCH: RESULT flexbox-with-stretch-layout: flexbox-with-stretch-layout.html= [12.513922,12.225014,9.769322,10.982909,10.422027] runs/s Avg flexbox-with-stretch-layout: 11.182639runs/s Sd flexbox-with-stretch-layout: 1.169909runs/s BEFORE THE ORIGINAL PERF FIX: RESULT flexbox-with-stretch-layout: flexbox-with-stretch-layout.html= [9.750093,9.870511,9.825113,10.636098,9.464543] runs/s Avg flexbox-with-stretch-layout: 9.909272runs/s Sd flexbox-with-stretch-layout: 0.435885runs/s Adding all potentially related bugs to the BUG list here. I have not verified that all of them are indeed this specific issue. R=leviw@chromium.org BUG=546034,477183,504931,504391,491076 Review URL: https://codereview.chromium.org/1421423005 Cr-Commit-Position: refs/heads/master@{#356667}
Diffstat (limited to 'sandbox')
0 files changed, 0 insertions, 0 deletions