diff --git a/ReactCommon/fabric/core/layout/LayoutableShadowNode.cpp b/ReactCommon/fabric/core/layout/LayoutableShadowNode.cpp index a23a6de045c..2108fd38263 100644 --- a/ReactCommon/fabric/core/layout/LayoutableShadowNode.cpp +++ b/ReactCommon/fabric/core/layout/LayoutableShadowNode.cpp @@ -57,7 +57,7 @@ static LayoutMetrics calculateOffsetForLayoutMetrics( auto origin = layoutableCurrentShadowNode->getLayoutMetrics().frame.origin; - if (policy.includeTransform || policy.includeScrollViewContentOffset) { + if (policy.includeTransform) { // The check for ScrollView will be implemented after we have // a dedicated trait (part of `ShadowNodeTraits`) for that. origin = origin * layoutableCurrentShadowNode->getTransform(); diff --git a/ReactCommon/fabric/core/layout/LayoutableShadowNode.h b/ReactCommon/fabric/core/layout/LayoutableShadowNode.h index 6c64dad40b4..53513285223 100644 --- a/ReactCommon/fabric/core/layout/LayoutableShadowNode.h +++ b/ReactCommon/fabric/core/layout/LayoutableShadowNode.h @@ -46,7 +46,6 @@ class LayoutableShadowNode : public ShadowNode { class LayoutInspectingPolicy final { public: bool includeTransform{true}; - bool includeScrollViewContentOffset{true}; }; using UnsharedList = better:: diff --git a/ReactCommon/fabric/uimanager/UIManagerBinding.cpp b/ReactCommon/fabric/uimanager/UIManagerBinding.cpp index c300bcc828b..981a165bc66 100644 --- a/ReactCommon/fabric/uimanager/UIManagerBinding.cpp +++ b/ReactCommon/fabric/uimanager/UIManagerBinding.cpp @@ -454,8 +454,7 @@ jsi::Value UIManagerBinding::get( auto layoutMetrics = uiManager->getRelativeLayoutMetrics( *shadowNodeFromValue(runtime, arguments[0]), shadowNodeFromValue(runtime, arguments[1]).get(), - {/* .includeTransform = */ true, - /* .includeScrollViewContentOffset = */ true}); + {/* .includeTransform = */ true}); auto frame = layoutMetrics.frame; auto result = jsi::Object(runtime); result.setProperty(runtime, "left", frame.origin.x); @@ -499,8 +498,7 @@ jsi::Value UIManagerBinding::get( auto layoutMetrics = uiManager->getRelativeLayoutMetrics( *shadowNodeFromValue(runtime, arguments[0]), shadowNodeFromValue(runtime, arguments[1]).get(), - {/* .includeTransform = */ false, - /* .includeScrollViewContentOffset = */ false}); + {/* .includeTransform = */ false}); if (layoutMetrics == EmptyLayoutMetrics) { auto onFailFunction = @@ -536,8 +534,7 @@ jsi::Value UIManagerBinding::get( auto layoutMetrics = uiManager->getRelativeLayoutMetrics( *shadowNodeFromValue(runtime, arguments[0]), nullptr, - {/* .includeTransform = */ true, - /* .includeScrollViewContentOffset = */ true}); + {/* .includeTransform = */ true}); auto frame = layoutMetrics.frame; auto onSuccessFunction = arguments[1].getObject(runtime).getFunction(runtime); @@ -567,8 +564,7 @@ jsi::Value UIManagerBinding::get( auto layoutMetrics = uiManager->getRelativeLayoutMetrics( *shadowNodeFromValue(runtime, arguments[0]), nullptr, - {/* .includeTransform = */ true, - /* .includeScrollViewContentOffset = */ true}); + {/* .includeTransform = */ true}); auto onSuccessFunction = arguments[1].getObject(runtime).getFunction(runtime);