Skip to content

Fix crash in view culling when view is unflattened/flattened in deep hierarchy where each node has top offset #51639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

sammy-SC
Copy link
Contributor

Summary:
changelog: [internal]

Fix Crash in View Culling

This diff fixes a crash that occurs when a view is unflattened or flattened in a deep hierarchy where each node has a top offset.

The problem is that nodes passed to calculateShadowViewMutationsFlattener via argument unvisitedOtherNodes have their positions calculated in a different coordinate space and the view culling algorithm does not have the correct data to determine visibility of a node. To fix this, we pass another argument to calculateShadowViewMutationsFlattener which does have original view culling context with which these nodes had their position calculated.

Differential Revision: D75455704

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels May 27, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75455704

sammy-SC added a commit to sammy-SC/react-native that referenced this pull request May 27, 2025
…hierarchy where each node has top offset (facebook#51639)

Summary:

changelog: [internal]



### Fix Crash in View Culling

This diff fixes a crash that occurs when a view is unflattened or flattened in a deep hierarchy where each node has a top offset.

The problem is that nodes passed to *calculateShadowViewMutationsFlattener* via argument *unvisitedOtherNodes* have their positions calculated in a different coordinate space and the view culling algorithm does not have the correct data to determine visibility of a node. To fix this, we pass another argument to *calculateShadowViewMutationsFlattener* which does have original view culling context with which these nodes had their position calculated.

Reviewed By: javache

Differential Revision: D75455704
@sammy-SC sammy-SC force-pushed the export-D75455704 branch from 62b63fd to 7b7df25 Compare May 27, 2025 21:22
sammy-SC added a commit to sammy-SC/react-native that referenced this pull request May 27, 2025
…hierarchy where each node has top offset (facebook#51639)

Summary:

changelog: [internal]



### Fix Crash in View Culling

This diff fixes a crash that occurs when a view is unflattened or flattened in a deep hierarchy where each node has a top offset.

The problem is that nodes passed to *calculateShadowViewMutationsFlattener* via argument *unvisitedOtherNodes* have their positions calculated in a different coordinate space and the view culling algorithm does not have the correct data to determine visibility of a node. To fix this, we pass another argument to *calculateShadowViewMutationsFlattener* which does have original view culling context with which these nodes had their position calculated.

Reviewed By: javache

Differential Revision: D75455704
@sammy-SC sammy-SC force-pushed the export-D75455704 branch from 7b7df25 to ecec444 Compare May 27, 2025 21:26
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75455704

sammy-SC added a commit to sammy-SC/react-native that referenced this pull request May 27, 2025
…hierarchy where each node has top offset (facebook#51639)

Summary:
Pull Request resolved: facebook#51639

changelog: [internal]

### Fix Crash in View Culling

This diff fixes a crash that occurs when a view is unflattened or flattened in a deep hierarchy where each node has a top offset.

The problem is that nodes passed to *calculateShadowViewMutationsFlattener* via argument *unvisitedOtherNodes* have their positions calculated in a different coordinate space and the view culling algorithm does not have the correct data to determine visibility of a node. To fix this, we pass another argument to *calculateShadowViewMutationsFlattener* which does have original view culling context with which these nodes had their position calculated.

Reviewed By: javache

Differential Revision: D75455704
@sammy-SC sammy-SC force-pushed the export-D75455704 branch from ecec444 to 5624d84 Compare May 27, 2025 21:30
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75455704

sammy-SC added a commit to sammy-SC/react-native that referenced this pull request May 27, 2025
…hierarchy where each node has top offset (facebook#51639)

Summary:
Pull Request resolved: facebook#51639

changelog: [internal]

### Fix Crash in View Culling

This diff fixes a crash that occurs when a view is unflattened or flattened in a deep hierarchy where each node has a top offset.

The problem is that nodes passed to *calculateShadowViewMutationsFlattener* via argument *unvisitedOtherNodes* have their positions calculated in a different coordinate space and the view culling algorithm does not have the correct data to determine visibility of a node. To fix this, we pass another argument to *calculateShadowViewMutationsFlattener* which does have original view culling context with which these nodes had their position calculated.

Reviewed By: javache

Differential Revision: D75455704
@sammy-SC sammy-SC force-pushed the export-D75455704 branch 2 times, most recently from fd4bb5a to 142a9c6 Compare May 28, 2025 10:17
sammy-SC added a commit to sammy-SC/react-native that referenced this pull request May 28, 2025
…hierarchy where each node has top offset (facebook#51639)

Summary:

changelog: [internal]



### Fix Crash in View Culling

This diff fixes a crash that occurs when a view is unflattened or flattened in a deep hierarchy where each node has a top offset.

The problem is that nodes passed to *calculateShadowViewMutationsFlattener* via argument *unvisitedOtherNodes* have their positions calculated in a different coordinate space and the view culling algorithm does not have the correct data to determine visibility of a node. To fix this, we pass another argument to *calculateShadowViewMutationsFlattener* which does have original view culling context with which these nodes had their position calculated.

Reviewed By: javache

Differential Revision: D75455704
…hierarchy where each node has top offset (facebook#51639)

Summary:
Pull Request resolved: facebook#51639

changelog: [internal]

### Fix Crash in View Culling

This diff fixes a crash that occurs when a view is unflattened or flattened in a deep hierarchy where each node has a top offset.

The problem is that nodes passed to *calculateShadowViewMutationsFlattener* via argument *unvisitedOtherNodes* have their positions calculated in a different coordinate space and the view culling algorithm does not have the correct data to determine visibility of a node. To fix this, we pass another argument to *calculateShadowViewMutationsFlattener* which does have original view culling context with which these nodes had their position calculated.

Reviewed By: javache

Differential Revision: D75455704
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75455704

@sammy-SC sammy-SC force-pushed the export-D75455704 branch from 142a9c6 to cf91e0c Compare May 28, 2025 10:25
sammy-SC added a commit to sammy-SC/react-native that referenced this pull request May 28, 2025
…hierarchy where each node has top offset (facebook#51639)

Summary:

changelog: [internal]



### Fix Crash in View Culling

This diff fixes a crash that occurs when a view is unflattened or flattened in a deep hierarchy where each node has a top offset.

The problem is that nodes passed to *calculateShadowViewMutationsFlattener* via argument *unvisitedOtherNodes* have their positions calculated in a different coordinate space and the view culling algorithm does not have the correct data to determine visibility of a node. To fix this, we pass another argument to *calculateShadowViewMutationsFlattener* which does have original view culling context with which these nodes had their position calculated.

Reviewed By: javache

Differential Revision: D75455704
sammy-SC added a commit to sammy-SC/react-native that referenced this pull request May 28, 2025
…hierarchy where each node has top offset (facebook#51639)

Summary:

changelog: [internal]



### Fix Crash in View Culling

This diff fixes a crash that occurs when a view is unflattened or flattened in a deep hierarchy where each node has a top offset.

The problem is that nodes passed to *calculateShadowViewMutationsFlattener* via argument *unvisitedOtherNodes* have their positions calculated in a different coordinate space and the view culling algorithm does not have the correct data to determine visibility of a node. To fix this, we pass another argument to *calculateShadowViewMutationsFlattener* which does have original view culling context with which these nodes had their position calculated.

Reviewed By: javache

Differential Revision: D75455704
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 28, 2025
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @sammy-SC in 66730ae

When will my fix make it into a release? | How to file a pick request?

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 66730ae.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants