A framework for building native applications using React
Support clipping to children everywhere using ReactViewBackgroundManager (#44734)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44734 Fixes https://github.com/facebook/react-native/issues/44671 This integrates functionality for clipping content to padding box into `ReactViewBackgroundManager`, to be shared between several ViewManagers. In practice, this means: 1. `overflow: hidden` now works on `Text` and `TextInput` 2. ScrollView children are now clipped to the interior of borders, included curved ones via borderRadius This will be made more generic, then start being used in ReactViewGroup, and eventually ReactImage. That abstraction will then hide away extra background management we will use for shadows. Different places in code currently do clipping in any of `draw()`, `onDraw()`, or `dispatchDraw()`. The distinction between these, is that `draw()` allows code to run before drawing background even, `onDraw()` is invoked before drawing foreground, and `dispatchDraw()` is before drawing children. We don't want to clip out borders/shadows, but do want to clip foreground content like text, so I used `onDraw()` here. Changelog: [Android][Fixed] - Better overflow support for ScrollView, Text, TextInput Reviewed By: rozele Differential Revision: D57953429 fbshipit-source-id: ca3b788deb4b32706df7db958877d18f525c039c
N
Nick Gerleman committed
bfb3b7008d3e83400154b0348e7ab680ee06aa8c
Parent: c9d7774
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 6/11/2024, 11:13:28 PM