react-native/React/Views
Alex Akers 3c5b4b0a9f [React Native] Remove layout-only nodes
Summary:
Remove layout-only views. Works by checking properties against a list of known properties that only affect layout. The `RCTShadowView` hierarchy still has a 1:1 correlation with the JS nodes.

This works by adjusting the tags and indices in `manageChildren`. For example, if JS told us to insert tag 1 at index 0 and tag 1 is layout-only with children whose tags are 2 and 3, we adjust it so we insert tags 2 and 3 at indices 0 and 1. This keeps changes out of `RCTView` and `RCTScrollView`. In order to simplify this logic, view moves are now processed as view removals followed by additions. A move from index 0 to 1 is recorded as a removal of view at indices 0 and 1 and an insertion of tags 1 and 2 at indices 0 and 1. Of course, the remaining indices have to be offset to take account for this.

The `collapsible` attribute is a bit of a hack to force `RCTScrollView` to always have one child. This was easier than rethinking out the logic there, but we could change this later.

@public

Test Plan: There are tests in `RCTUIManagerTests.m` that test the tag- and index-manipulation logic works. There are various scenarios including add-only, remove-only, and move. In addition, two scenario tests verify that the optimization works by checking the number of views and shadow views after various situations happen.
2015-06-25 09:12:00 -08:00
..
RCTActivityIndicatorViewManager.h Improved RCTActivityIndicatorView and fixed some flow errors 2015-04-26 02:17:13 -08:00
RCTActivityIndicatorViewManager.m Improved RCTActivityIndicatorView and fixed some flow errors 2015-04-26 02:17:13 -08:00
RCTAnimationType.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTAutoInsetsProtocol.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTBorderDrawing.h Implemented fast path for same borders/radii 2015-05-28 09:16:44 -08:00
RCTBorderDrawing.m Implemented fast path for same borders/radii 2015-05-28 09:16:44 -08:00
RCTConvert+CoreLocation.h MapView to support MKPointAnnotation using new attribute annotate in Map... 2015-04-14 18:03:37 -08:00
RCTConvert+CoreLocation.m MapView to support MKPointAnnotation using new attribute annotate in Map... 2015-04-14 18:03:37 -08:00
RCTConvert+MapKit.h Add map type property (standard, satellite, hybrid) to MapView. 2015-06-11 10:53:41 -08:00
RCTConvert+MapKit.m Add map type property (standard, satellite, hybrid) to MapView. 2015-06-11 10:53:41 -08:00
RCTDatePickerManager.h Removed deprecated RCT_EXPORT + code paths 2015-06-05 09:58:25 -08:00
RCTDatePickerManager.m Removed deprecated RCT_EXPORT + code paths 2015-06-05 09:58:25 -08:00
RCTMap.h [madman] map - fix bug that onRegionChangeComplete stopped emitting 2015-05-07 16:16:27 -08:00
RCTMap.m [madman] map - fix bug that onRegionChangeComplete stopped emitting 2015-05-07 16:16:27 -08:00
RCTMapManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTMapManager.m Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
RCTNavItem.h [Nav] Add support for bar button icons and left buttons 2015-05-07 08:03:21 -08:00
RCTNavItem.m [NavigatorIOS] Fixes #1268 - Bug causing the leftButtonIcon to not appear 2015-05-14 09:01:57 -08:00
RCTNavItemManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTNavItemManager.m [Nav] Add support for bar button icons and left buttons 2015-05-07 08:03:21 -08:00
RCTNavigator.h [ReactNative] Use a single DisplayLink held by the bridge 2015-04-15 07:07:48 -08:00
RCTNavigator.m Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
RCTNavigatorManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTNavigatorManager.m Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
RCTPicker.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTPicker.m Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
RCTPickerManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTPickerManager.m Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
RCTPointerEvents.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTProgressViewManager.h Added ProgressViewIOS 2015-06-03 09:49:35 -08:00
RCTProgressViewManager.m Added ProgressViewIOS 2015-06-03 09:49:35 -08:00
RCTScrollView.h [ReactNative] Implement proper event coalescing 2015-05-27 20:41:20 -08:00
RCTScrollView.m Add velocity and targetContentOffset for scrollEndDrag event in RCTScrollView 2015-06-15 12:14:12 -08:00
RCTScrollViewManager.h Removed deprecated RCT_EXPORT + code paths 2015-06-05 09:58:25 -08:00
RCTScrollViewManager.m Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
RCTScrollableProtocol.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTSegmentedControl.h Add SegmentedControlIOS 2015-04-29 08:08:45 -08:00
RCTSegmentedControl.m Add SegmentedControlIOS 2015-04-29 08:08:45 -08:00
RCTSegmentedControlManager.h Add SegmentedControlIOS 2015-04-29 08:08:45 -08:00
RCTSegmentedControlManager.m Add SegmentedControlIOS 2015-04-29 08:08:45 -08:00
RCTShadowView.h [React Native] Remove layout-only nodes 2015-06-25 09:12:00 -08:00
RCTShadowView.m [React Native] Remove layout-only nodes 2015-06-25 09:12:00 -08:00
RCTSlider.h [SliderIOS] Apply value after minimum/maximumValue in order to ensure it is properly set 2015-04-21 11:09:10 -08:00
RCTSlider.m [SliderIOS] Apply value after minimum/maximumValue in order to ensure it is properly set 2015-04-21 11:09:10 -08:00
RCTSliderManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTSliderManager.m Add minimumTrackTintColor and maximumTrackTintColor to SliderIOS 2015-04-23 05:57:15 -08:00
RCTSwitch.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTSwitch.m [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTSwitchManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTSwitchManager.m [ReactNative] use requireNativeComponent to clean up a bunch of boilerplate 2015-04-21 21:06:48 -08:00
RCTTabBar.h TabBarIOS tintColor 2015-05-26 17:21:36 -08:00
RCTTabBar.m Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
RCTTabBarItem.h [Image] Add scale support for base64-encoded image. 2015-06-25 06:07:42 -08:00
RCTTabBarItem.m [Image] Add scale support for base64-encoded image. 2015-06-25 06:07:42 -08:00
RCTTabBarItemManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTTabBarItemManager.m [Image] Add scale support for base64-encoded image. 2015-06-25 06:07:42 -08:00
RCTTabBarManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTTabBarManager.m Changed methodQueue to a property 2015-06-19 04:20:39 -08:00
RCTTextField.h Added placeholderTextColor property for TextInput class 2015-04-27 10:43:10 -08:00
RCTTextField.m Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
RCTTextFieldManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTTextFieldManager.m Enabled textAlign in TextInput 2015-06-24 15:53:13 -08:00
RCTView.h Added ability to set custom accessibility tap handler to React Native 2015-05-20 08:32:15 -08:00
RCTView.m Fixed border bug on events dashboard 2015-06-23 07:54:12 -08:00
RCTViewControllerProtocol.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTViewManager.h Bump .buckversion to 6cdb82cb7493a86c39d0f0dc3c102d0f470f55de. 2015-04-23 08:24:08 -08:00
RCTViewManager.m Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
RCTViewNodeProtocol.h [React Native] Remove layout-only nodes 2015-06-25 09:12:00 -08:00
RCTWebView.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTWebView.m Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
RCTWebViewManager.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTWebViewManager.m [WebView] Exposed scalesPageToFit UIWebView property 2015-06-17 13:56:38 -08:00
RCTWrapperViewController.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTWrapperViewController.m Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
UIView+React.h Fixed text background color 2015-05-28 09:31:57 -08:00
UIView+React.m Provide root reactTag to RootComponent and use it to resolve view controllers 2015-06-24 10:20:55 -08:00