Fix text layout cache key for maxFontSizeMultiplier#56960
Fix text layout cache key for maxFontSizeMultiplier#56960KirtiRamchandani wants to merge 1 commit into
Conversation
|
Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Summary:
Text layout measurement cache keys currently consider
fontSizeMultiplierandallowFontScaling, but omitmaxFontSizeMultiplier. When that cap changes, Fabric can reuse a stale measurement even though the effective scaled font size may change.This adds
maxFontSizeMultiplierto the layout-wise text attribute equality and hash helpers, and covers the cache-key behavior with focused C++ tests.Fixes #56921.
Changelog:
[GENERAL] [FIXED] - Include
maxFontSizeMultiplierin Fabric text layout cache keys.Test Plan:
npx --yes clang-format --dry-run --Werror packages/react-native/ReactCommon/react/renderer/textlayoutmanager/tests/TextLayoutManagerTest.cppgit diff --checkI could not run the native gtest target locally from this sparse checkout; the patch adds focused coverage in the existing
TextLayoutManagerTest.cppfile.