Граф коммитов

16559 Коммитов

Автор SHA1 Сообщение Дата
Sidharth Guglani 000bf3d936 created a new class YogaNodeJNI which extends YogaNodeJNIBase and using YogaNodeJNi for new object creation
Summary:
Added a child class of YogaNodeJNIBase which will be used to separate layout outputs transfer logic.
This change set is for adding experiment for layout outputs batching using a float array

Reviewed By: davidaurelio

Differential Revision: D14368098

fbshipit-source-id: e0f10fb61cd09ee47cf9ce41fb400f4cfb3dd795
2019-03-20 09:07:49 -07:00
Dulmandakh cb0d61d533 allow HTTP in debug builds (#24066)
Summary:
It allows HTTP connections in debug builds, and requires no configuration compared to previous/current solution where you need to edit config file to test on device.

Consulted with Salakar about this.

[Android] [Changed] - Allow HTTP in debug builds
Pull Request resolved: https://github.com/facebook/react-native/pull/24066

Differential Revision: D14540255

Pulled By: cpojer

fbshipit-source-id: f1239154c27c36c21c9b080a826f8b1d0eb0fc7d
2019-03-20 08:57:21 -07:00
David Aurelio 5c91595d63 JNI: Simplify node context
Summary:
@public
Contexts of nodes only hold a bit mask after we got rid of weak JNI refs.
We can simply store that data in a pointer-sized unsigned int.

Here, we replace all context heap allocations with usage of the node context (`void *`) as bitmask. We also add a couple of utility operators in order to keep the code comprehensible.

Reviewed By: fabiomassimo

Differential Revision: D14425742

fbshipit-source-id: f32c2184a1f09268c39dbb8cd09ac96517339674
2019-03-20 08:46:24 -07:00
Rahul kishan M aa10b3f293 Null check on Picker Items (#24057)
Summary:
when conditional rendering is used then picker breaks when the child is null in iOS

This conditional rendering inside Picker fails when "someBooleanValue" variable is false

```
{
   this.state.someBooleanValue && <Picker.Item label="value" value="value" />
}
```

[iOS] [Fixed] - null check on children by using filter
Pull Request resolved: https://github.com/facebook/react-native/pull/24057

Differential Revision: D14538337

Pulled By: cpojer

fbshipit-source-id: d9324671931b5f1dac65d8058d9aa957b650af25
2019-03-20 08:11:47 -07:00
Sidharth Guglani 80743eb7b1 renamed YogaNodeJNI to YogaNodeJNIBase
Summary:
Renamed class from YogaNodeJNI to YogaNodeJNIBase.
This change set is for adding experiment for layout outputs batching using a float array where we will have two separate classes which will override how layout outputs are transferred to java YogaNode object.

We needed two separate classes because having everything in one class was causing memory issues as both the individual fields for width, height etc. and float array for batching needs to be present in code.

Reviewed By: davidaurelio

Differential Revision: D14368069

fbshipit-source-id: 0e98e28c8c7a9788345ccb92b2cd0f2cd4a53525
2019-03-20 07:54:03 -07:00
Christoph Nakazawa 84feec2adc Remove AlertIOS
Summary:
This module was merged with `Alert`. Landing the removal now will mean that it is gone from 0.61 which means the deprecation warning will have been there for two full versions.

It will also make it easier to ship D14538298.

Reviewed By: rubennorte

Differential Revision: D14539026

fbshipit-source-id: fb36482324866c277811756cc7461451a1482b23
2019-03-20 06:12:28 -07:00
Michał Pierzchała 23ef604d41 chore: update Jest preset to align with Jest 24 (#24062)
Summary:
Jest 24 includes [`testMatch` and `moduleFileExtensions`](c5fd7aae93/packages/jest-config/src/Defaults.ts (L70)) that align with the ones that are currently there on master, because it added default handling for TypeScript as well. I think it's time for us to move to Jest 24. Is there a way we can tell users to upgrade Jest to certain version?

Fixes https://github.com/facebook/react-native/issues/24060

[General] [Changed] - update Jest preset to align with Jest 24
Pull Request resolved: https://github.com/facebook/react-native/pull/24062

Differential Revision: D14538988

Pulled By: cpojer

fbshipit-source-id: d8d152b8e8517b34144970f1cc1ed0b49f8b4e54
2019-03-20 04:58:20 -07:00
Changnam Hong 5dd6908b25 Fix RCTJavaScriptLoader loadBundleAtURL error case (#23837)
Summary:
Change the function called when an error is returned from the completionHandler of the `RCTJavaScriptLoader(loadBundleAtURL:onProgress:onComplete:)`.

* AS-IS
    - `RCTLogError()`
    - This error method does not post any notification for users. So users cannot receive notification when `RCTJavaScriptLoader(loadBundleAtURL:onProgress:onComplete:)` complete with error.(i.e. bundleURL is is invalid but not nil, `http://1`, `http://localho:8081/index.bundle`)

* TO-BE
    - `handleError(error:)`
    -  Call this method will post notification for users when `completionHandler` fails with error.

[iOS] [Fixed] - Change the function called when an error is returned from the completionHandler of the `RCTJavaScriptLoader(loadBundleAtURL:onProgress:onComplete:)`.
Pull Request resolved: https://github.com/facebook/react-native/pull/23837

Differential Revision: D14538790

Pulled By: cpojer

fbshipit-source-id: da3306904c0d8113d204edfaa0f9e2a23793981a
2019-03-20 04:53:24 -07:00
Bartol Karuza 02e8e531dd Fix #24053 prevent division by zero error in VirtualizedList debug overlay (#24058)
Summary:
This PR fixes the case where the content a VirtualizedList loads with a contentLength of 0,  causing a crash in the `renderDebugOverlay` function. The result of that crash is a red screen when turning on debug on FlatList and other VirtualizedList components as described in #24053.

[LIST] [FIX] - Fix VirtualizedList debug mode crash
Pull Request resolved: https://github.com/facebook/react-native/pull/24058

Differential Revision: D14538317

Pulled By: cpojer

fbshipit-source-id: 7b17bf51c388561c517bab1f775a31200abdc5a9
2019-03-20 01:48:25 -07:00
zhongwuzw 7ae90408c9 Fixed surface presenter observer (#24048)
Summary:
We missed create observer array, let's add it.
cc. shergin .

[iOS] [Fixed] - Fixed surface presenter observer
Pull Request resolved: https://github.com/facebook/react-native/pull/24048

Differential Revision: D14537159

Pulled By: shergin

fbshipit-source-id: f57f685a09aa7c9692245d178b68e94d666ae2fb
2019-03-19 22:15:44 -07:00
zhongwuzw a98f342191 Reorder prepareForRecycle before adding recycle pool (#24025)
Summary:
Put `prepareForRecycle` to last before enqueue to recycle pool, ensure only call it when count lower than RCTComponentViewRegistryRecyclePoolMaxSize.

cc. shergin .

[General] [Changed] - Reorder prepareForRecycle before adding recycle pool
Pull Request resolved: https://github.com/facebook/react-native/pull/24025

Differential Revision: D14536843

Pulled By: shergin

fbshipit-source-id: 82a816e2c0afb5a6bb72637d7d55d6a4fda708af
2019-03-19 21:20:00 -07:00
Matt Hargett e67aa427a8 Eliminate eslint npm version mismatch warnings and bump some to latest (#23969)
Summary:
I was annoyed by warnings from yarn/npm about eslint peer dependencies not being met, so I dived in to try and get rid of some of them. Sometimes it meant bumping a plugin, but then that plugin needed a newer babel-eslint, so it was a dance.

Some we can't easily update to latest (eslint-plugin-prettier) because the rule format has changed a bit. Happy to do that in this PR if folks think its a good idea. eslint-config-fbjs itself needs to be updated and republished to eliminate the last few warnings.

There are a few new warnings (the repo wasn't linting cleanly for me from the start). I can fix those in this PR, or a separate one, based on people's preferences.

[internal] [chore] - Eliminate some peer dependency warnings and bump some eslint packages to latest.
Pull Request resolved: https://github.com/facebook/react-native/pull/23969

Differential Revision: D14519076

Pulled By: cpojer

fbshipit-source-id: aa44cfd05814d7b79069414aa78d089e448c2235
2019-03-19 11:14:30 -07:00
Alexey Lang c3475419a9 Add removeExtra()
Reviewed By: bestander

Differential Revision: D14386282

fbshipit-source-id: 045dd0f12cc462da694d20da52f3a591b538dc57
2019-03-19 10:24:52 -07:00
Orta Therox 1a635c6ade Update the license for RCTWrapperExample (#24037)
Summary:
The copyright headers in the Wrapper example referenced a license file that doesn't exist anymore. This PR updates the copyright header to match other example files in the repo

Fixes https://github.com/facebook/react-native/issues/23215

[General] [Changed] Updated the license of RCTWrapperExample to match the rest of the Examples
Pull Request resolved: https://github.com/facebook/react-native/pull/24037

Differential Revision: D14521327

Pulled By: cpojer

fbshipit-source-id: 983741d4d93178cd90b532ad5f8ff0717670aff4
2019-03-19 09:19:19 -07:00
cpojer 156e483491 Remove `-p` calls from `shasum`. (#24036)
Summary:
Fixes #22873. Given that this code is meant to only work on macOS, we should be fine not using a portable hash. In the packages for which this matters at the bottom of this file, it produces the same hashes so it should be fine.

[General] [Fixed] - Don't use `-p` when invoking shasum.
Pull Request resolved: https://github.com/facebook/react-native/pull/24036

Differential Revision: D14521134

Pulled By: cpojer

fbshipit-source-id: 882e762b7817d9d46bdd405c9e2e9e8b4d7cfaf4
2019-03-19 08:53:45 -07:00
ferrannp 7e37370ab5 add react_native_config to RNTester (#24033)
Summary:
It was not possible to run RNTester in Android P and connect to the packager.

[Android][RNTester] add react_native_config to RNTester for the packager to be able to connect with Android P devices
Pull Request resolved: https://github.com/facebook/react-native/pull/24033

Differential Revision: D14520803

Pulled By: cpojer

fbshipit-source-id: 567a0461d14d880cd78e9fa551ba25fe60af798d
2019-03-19 07:52:19 -07:00
Alexey Lang abe737fe74 Proxy statics for the wrapped component
Summary: Currently we can't access navigationOptions  from measureAppRequire and that breaks fetchRelayQuery logs.

Reviewed By: fkgozali

Differential Revision: D14505525

fbshipit-source-id: 97ae4461ebb0e703633f782323b13b4e4f7c5cb7
2019-03-19 07:32:20 -07:00
Danilo Bürger 8fa116cc0e Fixed regression in SectionList caused by #21577 not being able to scroll to top on android (#24034)
Summary:
```
let index = params.itemIndex + 1;
```
to
```
let index = Platform.OS === 'ios' ? params.itemIndex : params.itemIndex - 1;
```
to fix an issue on iOS. Note however, how the sign for non iOS changed from `+` to `-` causing a crash on Android when trying to scroll to index 0 as that will be evaluated to -1 instead of 1 and thus be out of bounds.

[Android] [Fixed] - Fixed regression in SectionList caused by #21577 not being able to scroll to top on android
Pull Request resolved: https://github.com/facebook/react-native/pull/24034

Differential Revision: D14520796

Pulled By: cpojer

fbshipit-source-id: bb49619f49752fd3f343ef3b7bf1b86ac48af7f8
2019-03-19 07:32:20 -07:00
Rick Hanlon 0827184c60 Add PointPrimitive
Summary: Adds support for the native type Point to the rn codegen

Reviewed By: TheSavior

Differential Revision: D14462164

fbshipit-source-id: 942b5697d616c6aa6289d01bb56382fd7adac203
2019-03-19 06:36:33 -07:00
Rick Hanlon 7723c31329 Add ArrayTypeAnnotation
Summary:
Adds support for `ArrayTypeAnnotation`, usage is as:

```
{
  type: 'ArrayTypeAnnotation',
  items: {
    type: 'BooleanTypeAnnotation',
}

{
  type: 'ArrayTypeAnnotation',
  items: {
    type: 'StringTypeAnnotation',
}

{
  type: 'ArrayTypeAnnotation',
  items: {
    type: 'FloatTypeAnnotation',
}

{
  type: 'ArrayTypeAnnotation',
  items: {
    type: 'Int32TypeAnnotation',
}

{
  type: 'ArrayTypeAnnotation',
  items: {
    type: 'NativePrimitiveTypeAnnotation',
    name: 'ImageSourcePrimitive'
}

{
  type: 'ArrayTypeAnnotation',
  items: {
    type: 'NativePrimitiveTypeAnnotation',
    name: 'ColorPrimitive'
}

{
  type: 'ArrayTypeAnnotation',
  items: {
    type: 'NativePrimitiveTypeAnnotation',
    name: 'PointPrimitive' // added in the next dfif
}
```

Reviewed By: TheSavior

Differential Revision: D14462086

fbshipit-source-id: f0c25f8fe969efc01e5838f3966d910fbbd9c86c
2019-03-19 06:36:33 -07:00
Valentin Shergin ae157883eb ShadowNode: Using state value for computing ShadowView hash
Summary: Trivial.

Reviewed By: JoshuaGross

Differential Revision: D14472906

fbshipit-source-id: 014a3115c24d155a93ff24404d4f748880d53b2b
2019-03-19 00:02:30 -07:00
Valentin Shergin f24fd6e9ee Fabric: Using new shiny ShadowNode::getAncestors in LayoutableShadowNode
Summary: Same algorithm using a new API.

Reviewed By: JoshuaGross

Differential Revision: D14423509

fbshipit-source-id: c40f61fdd001f68785512c304941f523585d641c
2019-03-18 23:56:13 -07:00
Valentin Shergin 4602bf5cc6 Fabric: Using ShadowNode::getAncestors in RootShadowNode::clone
Summary: The basic idea of the implementation is the same, but it uses the new method for finding parenting chain and it does not use `shared_from_this()` anymore.

Reviewed By: JoshuaGross

Differential Revision: D14416949

fbshipit-source-id: 13ef928505a60280e2a6c30c76ac87d91cee326e
2019-03-18 23:56:13 -07:00
Valentin Shergin be51d0564b Fabric: a new efficient implementation of ShadowNode::getAncestors()
Summary:
The algorithm is quite simply:
1. Get family objects of the two nodes (inner and outer).
2. Traverse the list of family objects starting from the inner one and form a reversed list of them.
3. tarting from the inner node, traverse the tree layer-by-layer choosing a next element of the path by comparing the family object of each node on the level and an object from the list.

Reviewed By: JoshuaGross

Differential Revision: D14416950

fbshipit-source-id: 23c659a9e01690f90174193650a2b0ef09eadb4d
2019-03-18 23:56:13 -07:00
Valentin Shergin 978e59aa92 Fabric: ShadowNodeFamily, maintaining a pointer to a parent family
Summary:
One of the core feature of ShadowNodeFamily is having a pointer to a parent family. This diff implements it.
I don't think there is a hard retain cycle there, but for more lean memory usage we use weak_ptr here.

Reviewed By: JoshuaGross

Differential Revision: D14416948

fbshipit-source-id: 05fd2c4833146f007228363b1d958776b4a2a9cf
2019-03-18 23:56:13 -07:00
Valentin Shergin 28e89e5081 Fabric: ShadowNodeFamily, the first steps
Summary:
ShadowNodeFamily is a new concept that allows us to implement an efficient way to solve the problem of finding a path to some ancestor node (practically reimplement ShadowNode::constructAncestorPath() in some efficient way).

This diff is the first one in the series. It introduces a new class and moves some data into it.

Reviewed By: JoshuaGross

Differential Revision: D14416947

fbshipit-source-id: c93865a8929a2128498e34d3589487696aac6283
2019-03-18 23:56:13 -07:00
Valentin Shergin e0bbdbc040 Fabric: Removed declaration of ShadowNode::clearSourceNode()
Summary: This is a leftover from the ealy days of Fabric. The mehtod does not have implementation counterpart and any usage.

Reviewed By: JoshuaGross

Differential Revision: D14402636

fbshipit-source-id: aa2e919084ae7382d3a62af761e1f6eac334fc75
2019-03-18 23:56:13 -07:00
Valentin Shergin b93221036a Fabric: Removed unnecessary call in `RootShadowNode::clone`
Summary: The removed code does nothing because we are replacing the oldChild with newChild several lines above.

Reviewed By: JoshuaGross

Differential Revision: D14402637

fbshipit-source-id: 731a950f373e20f7d5bae3cbf6470335d3694ccc
2019-03-18 23:56:13 -07:00
Valentin Shergin 50b40a41c0 Fabric: Tightening up some ShadowNode cloning semantics
Summary: In React, things like changing `tag`, `eventTarget` or reparenting are impossible by design. Which seems like a strange limitation actually allows us to do tremendous performance optimizations (stay tuned!).

Reviewed By: JoshuaGross

Differential Revision: D14402638

fbshipit-source-id: 3b7b7edaff0d55a3ca94e2ac4c753d630d07101d
2019-03-18 23:56:13 -07:00
zhongwuzw e40a76715a Remove explicitly add png file extension when load local image (#23864)
Summary:
We need to remove adding png file extension when path has not extension. Two reasons:
1. `imageWithContentsOfFile` or other `UIKit` methods can load png image correctly, even if path has not `png` file extension.
2. Sometimes, people may have file that actually not have file extension, it's the designated behavior for user. Like #23844 .

CC. sahrens cpojer .

[iOS] [Fixed] - Remove explicitly add png file extension when load local image
Pull Request resolved: https://github.com/facebook/react-native/pull/23864

Reviewed By: shergin

Differential Revision: D14425373

Pulled By: hramos

fbshipit-source-id: 3cc06c9a3d68cadf652c1de742f3cce26258c874
2019-03-18 23:03:32 -07:00
Héctor Ramos c2f5b676ff Refactor autofillHints API 26+ runtime check
Summary: Refactor the fix from d4aa1e7a52 into something that follows the same convention used in 36957dcedd

Reviewed By: mdvacca

Differential Revision: D14485427

fbshipit-source-id: e6118284fcffa4b43c8392c94991764a07094403
2019-03-18 22:55:42 -07:00
Valentin Shergin 9a0047f368 Fabric: Explicit dirtying Yoga nodes for Text component (and co.)
Summary:
With recent changes, simple cloning a component does not mean that underlying Yoga node will be dirtied. Autodirtying is only performed if the child nodes were dirtied and/or if the YGStyles were changed.
That's not the case for Text component which does not have direct layotable children, so we have to call `dirtyLayout` explicitly.

Reviewed By: JoshuaGross

Differential Revision: D14508277

fbshipit-source-id: 2c52d7d40da963a976c7d28a13781cc1755ef591
2019-03-18 19:21:26 -07:00
Valentin Shergin ab86085caf Fabric: Correct checking for `sealable` flag with move semantic methods
Summary: In methods which implement move semantic we have to check the source object because it's (also) being mutated.

Reviewed By: JoshuaGross

Differential Revision: D14496937

fbshipit-source-id: f3f2299d14e41c8b269f1647336dbd5b45c235f4
2019-03-18 19:21:26 -07:00
Valentin Shergin 587087c4e7 Fabric: More asserts/invariant-checking in YogaLayoutableShadowNode
Summary: More `assert`s and `ensureUnsealed` calls were added to YogaLayoutableShadowNode for simpler debugging and early failing.

Reviewed By: JoshuaGross

Differential Revision: D14496936

fbshipit-source-id: 898c6a0665aeac5d0b1995bd53046f58cec37007
2019-03-18 19:21:26 -07:00
Valentin Shergin 55eaf30740 Fabric: Checking for `HasNewLayout` before applying layout metrics to ShadowNode
Summary:
If the `HasNewLayout` flag is `false`, we should not copy the data from YGStyle/YGLayout to ShadowNode because the node can be already sealed and because it's unnecessary. Previously we workaround this case with a special check in `setLayoutMetrics` method, but that can be unreliable because of some side-effects related to pixel rounding and comparing floats.
The new approach is much more robust and explicit.

Reviewed By: JoshuaGross

Differential Revision: D14496939

fbshipit-source-id: deddb14d2206c5bd3f22154d0ea682e3c5888901
2019-03-18 19:21:26 -07:00
Valentin Shergin be6fa25d16 Fabric: Removing default implementation of some methods of LayoutableShadowNode
Summary: These default implementations are never being used. Removing them allowing to ensure that flags inside YGNode have same values as flags in YogaLayoutableShadowNode. That also saves a couple of bytes in size of ShadowNode.

Reviewed By: JoshuaGross

Differential Revision: D14496938

fbshipit-source-id: c43f9c8a2eec054f728ff54a6573668eccda55fb
2019-03-18 19:21:26 -07:00
Valentin Shergin 32d5c7e1f3 Fabric: Checking getHasNewLayout in RootShadowNode
Summary:
As a comment above changed lines states, RootShadowNode is a special one because it layouts itself. In normal case some parent node layouts its children, and it also checks getHasNewLayout flag. So, in the case of RootShadowNode it has to check its own flag by itself.
That fix should save some resources and generally correct.

After the change, changing a state of some node does not cause relayout process. If dirtying is required, the component should call `dirtyLayout()` explicitly in the constructor or in `adopt` method.

Reviewed By: JoshuaGross

Differential Revision: D14472751

fbshipit-source-id: 75bf62ac28991a39e5664aa71c08bd0e64fa275b
2019-03-18 19:21:25 -07:00
Valentin Shergin 72cd8716fd Fabric: Calling a base class copy constructor in YogaLayoutableShadowNode's copy constructor
Summary: That diff fixes an obvious bug that prevents internal data of LayoutableShadowNode being cloned during cloning of YogaLayoutableShadowNode.

Reviewed By: JoshuaGross

Differential Revision: D14472753

fbshipit-source-id: d07be3bf36708690dfe10de7898e2b48648aa0f4
2019-03-18 19:21:25 -07:00
Valentin Shergin 6bd67de4d3 Fabric: Being even smarter preserving dirty flag on Yoga nodes
Summary: In addition to the previous change, now we handle a situation where some node receives a new set of children and all those children have the same styles. (See the previous diff for more details.)

Reviewed By: JoshuaGross

Differential Revision: D14472754

fbshipit-source-id: 16411036e14f18e730e064e33948440b05ff51c8
2019-03-18 19:21:25 -07:00
Valentin Shergin d6d381180b Fabric: Being smarter preserving dirty flag on Yoga nodes
Summary:
After the change, YogaLayoutableShadowNode will preserve dirty flag (being false) in cases where:
* a node was cloned with same children;
* changes in props don't affect layout.

Motivation:
In Fabric we always were aggressive about dirting yoga nodes: when we clone the node, we always dirty underlying Yoga node. I think that was the case because we don't deeply understand how the system works and we always had more severe problems to fix. Now, we faced an issue that forces us to think about that problem carefully (more about that later).

(I don't expect that will improve TTI performance, but that's possible if we do a lot of changes in the hierarchy during initial load process.)

I see two main use cases where we have to be smart about dirtied yoga nodes:

Case 1. Native local commits which do *not* modify yoga styles.E.g. in a case where ScrollView updates the internal state (which has offset info) really really frequently. (It will be implemented later.) That `contentOffset` info does not or might not affect layout, so we should not pay for this.

Case 2. Legit React commits which do *not* modify yoga styles. E.g. in a case where only the background color of some view changes, we don't need to relayout anything. Unfortunately, we do this in Fabric because of two major reasons:
* We don't make a difference between any changes in Props.
* React constructs new children of cloned node iteratively, calling `appendChild`. That makes implementing optimization really challenging because we don't know when the process ends. And when it ends we have very few pieces of information about how the state looked before.

This diff stack will handle the problems of the first kind. The main motivation is: we want to have state updates to be as lean as possible.

Reviewed By: JoshuaGross

Differential Revision: D14472752

fbshipit-source-id: 68374f60cb07de9ab65bf1f6d94c828985359fa5
2019-03-18 19:21:25 -07:00
Sergei Dryganets 62d340910a There is a small gap in the SynchronizedWeakHashSet implementation. T… (#24015)
Summary:
There is a small gap in the SynchronizedWeakHashSet implementation - the containsKey method of the WeakHashMap is modifying hence calling it during the iteration might cause ConcurrentModificationException. Added a command DO_IF_CONTAINS to safely handle this case.

[Android] [Bugfix] - Should fix a ConcurrentModificationException in onResume.
Pull Request resolved: https://github.com/facebook/react-native/pull/24015

Reviewed By: mdvacca

Differential Revision: D14507342

Pulled By: fkgozali

fbshipit-source-id: 2998bffb06e2cbacd8df1780964355842b1cc4a0
2019-03-18 14:24:25 -07:00
Dulmandakh f49f1812ed land androidx in gradle (#24014)
Summary:
Use AndroidX in ReactAndroid/build.gradle, and remove androidx dependency from template and RNTester app because it's already exposed/exported from ReactAndroid.

[Android] [Changed] - Land AndroidX in gradle
Pull Request resolved: https://github.com/facebook/react-native/pull/24014

Differential Revision: D14508774

Pulled By: mdvacca

fbshipit-source-id: c96b97876571a5a7f2b400dd29188cfdf1f84a4c
2019-03-18 13:37:17 -07:00
Spencer Ahrens 5ebef7a214 Fix Fabric animation association
Summary:
Before I was looking at the animation nodeTag rather than the view reactTag to determine if it was Fabric, so sometimes we would do an early fabric flush on non-fabric views, or miss it on fabric ones.

This fixes it by associating animations with fabric based on the reactTag of the view that is associated with the animation nodeTag.

Reviewed By: shergin

Differential Revision: D14504446

fbshipit-source-id: 75a1394b34436556daf9c33dc63743df33c2fb19
2019-03-18 13:37:17 -07:00
Jan Kassens 8b206cab82 remove $FlowFixedInNextDeploy
Summary:
This gets completely rid of this flow ignore. The flow team is using the version
aware `$FlowFixMe` now and the only instance of this used was on www dating back
to 2016: D3235864

My intention here was to slightly simplify the flowconfigs.

Reviewed By: gabelevi

Differential Revision: D14494167

fbshipit-source-id: 0fab176ce326007ac45b47691378812c74a523e6
2019-03-18 13:32:28 -07:00
Alston Lin d6b2f78ad4 Added support for saving http and https URIs in the React Native CameraRoll module
Summary:
Currently, the behavior of saving in the `CameraRoll` module varies depending on the platform.

On iOS, remote URIs are supported and will save a remote image to the local storage. However, on Android it can only be used for local images, making this function much less useful.

This change allows the Android version of the `CameraRoll` module to have the same behavior, at least for http and https scheme URIs, which will probably cover the vast majority of the use cases.

Reviewed By: sahrens

Differential Revision: D14483943

fbshipit-source-id: e63ca786240e6657c8c8e0292be9fb08efa40ef1
2019-03-18 13:03:28 -07:00
Dulmandakh 75af15ede4 use Conscrypt as security provider if available (#23984)
Summary:
This PR adds support to use Conscrypt as Security Provider if available runtime. Consscrypt supports TLS 1.2 on Android 4.x and TLS 1.3 on all Android versions. Fixes issues (ex https://github.com/facebook/react-native/issues/23151) with HTTPS connections on Android 4.x.

Just add below to your project build.gradle and it'll use it.

```gradle
implementation('org.conscrypt:conscrypt-android:2.0.0')
```

[Android] [Changed] - Add TLS 1.3 support to all Android versions using Conscrypt.
Pull Request resolved: https://github.com/facebook/react-native/pull/23984

Differential Revision: D14506000

Pulled By: cpojer

fbshipit-source-id: 58bf18f7203d20519fb4451bae83f01e2f020a44
2019-03-18 12:01:35 -07:00
Ryan Elliott eec2495a96 Resolve issue #23816, updated with recent merges (#23961)
Summary:
This fixes #23816, which states that `getSize()` does not function correctly on Android. The original PR for this is now outdated as there have been merges into master that would create merge conflicts.

[Android] [Fixed] - Added correct handling for `getSize()` to avoid warnings being thrown.import
Pull Request resolved: https://github.com/facebook/react-native/pull/23961

Differential Revision: D14505183

Pulled By: cpojer

fbshipit-source-id: 3d8976fd518de0903d7736a8cbd8371987eb1b2d
2019-03-18 11:16:20 -07:00
Alec Larson 68825f9ca5 Fix prop overrides of TouchableWithoutFeedback (#23966)
Summary:
Child props were being overridden by `<Touchable>` props even when the `<Touchable>` props were undefined.

[General] [Fixed] - Prevent prop override by TouchableWithoutFeedback when undefined
Pull Request resolved: https://github.com/facebook/react-native/pull/23966

Differential Revision: D14502918

Pulled By: cpojer

fbshipit-source-id: 614ee43bbb6f062a98bd9318693807320979a016
2019-03-18 11:06:38 -07:00
zhongwuzw 8266f61935 Change invalid bridge log level from error to warn (#24005)
Summary:
I encountered invalid bridge error when I develop (reload high frequency) some times, and if it happened, I only can restart the app, because we would always show error invalid message if we trigger reload command. So I recommend Change invalid bridge log level from error to warn, I think it's enough.

cc. cpojer .

<img width="375" alt="892C97F4-E910-4E3B-935A-65C899916E6E" src="https://user-images.githubusercontent.com/5061845/54538344-0d32c600-49cf-11e9-818c-0e4cb5a0a518.png">

[iOS] [Fixed] - Change invalid bridge log level from error to warn
Pull Request resolved: https://github.com/facebook/react-native/pull/24005

Differential Revision: D14504820

Pulled By: cpojer

fbshipit-source-id: f24c4876fdb3e64183c09c5ddc598a8c87e405a7
2019-03-18 10:48:59 -07:00
zhongwuzw 17ca80a9c5 Fixed test_ios Switch test failed (#24009)
Summary:
In #23977 , it changed switch example, it leads snapshots test failed.

cc hramos .

[iOS] [Fixed] - Fixed test_ios Switch test failed
Pull Request resolved: https://github.com/facebook/react-native/pull/24009

Differential Revision: D14504806

Pulled By: cpojer

fbshipit-source-id: 0c47226a3da0cba2371c627f42f62835b3aac810
2019-03-18 10:24:25 -07:00