[css-flexbox] Do not use margins when computing aspect ratio cross sizes
Created attachment 418880 [details] Patch
<rdar://problem/74097534>
Comment on attachment 418880 [details] Patch View in context: https://b.webkit.org/attachment.cgi?id=418880&action=review > Source/WebCore/rendering/RenderFlexibleBox.cpp:789 > + crossSize = adjustForBoxSizing(*this, containerCrossSizeLength) - crossAxisMarginExtentForChild(child); What should we do if the box-sizing is 0 ? Do we have tests for that case ?
Comment on attachment 418880 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=418880&action=review >> Source/WebCore/rendering/RenderFlexibleBox.cpp:789 >> + crossSize = adjustForBoxSizing(*this, containerCrossSizeLength) - crossAxisMarginExtentForChild(child); > > What should we do if the box-sizing is 0 ? Do we have tests for that case ? You mean when the difference is negative? Perhaps we should clamp it indeed
Created attachment 428368 [details] Patch
Comment on attachment 418880 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=418880&action=review >>> Source/WebCore/rendering/RenderFlexibleBox.cpp:789 >>> + crossSize = adjustForBoxSizing(*this, containerCrossSizeLength) - crossAxisMarginExtentForChild(child); >> >> What should we do if the box-sizing is 0 ? Do we have tests for that case ? > > You mean when the difference is negative? Perhaps we should clamp it indeed I've added clamping in the last version of the patch along with a couple of extra test cases imported from WPT to increase coverage of the cases you mentioned.
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment on attachment 428368 [details] Patch r=me
Committed r277371 (237629@main): <https://commits.webkit.org/237629@main>