From 62756d8be1c8020f8329a57828867ee192bb1b57 Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Wed, 14 Sep 2016 09:00:26 -0700 Subject: [PATCH] BREAKING - Fix unconstraint sizing in main axis Summary: @public Introduce `overflow:scroll` so that scrolling can be implemented without the current overflow:visible hackiness. Currently we use AT_MOST to measure in the cross axis but not in the main axis. This was done to enable scrolling containers where children are not constraint in the main axis by their parent. This caused problems for non-scrolling containers though as it meant that their children cannot be measured correctly in the main axis. Introducing `overflow:scroll` fixes this. Reviewed By: astreet Differential Revision: D3855801 --- .../main/java/com/facebook/react/flat/FlatShadowNode.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/flat/FlatShadowNode.java b/ReactAndroid/src/main/java/com/facebook/react/flat/FlatShadowNode.java index 07847f14d..d5581d03d 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/flat/FlatShadowNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/flat/FlatShadowNode.java @@ -151,9 +151,10 @@ import com.facebook.react.uimanager.ReactClippingViewGroupHelper; invalidate(); } - @ReactProp(name = "overflow") - public final void setOverflow(String overflow) { - mClipToBounds = "hidden".equals(overflow); + @Override + public void setOverflow(String overflow) { + super.setOverflow(overflow); + mClipToBounds = !"visible".equals(overflow); if (mClipToBounds) { mOverflowsContainer = false; if (mClipRadius > DrawView.MINIMUM_ROUNDED_CLIPPING_VALUE) {