From 37f012c04ed46aa6c85fca7efc5476434188c357 Mon Sep 17 00:00:00 2001 From: empyrical Date: Mon, 10 Feb 2020 04:12:48 -0800 Subject: [PATCH] Fabric: Fix CXX Stub for TextLayoutManager (#27948) Summary: This pull request fixes the CXX stub for `TextLayoutManager`. The signature for `TextLayoutManager::measure` changed slightly, and this patch updates the stub to reflect that. ## Changelog [Internal] [Fixed] - Fabric: Fix CXX Stub for TextLayoutManager Pull Request resolved: https://github.com/facebook/react-native/pull/27948 Test Plan: Fabric compiles, and the Fabric test suite passes. Reviewed By: shergin Differential Revision: D19788207 Pulled By: sammy-SC fbshipit-source-id: 8f42cca0be99022b038742728ad4fec6c04d5cf0 --- .../textlayoutmanager/platform/cxx/TextLayoutManager.cpp | 2 +- .../textlayoutmanager/platform/cxx/TextLayoutManager.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ReactCommon/fabric/textlayoutmanager/platform/cxx/TextLayoutManager.cpp b/ReactCommon/fabric/textlayoutmanager/platform/cxx/TextLayoutManager.cpp index b45409ee87e..d48c788fdd0 100644 --- a/ReactCommon/fabric/textlayoutmanager/platform/cxx/TextLayoutManager.cpp +++ b/ReactCommon/fabric/textlayoutmanager/platform/cxx/TextLayoutManager.cpp @@ -17,7 +17,7 @@ void *TextLayoutManager::getNativeTextLayoutManager() const { } Size TextLayoutManager::measure( - AttributedString attributedString, + AttributedStringBox attributedStringBox, ParagraphAttributes paragraphAttributes, LayoutConstraints layoutConstraints) const { return Size{0, 0}; diff --git a/ReactCommon/fabric/textlayoutmanager/platform/cxx/TextLayoutManager.h b/ReactCommon/fabric/textlayoutmanager/platform/cxx/TextLayoutManager.h index 87bd311838a..c4cd7a8318f 100644 --- a/ReactCommon/fabric/textlayoutmanager/platform/cxx/TextLayoutManager.h +++ b/ReactCommon/fabric/textlayoutmanager/platform/cxx/TextLayoutManager.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -31,10 +32,10 @@ class TextLayoutManager { ~TextLayoutManager(); /* - * Measures `attributedString` using native text rendering infrastructure. + * Measures `attributedStringBox` using native text rendering infrastructure. */ Size measure( - AttributedString attributedString, + AttributedStringBox attributedStringBox, ParagraphAttributes paragraphAttributes, LayoutConstraints layoutConstraints) const;