react-native/React/Views
Y.Shing 2546c95ac8 Fix iOS 11 WebView extra white space on top due to contentInsetAdjustmentBehavior
Summary:
Same IOS 11 issue as https://github.com/facebook/react-native/pull/15023
Fixes the annoying 20px content insert on top.
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Fix the behaviour of WebView when building the iOS project with Xcode 9 due to the `contentInsetAdjustmentBehavior`.

![expected](https://user-images.githubusercontent.com/5630513/32207551-b7789668-bdca-11e7-840a-f325b2767d08.jpg)
![iphone_x_after](https://user-images.githubusercontent.com/5630513/32207557-beb8fd6e-bdca-11e7-87d0-18d533f20125.jpg)

![issue_normal_iphone_ios11](https://user-images.githubusercontent.com/5630513/32207572-d773be5c-bdca-11e7-8e28-8f0783eef1cd.jpg)
![iphone_x_before](https://user-images.githubusercontent.com/5630513/32207581-e3e93234-bdca-11e7-847d-f801bbf05d55.jpg)

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAl  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
 [IOS] [BUGFIX] [WebView] - Fix extra white space added to webView due to iOS 11 contentInsetAdjustmentBehavior
Closes https://github.com/facebook/react-native/pull/16519

Differential Revision: D6195670

Pulled By: shergin

fbshipit-source-id: 08d4d4dc700059bb7707e038dc4f592af0275896
2017-10-30 23:29:20 -07:00
..
SafeAreaView Introducing <SafeAreaView> 2017-09-24 23:01:25 -07:00
RCTActivityIndicatorView.h Fixes ActivityIndicatorIOS doesn't hide initially 2016-06-27 17:13:27 -07:00
RCTActivityIndicatorView.m Fixes ActivityIndicatorIOS doesn't hide initially 2016-06-27 17:13:27 -07:00
RCTActivityIndicatorViewManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTActivityIndicatorViewManager.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTAnimationType.h
RCTAutoInsetsProtocol.h Automatically adjust content inset after view controller did layout subviews 2015-09-04 07:00:21 -08:00
RCTBorderDrawing.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTBorderDrawing.m Fixed border smearing issue 2016-01-07 12:03:17 -08:00
RCTBorderStyle.h Add property mapping for `borderStyle` from JS to `RCTView` (iOS) 2015-12-01 09:00:28 -08:00
RCTComponent.h Test building with clang 3.9 2016-08-10 13:13:34 -07:00
RCTComponentData.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTComponentData.m Move RCTConvertSelectorForType to their respective using modules 2017-10-26 17:03:41 -07:00
RCTConvert+CoreLocation.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTConvert+CoreLocation.m
RCTConvert+Transform.h Drive any numerical prop via NativeAnimated 2017-01-26 18:28:53 -08:00
RCTConvert+Transform.m Fixed previously broken support for negative `scale` (`transform` style property) 2017-03-24 18:15:42 -07:00
RCTDatePicker.h Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00
RCTDatePicker.m Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00
RCTDatePickerManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTDatePickerManager.m Removed exported constants for fixed-size views 2016-04-26 04:21:39 -07:00
RCTFont.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTFont.mm (iOS) Support for ExtraBold alias of Heavy (font-weight 800) 2017-10-23 11:24:18 -07:00
RCTMaskedView.h MaskedViewIOS -- A way to apply alpha masks to views on iOS 2017-07-11 15:05:57 -07:00
RCTMaskedView.m MaskedViewIOS -- A way to apply alpha masks to views on iOS 2017-07-11 15:05:57 -07:00
RCTMaskedViewManager.h MaskedViewIOS -- A way to apply alpha masks to views on iOS 2017-07-11 15:05:57 -07:00
RCTMaskedViewManager.m MaskedViewIOS -- A way to apply alpha masks to views on iOS 2017-07-11 15:05:57 -07:00
RCTModalHostView.h Add onDismiss to Modal.js 2017-09-21 15:01:52 -07:00
RCTModalHostView.m Add a hack to fix the Modal component interacting with LayoutAnimation 2017-09-25 11:07:55 -07:00
RCTModalHostViewController.h Apple TV support 1: existing Objective C code should compile for tvOS 2016-09-27 06:28:33 -07:00
RCTModalHostViewController.m Replacing all instances of [UIApplication sharedApplication] wi… 2017-04-01 03:34:41 -07:00
RCTModalHostViewManager.h iOS `presentationStyle` Modal Appearance 2017-06-20 19:22:57 -07:00
RCTModalHostViewManager.m Add onDismiss to Modal.js 2017-09-21 15:01:52 -07:00
RCTModalManager.h Add onDismiss to Modal.js 2017-09-21 15:01:52 -07:00
RCTModalManager.m Avoid oversending modalDismissed event 2017-09-23 10:46:17 -07:00
RCTNavItem.h Expose barStyle for NavigatorIOS and TabBarIOS 2017-08-25 00:14:46 -07:00
RCTNavItem.m NavigatorIOS System Icon Support 2016-09-08 17:58:50 -07:00
RCTNavItemManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTNavItemManager.m Expose barStyle for NavigatorIOS and TabBarIOS 2017-08-25 00:14:46 -07:00
RCTNavigator.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTNavigator.m reverted view clipping changes 2016-11-18 14:43:31 -08:00
RCTNavigatorManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTNavigatorManager.m RCTNavigatorManager - drop unneeded error callback 2017-08-02 10:23:42 -07:00
RCTPicker.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTPicker.m Adjust row height by font size in PickerIOS 2017-08-23 20:30:10 -07:00
RCTPickerManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTPickerManager.m Improve types in RCTFont API 2016-08-05 12:44:21 -07:00
RCTPointerEvents.h
RCTProgressViewManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTProgressViewManager.m Apple TV support 1: existing Objective C code should compile for tvOS 2016-09-27 06:28:33 -07:00
RCTRefreshControl.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTRefreshControl.m Make RCTRefreshControl not dependent on order of setting properties 2017-02-17 15:16:01 -08:00
RCTRefreshControlManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTRefreshControlManager.m Allow to set refresh control title color 2016-04-16 15:15:25 -07:00
RCTRootShadowView.h Simplifying mess with RCTRootViewSizeFlexibility 2017-02-19 23:19:47 -08:00
RCTRootShadowView.m Setting `availableSize` for `RCTRootShadowView` on earlier stage 2017-03-08 19:00:14 -08:00
RCTScrollContentShadowView.h Better RTL support especially for ScrollView's 2017-02-02 09:58:30 -08:00
RCTScrollContentShadowView.m Re-render views when direction changes 2017-10-03 13:01:06 -07:00
RCTScrollContentViewManager.h Better RTL support especially for ScrollView's 2017-02-02 09:58:30 -08:00
RCTScrollContentViewManager.m Better RTL support especially for ScrollView's 2017-02-02 09:58:30 -08:00
RCTScrollView.h Remove onScrollAnimationEnd 2017-07-24 00:32:17 -07:00
RCTScrollView.m Fix content offset validation 2017-09-05 16:35:03 -07:00
RCTScrollViewManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTScrollViewManager.m add `pinchEnabled` prop to ScrollView 2017-08-06 23:55:16 -07:00
RCTScrollableProtocol.h Add scrollToEnd to ScrollView and ListView 2017-01-27 10:13:29 -08:00
RCTSegmentedControl.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTSegmentedControl.m Added lightweight generic annotations 2015-11-03 14:49:30 -08:00
RCTSegmentedControlManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTSegmentedControlManager.m Removed exported constants for fixed-size views 2016-04-26 04:21:39 -07:00
RCTShadowView+Internal.h RCTShadowView have got `rootView` property 2017-08-24 00:05:48 -07:00
RCTShadowView+Internal.m RCTShadowView have got `rootView` property 2017-08-24 00:05:48 -07:00
RCTShadowView+Layout.h Several layout related helper methods of RCTShadowView was moved to new (+Layout) category. 2017-05-08 11:31:20 -07:00
RCTShadowView+Layout.m Several layout related helper methods of RCTShadowView was moved to new (+Layout) category. 2017-05-08 11:31:20 -07:00
RCTShadowView.h iOS: Implement margin(Start|End) styles for RN 2017-10-18 19:33:31 -07:00
RCTShadowView.m Rename I18nManager Left/Right swap methods 2017-10-24 20:45:59 -07:00
RCTSlider.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTSlider.m remove unused includes in fbobjc/Libraries 2017-02-19 18:33:49 -08:00
RCTSliderManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTSliderManager.m Add option for both min/max track image. 2015-12-21 10:30:39 -08:00
RCTSwitch.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTSwitch.m
RCTSwitchManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTSwitchManager.m Added mechanism for directly mapping JS event handlers to blocks 2015-09-02 06:11:24 -08:00
RCTTVView.h Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTVView.m Fix warnings in React.xcodeproj 2017-03-23 11:36:17 -07:00
RCTTabBar.h Expose barStyle for NavigatorIOS and TabBarIOS 2017-08-25 00:14:46 -07:00
RCTTabBar.m Expose barStyle for NavigatorIOS and TabBarIOS 2017-08-25 00:14:46 -07:00
RCTTabBarItem.h Apple TV: RCTTabBar selection controlled by native after render (fix #15081) 2017-08-10 05:36:06 -07:00
RCTTabBarItem.m Apple TV: RCTTabBar selection controlled by native after render (fix #15081) 2017-08-10 05:36:06 -07:00
RCTTabBarItemManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTabBarItemManager.m Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTabBarManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTabBarManager.m Expose barStyle for NavigatorIOS and TabBarIOS 2017-08-25 00:14:46 -07:00
RCTTextDecorationLineType.h
RCTView.h iOS: Implement border(Top|Bottom)(Start|End)Radius and border(Start|End)(Color|Width) RN styles 2017-10-18 19:33:31 -07:00
RCTView.m Rename I18nManager Left/Right swap methods 2017-10-24 20:45:59 -07:00
RCTViewControllerProtocol.h
RCTViewManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTViewManager.m iOS: Implement margin(Start|End) styles for RN 2017-10-18 19:33:31 -07:00
RCTWebView.h Add a injectJavaScript method to the WebView component 2017-01-06 20:29:02 -08:00
RCTWebView.m Fix iOS 11 WebView extra white space on top due to contentInsetAdjustmentBehavior 2017-10-30 23:29:20 -07:00
RCTWebViewManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTWebViewManager.m Fix format warnings for clang 5.0 2017-09-25 10:30:53 -07:00
RCTWrapperViewController.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTWrapperViewController.m Expose barStyle for NavigatorIOS and TabBarIOS 2017-08-25 00:14:46 -07:00
UIView+Private.h Improve z-index implementation on iOS 2017-05-28 21:45:32 -07:00
UIView+React.h Implement nativeID prop to allow native code to reference react managed views in iOS 2017-06-20 19:01:27 -07:00
UIView+React.m Implement nativeID prop to allow native code to reference react managed views in iOS 2017-06-20 19:01:27 -07:00