From 04c7f240c6e4477c5c3bb0effaf609ee1f813da9 Mon Sep 17 00:00:00 2001 From: Dratwas Date: Wed, 29 Jan 2020 13:44:24 +0100 Subject: [PATCH 1/2] test patch --- Podfile | 3 +++ Podfile.lock | 2 +- patches/react-native+0.61.5.patch | 32 +++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 patches/react-native+0.61.5.patch diff --git a/Podfile b/Podfile index aa2a8d32ec06..1a0e7d8c453d 100644 --- a/Podfile +++ b/Podfile @@ -196,6 +196,9 @@ target 'WordPress' do post_install do + puts 'Patching RCTShadowView to fix nested group block - it could be removed after upgrade to 0.62' + %x(patch Pods/React-Core/React/Views/RCTShadowView.m < patches/react-native+0.61.5.patch) + ## Convert the 3rd-party license acknowledgements markdown into html for use in the app require 'commonmarker' diff --git a/Podfile.lock b/Podfile.lock index ffeebaecfa8b..141d1a314e91 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -680,6 +680,6 @@ SPEC CHECKSUMS: ZendeskSDK: 99679d8420a6d862773e2ddef0ebcc51b282317d ZIPFoundation: 89df685c971926b0323087952320bdfee9f0b6ef -PODFILE CHECKSUM: 157e2314e6458ae8d3b542db61fe84aa898b7a1a +PODFILE CHECKSUM: cad7b815d4f305de95fc8510315a231bea8ac957 COCOAPODS: 1.8.4 diff --git a/patches/react-native+0.61.5.patch b/patches/react-native+0.61.5.patch new file mode 100644 index 000000000000..8e7bf6d52836 --- /dev/null +++ b/patches/react-native+0.61.5.patch @@ -0,0 +1,32 @@ +diff --git a/node_modules/react-native/React/Views/RCTShadowView.m b/node_modules/react-native/React/Views/RCTShadowView.m +index 40c0cda..646f137 100644 +--- a/node_modules/react-native/React/Views/RCTShadowView.m ++++ b/node_modules/react-native/React/Views/RCTShadowView.m +@@ -156,13 +156,11 @@ static void RCTProcessMetaPropsBorder(const YGValue metaProps[META_PROP_COUNT], + - (CGRect)measureLayoutRelativeToAncestor:(RCTShadowView *)ancestor + { + CGPoint offset = CGPointZero; +- NSInteger depth = 30; // max depth to search + RCTShadowView *shadowView = self; +- while (depth && shadowView && shadowView != ancestor) { ++ while (shadowView && shadowView != ancestor) { + offset.x += shadowView.layoutMetrics.frame.origin.x; + offset.y += shadowView.layoutMetrics.frame.origin.y; + shadowView = shadowView->_superview; +- depth--; + } + if (ancestor != shadowView) { + return CGRectNull; +@@ -172,11 +170,9 @@ - (CGRect)measureLayoutRelativeToAncestor:(RCTShadowView *)ancestor + + - (BOOL)viewIsDescendantOf:(RCTShadowView *)ancestor + { +- NSInteger depth = 30; // max depth to search + RCTShadowView *shadowView = self; +- while (depth && shadowView && shadowView != ancestor) { ++ while (shadowView && shadowView != ancestor) { + shadowView = shadowView->_superview; +- depth--; + } + return ancestor == shadowView; + } From e3eb7f5b52c391c41a3e288137b644d0be185538 Mon Sep 17 00:00:00 2001 From: Dratwas Date: Wed, 29 Jan 2020 13:50:58 +0100 Subject: [PATCH 2/2] update podfile.lock --- Podfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Podfile.lock b/Podfile.lock index 141d1a314e91..290a081fa0a9 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -680,6 +680,6 @@ SPEC CHECKSUMS: ZendeskSDK: 99679d8420a6d862773e2ddef0ebcc51b282317d ZIPFoundation: 89df685c971926b0323087952320bdfee9f0b6ef -PODFILE CHECKSUM: cad7b815d4f305de95fc8510315a231bea8ac957 +PODFILE CHECKSUM: 2013bfbcd92e0ee78c4034af02ed2039eac15058 COCOAPODS: 1.8.4