Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Differ: ensure all ShadowViews generated by differ have correct Layou…
…tMetrics Summary: While I think this was a very marginal bug with no known issues in the wild, incorrect layout values were sometimes being propagated to certain nodes. This would only occur during complex nested (un)flattening operations and may only impact node consistency, specifically with setting the "previous" ShadowView of mutation instructions, specifically REMOVE and DELETE. Even in rigorous testing I had trouble hitting this case and it didn't seem to impact the "next" values in CREATE, INSERT, or UPDATE. The issue: previously `sliceChildShadowNodeViewPairsV2` assumed that the node it's operating on is a child of a non-flattened view, and the baseline origin is `{0,0}`. You can see when `sliceChildShadowNodeViewPairsRecursivelyV2` is called, a `layoutOffset` is passed in. If we ever got a list of a node that was in a flattened parent by calling `sliceChildShadowNodeViewPairsV2`, we would incorrectly assume that baseline layoutOffset for the node is `0,0`. Now, we store the layoutOffset in the ShadowViewNodePair and can retrieve it when getting child pairs of a node. Changelog: [internal] Reviewed By: sammy-SC Differential Revision: D27759380 fbshipit-source-id: a89756190a1cb377bcc55ff31799c2afbaecdaa9
- Loading branch information