From 45904c866882f136edde55df2fe453327057d387 Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Thu, 18 Jun 2026 00:39:38 -0700 Subject: [PATCH] Fix Fabric reusing nodes with a stale font scale (#57246) Summary: Fixes https://github.com/react/react-native/issues/52895 The original solution to this issue approached this by comparing the font scale used to lay out respective root nodes and re-cloning measurable nodes in the entire tree when it was different. This didn't work when a node within the tree was cloned from a node with an obsolete font scale stored (with root having the correct one). The new node would use the obsolete value in that pass. This PR changes this approach - instead of comparing font scale in `SurfaceHandler::constraintLayout` (only when it changes), it moves the comparison to happen as part of `configureYogaTree`, similarly to `pointScaleFactor`. This way, nodes with an obsolete value stored get re-cloned using the correct one on each commit instead of only on the first one. ## Changelog: [GENERAL][FIXED] - Fixed Fabric reusing nodes with a stale font scale Pull Request resolved: https://github.com/react/react-native/pull/57246 Test Plan: Issue reproducer ||Before|After| |-|-|-| |Android|