mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-09 22:50:21 +08:00
Summary: The bug occurs for the cases when there is a nested view structure of at least two views with removeClippedSubvews enabled and with a "collapsable" view in between them that migrates from the collapsed state to non-collapsed state. What happens in that case is that the "inner" view with "removeClippsedSubviews" gets reattached to a new parent, but we never update it's clipping rect because the update is currently only triggered for the size change (and for scroll change in case of scrollview). In the case when the view was doing some "clipping" when attached to its previous parent it needs to update its "clipping" status because the parent has change and clipping rect is calculated based on the parent clipping rect (see `ReactClippingViewGroupHelper#calculateClippingRect`). This change triggers `updateClippingRect` when the view is attached to the window, which covers the case when it's reattached from one parent to the other. Closes https://github.com/facebook/react-native/pull/5692 Reviewed By: svcscm Differential Revision: D2893304 Pulled By: foghina fb-gh-sync-id: a94ab3674adf9e496fc86dca5a430a91117f2c83