Repository navigation
Commit 99aefad
Preserve DOMRect special number values (#58241)
Summary:
The shared DOMRect numeric conversion currently defaults every falsy value to zero, replacing valid `NaN` and changing `-0` to `+0`. Default only nullish optional values, otherwise apply normal Number conversion, and cover both read-only construction and mutable setters.
Fixes #58240.
## Changelog:
[GENERAL] [FIXED] - Preserve NaN and signed zero in DOMRect values.
Pull Request resolved: #58241
Test Plan:
- Exact upstream focused regression: 0/2 assertions passed.
- Fixed focused Fantom regression: 2/2 passed.
- Fresh Flow check: 0 errors.
- Targeted no-ignore ESLint, Prettier, and `git diff --check` passed.
Only observably incorrect special-number normalization changes; ordinary and omitted values are unchanged.
Reviewed By: christophpurrer
Differential Revision: D123889534
Pulled By: rubennorte
fbshipit-source-id: 19b6633c2fb9879b2c7927afe662bc9a44196ee61 parent da651fd commit 99aefad
2 files changed
Lines changed: 40 additions & 1 deletion
File tree
- packages/react-native/src/private/webapis/geometry
- __tests__
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments