Commit 46df371
committed
Fix percentage min/max on flex items resolving against wrong ancestor
Percentage min-width/max-width/min-height/max-height on flex items
resolved against the grandparent's owner size instead of the parent
container's inner size. This is because boundAxisWithinMinAndMax()
received mainAxisOwnerSize (the parent's parent) rather than
availableInnerMainDim (the parent's inner content area) at three
call sites.
The fix is gated behind a new errata flag,
FlexItemPercentMinMaxAgainstOwner, so consumers using Classic or All
errata (e.g. React Native) automatically preserve the old behavior.
Default (Errata::None) now produces correct W3C-conformant results.
Fixes #8721 parent 0a2398d commit 46df371
13 files changed
Lines changed: 2324 additions & 1439 deletions
File tree
- gentest/fixtures
- javascript
- src/generated
- tests/generated
- java
- com/facebook/yoga
- tests/generated/com/facebook/yoga
- tests
- generated
- yoga
- algorithm
- enums
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
0 commit comments