Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Reverts D8666509. Unfortunately, I misunderstood `setClipChildren` on Android. When set on a `ViewGroup`, `setClipChildren` configures whether its //children// — not itself — are clipped to their bounds. This is unlike `overflow` (as it behaves on iOS) which configures whether the view itself is clipped to its bounds. But they are definitely related. In theory, I think we could implement `overflow` using `setClipChildren` by: - Setting `setClipChildren(false)` by default. (This part, I got right.) - When `overflow` is set to `hidden` on a `View`, we create an extra `ViewGroup` (child) within the normal `ViewGroup` (parent). Then, we can set `setClipChildren(true)` on the parent `ViewGroup` which will cause the child `ViewGroup` to be clipped to its bounds. However, I think the tricky thing will be to create the child `ViewGroup` without incurring unintentional side effects. I need to decide whether or not this is worth trying. The alternative is to add a new `clipChildren` boolean prop that is Android-only, but I really hate further bifurcating the platform. But for now, I am reverting my mistake. Reviewed By: achen1 Differential Revision: D8690551 fbshipit-source-id: 1ba3bbcc5458ffbd5c475430ea0382b3fd0916b2
- Loading branch information