diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputComponentDescriptor.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputComponentDescriptor.h index dd31d0ba53dca5..f5cb1dbabc850c 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputComponentDescriptor.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputComponentDescriptor.h @@ -80,13 +80,10 @@ class AndroidTextInputComponentDescriptor final auto& textInputShadowNode = static_cast(shadowNode); - // `ParagraphShadowNode` uses `TextLayoutManager` to measure text content + // `TextInputShadowNode` uses `TextLayoutManager` to measure text content // and communicate text rendering metrics to mounting layer. textInputShadowNode.setTextLayoutManager(textLayoutManager_); - textInputShadowNode.setContextContainer( - const_cast(getContextContainer().get())); - int surfaceId = textInputShadowNode.getSurfaceId(); if (surfaceIdToThemePaddingMap_.find(surfaceId) != surfaceIdToThemePaddingMap_.end()) { diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp index e45bca14842a6a..7b856107a786ec 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp @@ -7,10 +7,7 @@ #include "AndroidTextInputShadowNode.h" -#include -#include #include -#include #include #include #include @@ -19,20 +16,10 @@ #include #include -#include - -using namespace facebook::jni; - namespace facebook::react { extern const char AndroidTextInputComponentName[] = "AndroidTextInput"; -void AndroidTextInputShadowNode::setContextContainer( - ContextContainer* contextContainer) { - ensureUnsealed(); - contextContainer_ = contextContainer; -} - AttributedString AndroidTextInputShadowNode::getAttributedString() const { // Use BaseTextShadowNode to get attributed string from children auto childTextAttributes = TextAttributes::defaultTextAttributes(); diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h index c4d3aefae63147..94277f468c6f07 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h @@ -11,11 +11,10 @@ #include "AndroidTextInputProps.h" #include "AndroidTextInputState.h" +#include #include #include -#include - namespace facebook::react { extern const char AndroidTextInputComponentName[]; @@ -40,8 +39,6 @@ class AndroidTextInputShadowNode final using ConcreteViewShadowNode::ConcreteViewShadowNode; - void setContextContainer(ContextContainer* contextContainer); - /* * Returns a `AttributedString` which represents text content of the node. */ @@ -50,8 +47,8 @@ class AndroidTextInputShadowNode final /* * Associates a shared TextLayoutManager with the node. - * `ParagraphShadowNode` uses the manager to measure text content - * and construct `ParagraphState` objects. + * `TextInputShadowNode` uses the manager to measure text content + * and construct `TextInputState` objects. */ void setTextLayoutManager(SharedTextLayoutManager textLayoutManager); @@ -65,8 +62,6 @@ class AndroidTextInputShadowNode final Float baseline(const LayoutContext& layoutContext, Size size) const override; private: - ContextContainer* contextContainer_{}; - /** * Get the most up-to-date attributed string for measurement and State. */