diff --git a/packages/react-native/React/Modules/RCTUIManager.m b/packages/react-native/React/Modules/RCTUIManager.m index 1a1b1155c3322e..31c12fd22789bb 100644 --- a/packages/react-native/React/Modules/RCTUIManager.m +++ b/packages/react-native/React/Modules/RCTUIManager.m @@ -1384,24 +1384,6 @@ static void RCTMeasureLayout(RCTShadowView *view, RCTShadowView *ancestor, RCTRe RCTMeasureLayout(shadowView, ancestorShadowView, callback); } -/** - * Returns the computed recursive offset layout in a dictionary form. The - * returned values are relative to the `ancestor` shadow view. Returns `nil`, if - * the `ancestor` shadow view is not actually an `ancestor`. Does not touch - * anything on the main UI thread. Invokes supplied callback with (x, y, width, - * height). - */ -RCT_EXPORT_METHOD(measureLayoutRelativeToParent - : (nonnull NSNumber *)reactTag errorCallback - : (__unused RCTResponseSenderBlock)errorCallback callback - : (RCTResponseSenderBlock)callback) -{ - RCTLogWarn( - @"RCTUIManager.measureLayoutRelativeToParent method is deprecated and it will not be implemented in newer versions of RN (Fabric) - T47686450"); - RCTShadowView *shadowView = _shadowViewRegistry[reactTag]; - RCTMeasureLayout(shadowView, shadowView.reactSuperview, callback); -} - /** * JS sets what *it* considers to be the responder. Later, scroll views can use * this in order to determine if scrolling is appropriate. diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index 7cf74483ef6f8b..929b851ac51e81 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -5069,7 +5069,6 @@ public class com/facebook/react/uimanager/UIManagerModule : com/facebook/react/b public fun measure (ILcom/facebook/react/bridge/Callback;)V public fun measureInWindow (ILcom/facebook/react/bridge/Callback;)V public fun measureLayout (IILcom/facebook/react/bridge/Callback;Lcom/facebook/react/bridge/Callback;)V - public fun measureLayoutRelativeToParent (ILcom/facebook/react/bridge/Callback;Lcom/facebook/react/bridge/Callback;)V public fun onBatchComplete ()V public fun onHostDestroy ()V public fun onHostPause ()V diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java index 42b420d0f829ec..09862f765d9de6 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java @@ -525,22 +525,6 @@ public void measureLayout( mUIImplementation.measureLayout(tag, ancestorTag, errorCallback, successCallback); } - /** - * Like {@link #measure} and {@link #measureLayout} but measures relative to the immediate parent. - * - *

NB: Unlike {@link #measure}, this will measure relative to the view layout, not the visible - * window which can cause unexpected results when measuring relative to things like ScrollViews - * that can have offset content on the screen. - * - * @deprecated this method will not be available in FabricUIManager class. - */ - @ReactMethod - @Deprecated - public void measureLayoutRelativeToParent( - int tag, Callback errorCallback, Callback successCallback) { - mUIImplementation.measureLayoutRelativeToParent(tag, errorCallback, successCallback); - } - /** * Find the touch target child native view in the supplied root view hierarchy, given a react * target location.