mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Don't clip overflowing Nodes
Summary: As of D3235050, Nodes supports the optimization of removing clipped subviews from the hierarchy. However, because Nodes supports overflow:visible, this could cause issues when DrawCommands overflow the bounds of their parent container. This patch fixes this by not clipping any overflowing Nodes. Reviewed By: astreet Differential Revision: D3235072
This commit is contained in:
@@ -44,16 +44,19 @@ import com.facebook.react.uimanager.UIViewOperationQueue;
|
||||
private final @Nullable DrawCommand[] mDrawCommands;
|
||||
private final @Nullable AttachDetachListener[] mAttachDetachListeners;
|
||||
private final @Nullable NodeRegion[] mNodeRegions;
|
||||
private final boolean mHasOverflowingElements;
|
||||
|
||||
private UpdateMountState(
|
||||
int reactTag,
|
||||
@Nullable DrawCommand[] drawCommands,
|
||||
@Nullable AttachDetachListener[] listeners,
|
||||
@Nullable NodeRegion[] nodeRegions) {
|
||||
@Nullable NodeRegion[] nodeRegions,
|
||||
boolean hasOverflowingElements) {
|
||||
mReactTag = reactTag;
|
||||
mDrawCommands = drawCommands;
|
||||
mAttachDetachListeners = listeners;
|
||||
mNodeRegions = nodeRegions;
|
||||
mHasOverflowingElements = hasOverflowingElements;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,7 +65,8 @@ import com.facebook.react.uimanager.UIViewOperationQueue;
|
||||
mReactTag,
|
||||
mDrawCommands,
|
||||
mAttachDetachListeners,
|
||||
mNodeRegions);
|
||||
mNodeRegions,
|
||||
mHasOverflowingElements);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,8 +238,14 @@ import com.facebook.react.uimanager.UIViewOperationQueue;
|
||||
int reactTag,
|
||||
@Nullable DrawCommand[] drawCommands,
|
||||
@Nullable AttachDetachListener[] listeners,
|
||||
@Nullable NodeRegion[] nodeRegions) {
|
||||
enqueueUIOperation(new UpdateMountState(reactTag, drawCommands, listeners, nodeRegions));
|
||||
@Nullable NodeRegion[] nodeRegions,
|
||||
boolean hasOverflowingElements) {
|
||||
enqueueUIOperation(new UpdateMountState(
|
||||
reactTag,
|
||||
drawCommands,
|
||||
listeners,
|
||||
nodeRegions,
|
||||
hasOverflowingElements));
|
||||
}
|
||||
|
||||
public void enqueueUpdateViewGroup(int reactTag, int[] viewsToAdd, int[] viewsToDetach) {
|
||||
|
||||
Reference in New Issue
Block a user