diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.cpp b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.cpp index 6d99a35008fca5..b3e49dfed3a8aa 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.cpp +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.cpp @@ -29,6 +29,13 @@ TextMeasurement TextLayoutManager::measure( return TextMeasurement{{0, 0}, attachments}; } +TextMeasurement TextLayoutManager::measureCachedSpannableById( + int64_t /*cacheId*/, + const ParagraphAttributes& /*paragraphAttributes*/, + LayoutConstraints /*layoutConstraints*/) const { + return {}; +} + LinesMeasurements TextLayoutManager::measureLines( AttributedString attributedString, ParagraphAttributes paragraphAttributes, diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.h b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.h index 63903786a91b3d..0d323241190fc6 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.h +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.h @@ -42,6 +42,15 @@ class TextLayoutManager { LayoutConstraints layoutConstraints, std::shared_ptr) const; + /** + * Measures an AttributedString on the platform, as identified by some + * opaque cache ID. + */ + virtual TextMeasurement measureCachedSpannableById( + int64_t cacheId, + const ParagraphAttributes& paragraphAttributes, + LayoutConstraints layoutConstraints) const; + /* * Measures lines of `attributedString` using native text rendering * infrastructure.