Commit 989b3f6
Fix clipToPaddingBox on new Background and Border drawable (#51055)
Summary:
Pull Request resolved: #51055
When clipping to the padding box without a background or border set, we should default to clipping to the drawing rectangle.
This ensures accurate clipping behavior when there is no background or border set. This is because it seems bounds accommodates the contents of the drawables but when no content is present (either a background or a border) the bounds are 0. In which case we want to rely on the drawing rect instead of the bounds for this edge case.
Changelog: [Android][Fixed] - Fix incorrect clip to padding box on new Background and Border drawables
Reviewed By: NickGerleman
Differential Revision: D74014372
fbshipit-source-id: bd5a496db6de44c4185760ed72b3013d9f2faa001 parent d45c041 commit 989b3f6
1 file changed
Lines changed: 7 additions & 2 deletions
File tree
- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
350 | 349 | | |
351 | 350 | | |
352 | 351 | | |
353 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
354 | 359 | | |
355 | 360 | | |
356 | 361 | | |
| |||
0 commit comments