gecko-dev/layout/reftests/flexbox
Daniel Holbert 732182f0c9 Bug 1461446: Make flex layout explicitly handle integer overflow when summing up flex item hypothetical sizes. r=mats
This patch accomodates for the unfortunate fact that elements with
"table-layout:fixed" have a max-content size of nscoord_MAX (infinity,
effectively), which turns out to be an easy source of integer overflow during
flex layout.

Before this patch, a flex container with "table-layout:fixed" in several flex
items could end up triggering integer-overflow & making the wrong judgement on
its arithmetic to determine...
 - whether a given flex item will fit on an existing flex line.
 - whether we've got positive free space and need to grow our items, or have
   negative free space and need to shrink our items.

This patch makes two changes to fix this issue.

(1) This patch makes us use CheckedInt when summing up flex item hypothetical
    sizes, which prevents integer overflow from flipping the sign of our line's
    total length.

(2) This patch makes us *directly* track the space reserved for flex item
    margin/border/padding within a flex line.  Previously, we tracked this
    implicitly as the difference between two other quantities that we stored;
    but with the other changes in this patch, those two other quantities can
    *both* trigger overflow and get clamped, which would make us lose track of
    how much space to reserve for margin/border/padding.  So now we simply
    track that space-to-reserve directly.

MozReview-Commit-ID: 9izhOnlS4F1

--HG--
extra : rebase_source : 185f2409dcb2f9c5bd0a2466a8e2233d7db3250a
2018-05-25 19:46:29 -07:00
..
pagination Bug 1351548 - Remove reftest-stylo.lists. r=bholley 2017-04-28 11:15:58 +08:00
ahem.css
flexbox-align-content-horizrev-001-ref.xhtml Bug 1433339: Apply single-item fallback behavior for 'space-between' more directly, in flexbox code. r=mats 2018-02-17 16:59:01 -08:00
flexbox-align-content-horizrev-001.xhtml Bug 1433339: Apply single-item fallback behavior for 'space-between' more directly, in flexbox code. r=mats 2018-02-17 16:59:01 -08:00
flexbox-align-content-vertrev-001-ref.xhtml Bug 1433339: Apply single-item fallback behavior for 'space-between' more directly, in flexbox code. r=mats 2018-02-17 16:59:01 -08:00
flexbox-align-content-vertrev-001.xhtml Bug 1433339: Apply single-item fallback behavior for 'space-between' more directly, in flexbox code. r=mats 2018-02-17 16:59:01 -08:00
flexbox-align-self-baseline-horiz-2-ref.xhtml
flexbox-align-self-baseline-horiz-2.xhtml
flexbox-align-self-baseline-horiz-3-ref.xhtml Bug 1357169 - Remove parts of flexbox-align-self-baseline-horiz-3 reftest that are broken by the backout of bug 418833. r=mats 2017-04-03 14:17:40 -04:00
flexbox-align-self-baseline-horiz-3.xhtml Bug 1357169 - Remove parts of flexbox-align-self-baseline-horiz-3 reftest that are broken by the backout of bug 418833. r=mats 2017-04-03 14:17:40 -04:00
flexbox-align-self-baseline-horiz-4-ref.xhtml
flexbox-align-self-baseline-horiz-4.xhtml
flexbox-box-sizing-on-container-horiz-1-ref.html
flexbox-box-sizing-on-container-horiz-1.html
flexbox-box-sizing-on-container-vert-1-ref.html
flexbox-box-sizing-on-container-vert-1.html
flexbox-box-sizing-on-items-horiz-1-ref.html
flexbox-box-sizing-on-items-horiz-1a.html
flexbox-box-sizing-on-items-horiz-1b.html
flexbox-box-sizing-on-items-vert-1-ref.html
flexbox-box-sizing-on-items-vert-1a.html
flexbox-box-sizing-on-items-vert-1b.html
flexbox-dyn-changeFrameWidth-1-iframe.html
flexbox-dyn-changeFrameWidth-1-ref.xhtml
flexbox-dyn-changeFrameWidth-1.xhtml
flexbox-dyn-changeFrameWidth-2-iframe.html
flexbox-dyn-changeFrameWidth-2-ref.xhtml
flexbox-dyn-changeFrameWidth-2.xhtml
flexbox-dyn-changeFrameWidth-3-iframe.html
flexbox-dyn-changeFrameWidth-3-ref.xhtml
flexbox-dyn-changeFrameWidth-3.xhtml
flexbox-dyn-changeFrameWidth-4-iframe.html
flexbox-dyn-changeFrameWidth-4-ref.xhtml
flexbox-dyn-changeFrameWidth-4.xhtml
flexbox-dyn-changeOrder-1-ref.html
flexbox-dyn-changeOrder-1a.html Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
flexbox-dyn-changeOrder-1b.html Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
flexbox-dyn-changePadding-1-ref.xhtml
flexbox-dyn-changePadding-1a.xhtml
flexbox-dyn-changePadding-1b.xhtml
flexbox-dyn-insertAroundDiv-1-ref.xhtml
flexbox-dyn-insertAroundDiv-1.xhtml
flexbox-dyn-insertAroundDiv-2-ref.xhtml
flexbox-dyn-insertAroundDiv-2.xhtml
flexbox-dyn-insertAroundDiv-3-ref.xhtml
flexbox-dyn-insertAroundDiv-3.xhtml
flexbox-dyn-insertAroundSpan-1.xhtml
flexbox-dyn-insertAroundSpan-2.xhtml
flexbox-dyn-insertAroundSpan-3.xhtml
flexbox-dyn-insertAroundText-1-ref.xhtml
flexbox-dyn-insertAroundText-1.xhtml
flexbox-dyn-insertAroundText-2-ref.xhtml
flexbox-dyn-insertAroundText-2.xhtml
flexbox-dyn-insertAroundText-3-ref.xhtml
flexbox-dyn-insertAroundText-3.xhtml
flexbox-dyn-insertEmptySpan-1-ref.xhtml
flexbox-dyn-insertEmptySpan-1.xhtml
flexbox-empty-1-ref.xhtml
flexbox-empty-1a.xhtml
flexbox-empty-1b.xhtml
flexbox-empty-container-synthesized-baseline-001-ref.html Bug 1313811 - [css-flexbox] Tweak reftests due to change in baseline alignment of empty flex containers in inline-level alignment context. 2016-12-20 23:56:34 +01:00
flexbox-empty-container-synthesized-baseline-001.html Bug 1313811 - [css-flexbox] Tweak reftests due to change in baseline alignment of empty flex containers in inline-level alignment context. 2016-12-20 23:56:34 +01:00
flexbox-float-1-ref.xhtml
flexbox-float-1a.xhtml
flexbox-float-1b.xhtml
flexbox-float-1c.xhtml
flexbox-float-1d.xhtml
flexbox-float-2-ref.xhtml
flexbox-float-2a.xhtml
flexbox-float-2b.xhtml
flexbox-inlinecontent-horiz-1-ref.xhtml
flexbox-inlinecontent-horiz-1a.xhtml
flexbox-inlinecontent-horiz-1b.xhtml
flexbox-inlinecontent-horiz-2-ref.xhtml
flexbox-inlinecontent-horiz-2.xhtml
flexbox-inlinecontent-horiz-3-ref.xhtml
flexbox-inlinecontent-horiz-3a.xhtml
flexbox-inlinecontent-horiz-3b.xhtml
flexbox-inlinecontent-horiz-3c.xhtml
flexbox-inlinecontent-horiz-4-ref.xhtml
flexbox-inlinecontent-horiz-4.xhtml
flexbox-inlinecontent-horiz-5-ref.xhtml
flexbox-inlinecontent-horiz-5.xhtml
flexbox-intrinsic-sizing-horiz-1-ref.xhtml
flexbox-intrinsic-sizing-horiz-1a.xhtml
flexbox-intrinsic-sizing-horiz-1b.xhtml
flexbox-intrinsic-sizing-horiz-2-ref.xhtml
flexbox-intrinsic-sizing-horiz-2a.xhtml
flexbox-intrinsic-sizing-horiz-2b.xhtml
flexbox-invalidation-1-ref.html
flexbox-invalidation-1.html Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
flexbox-item-align-self-dynamic-pos-001-ref.html Bug 1405319 part 2 - Reftests. 2017-11-09 03:00:47 +01:00
flexbox-item-align-self-dynamic-pos-001.html Bug 1405319 part 2 - Reftests. 2017-11-09 03:00:47 +01:00
flexbox-item-align-self-dynamic-pos-002-ref.html Bug 1405319 part 2 - Reftests. 2017-11-09 03:00:47 +01:00
flexbox-item-align-self-dynamic-pos-002.html Bug 1405319 part 2 - Reftests. 2017-11-09 03:00:47 +01:00
flexbox-justify-content-horizrev-001-ref.xhtml Bug 1433339: Apply single-item fallback behavior for 'space-between' more directly, in flexbox code. r=mats 2018-02-17 16:59:01 -08:00
flexbox-justify-content-horizrev-001.xhtml Bug 1433339: Apply single-item fallback behavior for 'space-between' more directly, in flexbox code. r=mats 2018-02-17 16:59:01 -08:00
flexbox-justify-content-vertrev-001-ref.xhtml Bug 1433339: Apply single-item fallback behavior for 'space-between' more directly, in flexbox code. r=mats 2018-02-17 16:59:01 -08:00
flexbox-justify-content-vertrev-001.xhtml Bug 1433339: Apply single-item fallback behavior for 'space-between' more directly, in flexbox code. r=mats 2018-02-17 16:59:01 -08:00
flexbox-position-absolute-1-ref.xhtml Bug 1269045 part 3: Stop wrapping placeholder frames in anonymous flex items. r=mats 2016-10-31 08:58:17 -07:00
flexbox-position-absolute-1.xhtml
flexbox-position-absolute-2-ref.xhtml Bug 1269045 part 3: Stop wrapping placeholder frames in anonymous flex items. r=mats 2016-10-31 08:58:17 -07:00
flexbox-position-absolute-2.xhtml Bug 1269045 part 3: Stop wrapping placeholder frames in anonymous flex items. r=mats 2016-10-31 08:58:17 -07:00
flexbox-position-absolute-3-ref.xhtml
flexbox-position-absolute-3.xhtml
flexbox-position-absolute-4-ref.xhtml
flexbox-position-absolute-4.xhtml
flexbox-position-fixed-1-ref.xhtml Bug 1269045 part 3: Stop wrapping placeholder frames in anonymous flex items. r=mats 2016-10-31 08:58:17 -07:00
flexbox-position-fixed-1.xhtml
flexbox-position-fixed-2-ref.xhtml Bug 1269045 part 3: Stop wrapping placeholder frames in anonymous flex items. r=mats 2016-10-31 08:58:17 -07:00
flexbox-position-fixed-2.xhtml Bug 1269045 part 3: Stop wrapping placeholder frames in anonymous flex items. r=mats 2016-10-31 08:58:17 -07:00
flexbox-position-fixed-3-ref.xhtml
flexbox-position-fixed-3.xhtml
flexbox-position-fixed-4-ref.xhtml
flexbox-position-fixed-4.xhtml
flexbox-resizeviewport-1-helper.html
flexbox-resizeviewport-1-ref.xhtml
flexbox-resizeviewport-1.xhtml
flexbox-resizeviewport-2-helper.html Bug 1174003 part 5: [css-flexbox] Remove is-{main,cross}-axis-horizontal checks from ReflowFlexItem. r=mats 2018-02-27 15:40:18 -08:00
flexbox-resizeviewport-2-ref.xhtml Bug 1174003 part 5: [css-flexbox] Remove is-{main,cross}-axis-horizontal checks from ReflowFlexItem. r=mats 2018-02-27 15:40:18 -08:00
flexbox-resizeviewport-2.xhtml Bug 1174003 part 5: [css-flexbox] Remove is-{main,cross}-axis-horizontal checks from ReflowFlexItem. r=mats 2018-02-27 15:40:18 -08:00
flexbox-styling-on-svg-1-ref.svg
flexbox-styling-on-svg-1.svg
flexbox-table-flex-items-1-ref.html Bug 1334403 - Some <caption> size tests for table flex items. 2017-01-29 04:02:59 +01:00
flexbox-table-flex-items-1.html Bug 1334403 - Some <caption> size tests for table flex items. 2017-01-29 04:02:59 +01:00
flexbox-table-flex-items-2-ref.html Bug 1455976: Give table wrapper boxes a special case during flex base size resolution, so that percent main-sizes can be respected. r=mats 2018-04-23 12:05:40 -07:00
flexbox-table-flex-items-2.html Bug 1455976: Give table wrapper boxes a special case during flex base size resolution, so that percent main-sizes can be respected. r=mats 2018-04-23 12:05:40 -07:00
flexbox-table-flex-items-3-ref.html Bug 1455976: Give table wrapper boxes a special case during flex base size resolution, so that percent main-sizes can be respected. r=mats 2018-04-23 12:05:40 -07:00
flexbox-table-flex-items-3.html Bug 1455976: Give table wrapper boxes a special case during flex base size resolution, so that percent main-sizes can be respected. r=mats 2018-04-23 12:05:40 -07:00
flexbox-table-flex-items-4-ref.html Bug 1461446: Make flex layout explicitly handle integer overflow when summing up flex item hypothetical sizes. r=mats 2018-05-25 19:46:29 -07:00
flexbox-table-flex-items-4.html Bug 1461446: Make flex layout explicitly handle integer overflow when summing up flex item hypothetical sizes. r=mats 2018-05-25 19:46:29 -07:00
flexbox-table-flex-items-5-ref.html Bug 1461446: Make flex layout explicitly handle integer overflow when summing up flex item hypothetical sizes. r=mats 2018-05-25 19:46:29 -07:00
flexbox-table-flex-items-5.html Bug 1461446: Make flex layout explicitly handle integer overflow when summing up flex item hypothetical sizes. r=mats 2018-05-25 19:46:29 -07:00
flexbox-widget-flex-items-1-ref.html
flexbox-widget-flex-items-1.html
flexbox-widget-flex-items-2-ref.html
flexbox-widget-flex-items-2.html
flexbox-widget-flex-items-3-ref.html
flexbox-widget-flex-items-3.html
flexbox-widget-flex-items-4-ref.html
flexbox-widget-flex-items-4.html
reftest.list Bug 1461446: Make flex layout explicitly handle integer overflow when summing up flex item hypothetical sizes. r=mats 2018-05-25 19:46:29 -07:00
solidblue.png