Commit Graph

13295 Commits

Author SHA1 Message Date
Héctor Ramos 445b0c7080 React sync for revisions 1c2876d...7a3416f
Reviewed By: bvaughn

Differential Revision: D7526137

fbshipit-source-id: 9f9db8a6b56cb4ae581a7b8d28079ec38de2180f
2018-04-05 17:34:53 -07:00
gengjiawen 9b9b6c845e Inline and fix proguard rules
Summary:
The original proguard rules are put in the template, which is not very convenient and easy to get wrong. Because new rules get put, people also has two copy paste the rule. And there are also existing project import react native as a dependency. So the best way to  keep a android library project proguard rule is to manage the rule itself, using `consumerProguardFiles` like [dagger](46baef6d96/butterknife/build.gradle (L9)) and other android library project.

<!--
  Required: Write your motivation here.
  If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->

Use RNTester to build the release flavor (now it has bugs https://github.com/facebook/react-native/issues/18460, I keep my change in local for now), after build success, run to check if crash.

In the process, I also fix https://github.com/facebook/react-native/issues/12994 and https://github.com/facebook/react-native/issues/6624 by adding the following to proguard rules
```proguard
-keep,includedescriptorclasses class com.facebook.react.bridge.** { *; }
```

<!--
  Does this PR require a documentation change?
  Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->

[ANDROID] [ENHANCEMENT and BUGFIX] [Proguard rules] - inline and fix proguard rules .

<!--
  **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 ] [ {Filename}  ]
  [ IOS      ] [ FEATURE     ] [ {Directory} ]   |-----------|
  [ ANDROID  ] [ MINOR       ] [ {Framework} ] - | {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
-->
Closes https://github.com/facebook/react-native/pull/18461

Differential Revision: D7527533

Pulled By: hramos

fbshipit-source-id: 447dbc16983bcfb597187b40c1be3987a8c5a832
2018-04-05 17:34:53 -07:00
Michael Lee 7a29ad1d83 Specify platforms for the a few targets
Differential Revision: D7516968

fbshipit-source-id: db9d6df7c1b67dbdd998ea017229a976f78b2eb1
2018-04-05 16:02:31 -07:00
Mehdi Mulani 52a3443e98 Weakly capture the bridge in callback methods
Summary: Callback blocks are frequently held onto by modules, e.g. for animation the `RCTFrameAnimation` holds onto its callback method. This causes a bunch of retain cycles since the module will be strongly held onto by the bridge.

Reviewed By: Megra

Differential Revision: D7492136

fbshipit-source-id: 708e61ffe7bf0dcffaebc056ab861b9023ffc1df
2018-04-05 14:56:02 -07:00
Maël Nison 6be5d7827b Adds an experimental hook for custom resolutions
Reviewed By: mjesun

Differential Revision: D7337022

fbshipit-source-id: fea1ee345e4d3b5713fed6cdc33869fbba6f21e2
2018-04-05 09:00:04 -07:00
Peter van der Zee 439614891c Small refactor
Reviewed By: cpojer

Differential Revision: D7498659

fbshipit-source-id: 43ad85645e2366a385e08d68172e76e336fdfb1f
2018-04-05 06:36:53 -07:00
Peter van der Zee cea798c57b Downgrade ES6 import to ES5 compat module.exports
Reviewed By: rubennorte

Differential Revision: D7498658

fbshipit-source-id: 6825c3010ce13c56f05284448ad9961fe058d7ea
2018-04-05 06:36:53 -07:00
Peter van der Zee 4a814d1370 Change ES6 module syntax to module.exports
Reviewed By: rubennorte

Differential Revision: D7490562

fbshipit-source-id: 861681c24eab678d25af47bb25738651fe3e26b4
2018-04-05 06:36:53 -07:00
philvasseur 3ed076b65a added in snapAlignment for horizontal android scrollView
Summary:
<!--
  Required: Write your motivation here.
  If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->
`snapToAlignment` is available on iOS but not android yet. This PR is to add support for `snapToAlignment` on android as `snapToInterval` was recently added to android and they are very useful together.

Make a `Flatlist` in android with `pagingEnabled`, `horizontal`, `snapToInterval` and `snapToAlignment` set and see how adjusting between the three values of `snapToAlignment` aligns just like it does in iOS.

<!--
  Required.
  Help reviewers and the release process by writing your own release notes. See below for an example.
-->

[ANDROID] [MINOR] [ScrollView] - On Android, **ScrollView** now takes snapToAlignment like iOS

<!--
  **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 ] [ {Filename}  ]
  [ IOS      ] [ FEATURE     ] [ {Directory} ]   |-----------|
  [ ANDROID  ] [ MINOR       ] [ {Framework} ] - | {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
-->
Closes https://github.com/facebook/react-native/pull/18648

Differential Revision: D7473762

Pulled By: mdvacca

fbshipit-source-id: ad4778b83f9fd1352455b2ed28a5f37229d9d8c7
2018-04-04 20:57:32 -07:00
Peter Argany 490f22ae72 Fix bug with <InputAccessoryView> safe area conformance
Reviewed By: wwalser

Differential Revision: D7507732

fbshipit-source-id: 10bf8d58c65f1353a3e62a27fc74c2dfd73ac2c4
2018-04-04 16:47:16 -07:00
Brian Vaughn e574b85db6 React sync for revisions 9d484ed...1c2876d
Reviewed By: gaearon

Differential Revision: D7500761

fbshipit-source-id: 8dc1cda879942fc4990b23144a616039fdbe6dc0
2018-04-04 15:20:13 -07:00
Gustav Ahlberg c787e0e252 exclude React/Fabric/ from core
Summary:
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.

<!--
  Required: Write your motivation here.
  If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->

React native does not build on iOS when using Podspec environment. I tried the solution proposed in https://github.com/facebook/react-native/issues/18683 and got it to build.

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

<!--
  Required: Write your test plan here. If you changed any code, please provide us with
  clear instructions on how you verified your changes work. Bonus points for screenshots and videos!
-->

<!--
  Does this PR require a documentation change?
  Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->

<!--
  Required.
  Help reviewers and the release process by writing your own release notes. See below for an example.
-->

[IOS] [BUGFIX] [React.podspec] - Exclude `React/Fabric/*` from Core subspec
<!--
  **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 ] [ {Filename}  ]
  [ IOS      ] [ FEATURE     ] [ {Directory} ]   |-----------|
  [ ANDROID  ] [ MINOR       ] [ {Framework} ] - | {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
-->
Closes https://github.com/facebook/react-native/pull/18688

Differential Revision: D7505267

Pulled By: hramos

fbshipit-source-id: 8e7138ee966d08209a74193e418feaecceefb86a
2018-04-04 13:30:35 -07:00
Dominik Wienand 0b4f33c2d0 Use .includes instead of .startsWith for checking ignored YellowBox warnings
Summary:
Some warnings don't have a good prefix that can be targeted using .startsWith, e.g. "Module $modulename requires main queue setup". It would be helpful to be able to select this warning using the much more specific middle part of the string ("requires main queue setup since it overrides `constantsToExport`) so I want to change this check from startsWith to includes to enable that.

Changing from .startsWith -> .includes should be completely backward compatible.

Reviewed By: TheSavior

Differential Revision: D7445309

fbshipit-source-id: 2c91dbe5ee3c3aa74be1bca091b20d294e64e853
2018-04-04 13:30:35 -07:00
David Vacca 3cd2b43426 [yoga re-add assertion to check for owner reference before adding child.
Reviewed By: emilsjolander

Differential Revision: D7495417

fbshipit-source-id: b81174aeea3f2796d76ccdae4a8eddd0beace0aa
2018-04-04 10:54:35 -07:00
Lukas Wöhrl 24f574032a Fix compilation on MSVC by moving YGConfig to C++
Summary:
This PR fixes the compilation on MSVC. I moved the `YGConfig` creation to a C++ constructor.

Addionally it removes the "dot" notation on `YGValue`, I didn't want to change that type to a C++ constructor, because I think this will break the ABI.
Closes https://github.com/facebook/yoga/pull/746

Differential Revision: D7498141

Pulled By: emilsjolander

fbshipit-source-id: 5f5308ff838dcd803065785ddc08b2404524acb9
2018-04-04 10:00:53 -07:00
Pritesh Nandgaonkar c041c9fd62 clean up experimental setup and keep using ffast-math flag
Reviewed By: emilsjolander

Differential Revision: D7414228

fbshipit-source-id: 320e1b1953f6af867b13e617af7872eb8999160e
2018-04-04 08:31:53 -07:00
Pritesh Nandgaonkar 4841aed82c Change the return type of getMarginForAxis to YGFloatOptional
Reviewed By: emilsjolander

Differential Revision: D7350337

fbshipit-source-id: dd1ee2fcd295ccd14f7d414ab0c24090b24e91e0
2018-04-04 08:31:53 -07:00
Pritesh Nandgaonkar 3a65fa56c5 Change the return type of getTrailingMargin to YGFloatOptional
Reviewed By: emilsjolander

Differential Revision: D7350221

fbshipit-source-id: 61a67364c1975ec6dd1883bc2cb4968b830c73df
2018-04-04 08:31:53 -07:00
Pritesh Nandgaonkar 1024e98b95 Changed the return type of getLeadingMargin to YGFloatOptional
Reviewed By: emilsjolander

Differential Revision: D7349907

fbshipit-source-id: b20894fbc33fd5b29a28f3c9174d1b5f406774ab
2018-04-04 08:31:53 -07:00
Pritesh Nandgaonkar f0490d1217 Refactored relativePosition private method to YGFloatOptional return type
Reviewed By: emilsjolander

Differential Revision: D7344939

fbshipit-source-id: 72443d38426a211d3e84be814e6a61baf4d26703
2018-04-04 08:31:53 -07:00
Pritesh Nandgaonkar de70bc74d5 Change the type of getTrailingPosition to YGFloatOptional
Reviewed By: emilsjolander

Differential Revision: D7344710

fbshipit-source-id: eb4c422b6e0f55d90b083221aa8ff1ab797d58a8
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar f3c2ab306c Changed the type of return value of getLeadingPosition to YGFloatOptional
Reviewed By: emilsjolander

Differential Revision: D7344367

fbshipit-source-id: 0f5a667ca357b2ce056c86763aa3e9e4c54b82f0
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar 0186ccf006 Changed the type of computedFlexBasis to YGFloatOptional in YGLayout
Reviewed By: emilsjolander

Differential Revision: D7340413

fbshipit-source-id: 39247b2b582a682e602f49f58b4bbd2bf0c995af
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar fe3a9d4013 Fixed types of getLeadingPaddingAndBorder and getTrailingPaddingAndBorder to YGFloatOptional
Reviewed By: emilsjolander

Differential Revision: D7339998

fbshipit-source-id: aa24335c2db1cd895b9711214b72195add718c32
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar ee0d621d2a Changed the return type of trailing padding to YGFloatOptional
Reviewed By: emilsjolander

Differential Revision: D7339712

fbshipit-source-id: 483c5886838c14b17cb731c81abb9fc80f519956
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar 51f5cd4810 Updated the implementation of leading padding
Reviewed By: emilsjolander

Differential Revision: D7336690

fbshipit-source-id: b2a2f010026f26fc2cc9fb35ad921da8f7017c9f
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar 20e5193207 Make the return type of YGNodeBoundAxisWithinMinAndMax to YGFloatOptional
Reviewed By: emilsjolander

Differential Revision: D7323382

fbshipit-source-id: 8e3eb4f3744b5f3f9e2b353f56184905f7557191
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar dbb2c6b0fd Remove the use of YGUnwrapOptional from YGConstrainedMaxSizeForMode
Reviewed By: emilsjolander

Differential Revision: D7322743

fbshipit-source-id: d825c60bcdc9ecdc0c784a215dc6b1b8a7a7860e
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar 2ace555972 Made the acccessors method to return const references
Reviewed By: emilsjolander

Differential Revision: D7321801

fbshipit-source-id: 9fc4da724bc2f58a0d95824ca3c0b5bf1690bccf
2018-04-04 08:31:52 -07:00
Lukas Wöhrl d4add3fc1c Fix float type mismatch on endOfLineIndex and inside rounding
Summary:
This PR fixes a type mismatch on `endOfLineIndex` where it should be of type `uint32_t` while it is of type `float`

Additonally it fixes some `double` casting in the rounding methods.
Closes https://github.com/facebook/yoga/pull/745

Differential Revision: D7494519

Pulled By: emilsjolander

fbshipit-source-id: 30a86574ce163458a6888f61a902d0640c1874fb
2018-04-04 06:49:19 -07:00
Sunny Luo cdfc346092 Fix wrong root path in RNTester gradle config
Summary:
Currrent(0.54-stable) root path in RNTester gradle config would cause a failure when trying to compile a release version for RNTester:
```
module.js:545
    throw err;
    ^

Error: Cannot find module ’TheParentDirectoryOfCurrentRepo/local-cli/cli.js'
    at Function.Module._resolveFilename (module.js:543:15)
    at Function.Module._load (module.js:470:25)
    at Function.Module.runMain (module.js:690:10)
    at startup (bootstrap_node.js:194:16)
    at bootstrap_node.js:666:3
:RNTester:android:app:bundleReleaseJsAndAssets FAILED
```

[ANDROID] [INTERNAL] [RNTester] - Fix wrong root path in RNTester gradle config
Closes https://github.com/facebook/react-native/pull/18553

Differential Revision: D7488301

Pulled By: mdvacca

fbshipit-source-id: b49a01820957eb77daeca9c0949f662b668f2bd1
2018-04-03 19:28:39 -07:00
Kyle Roach 746945824a fix(RCTImageLoader): Adds `requiresMainQueueSetup` to fix v0.52
Summary:
<!--
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!

-->

In react-native v0.52 this warning shows:
```
"RCTImageLoader requires main queue setup
since it overrides `init` but doesn't implement `requiresMainQueueSetup`".
```
This removes the warning by implementing `requiresMainQueueSetup` on RCTImageLoader

* Create new react-native project
* Enable Remote JS Debugging
* Should see no warning regarding RCTImageLoader requiring main queue setup

<!--
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] [Libraries/Image/RCTImageLoader.m] - Implements `requiresMainQueueSetup`
Closes https://github.com/facebook/react-native/pull/17679

Reviewed By: shergin

Differential Revision: D7159601

Pulled By: fkgozali

fbshipit-source-id: e17bae67f4005d2c9ddd0d3701506521f3cac152
2018-04-03 16:41:43 -07:00
Pritesh Nandgaonkar f84f4fd04a Changed the return type of YGResolveValueMargin to YGFloatOptional
Reviewed By: emilsjolander

Differential Revision: D7304090

fbshipit-source-id: cbec03a9367cf34976d083ad475d4da0b736e6d2
2018-04-03 15:02:57 -07:00
Pritesh Nandgaonkar 63c073d994 Move equaltiy function from utils to an operator on YGFloatOptional
Reviewed By: emilsjolander

Differential Revision: D7303460

fbshipit-source-id: 41ec0076ace621ec1a5bdbab00b72eea57780fff
2018-04-03 15:02:57 -07:00
Pritesh Nandgaonkar bcd12f1e87 Change the type of aspect Ratio to YGFloatOptional
Reviewed By: emilsjolander

Differential Revision: D7302651

fbshipit-source-id: 53e3b4c9627207a379f927b1f3485e36a9c70601
2018-04-03 15:02:57 -07:00
Pritesh Nandgaonkar e5a4d59244 Remove the usage of YGUndefined for kYGValueAuto and fix setter and getter of dimensions
Reviewed By: emilsjolander

Differential Revision: D7302453

fbshipit-source-id: e002a1ddd75bfc6fe142a7275e7913c064972e16
2018-04-03 15:02:56 -07:00
Paco Estevez Garcia 976712afa3 Replace RN exception handling override with new version
Reviewed By: Hypuk

Differential Revision: D7385541

fbshipit-source-id: 287d3f4d681046f740ed0552e00a2249c3803a0b
2018-04-03 06:01:37 -07:00
Douglas Lowder 201e74f9b7 Fix tvOS build breakage in RCTAnimation Xcode project
Summary:
`RCTSubtractionAnimatedNode.m` was not added to the tvOS build of RCTAnimation... this PR fixes the issue.

tvOS CI should succeed after this change.

[TVOS] [BUGFIX] [RCTAnimation] Fix build breakage
Closes https://github.com/facebook/react-native/pull/18663

Differential Revision: D7483586

Pulled By: hramos

fbshipit-source-id: 521152d829b064b7002dc8651a0558373c5505f8
2018-04-02 22:33:45 -07:00
Christian Brevik d4fb87b0b8 Add iOS 10 textContentType for TextInput
Summary:
Setting `textContentType` will provide the keyboard and system with semantic meaning for inputs. Should enable password/username autofill in apps running on iOS 11+ as demonstrated here: https://developer.apple.com/videos/play/wwdc2017/206/

Also gives you the ability to disable autofill by setting `textContentType="none"`: https://stackoverflow.com/questions/48489479/react-native-disable-password-autofill-option-on-ios-keyboard

Adding `textContentType` equal to `username` or `password`  should give you an autofill-bar over the keyboard which will let you fill in values from the device Keychain:

![image](https://user-images.githubusercontent.com/4932625/37848513-b2170490-2ed4-11e8-85bf-895823d4f98a.png)

Setting the appropriate `textContentType` will fill in the correct value in the `TextInput`.
I have only been able to get this to work on device, and not simulator.

Usage:
```jsx
<TextInput
    value={this.state.username}
    onChangeText={this.setUserName}
    textContentType="username"
/>
```

```jsx
<TextInput
    value={this.state.password}
    onChangeText={this.setPassword}
    secureTextEntry={true}
    textContentType="password"
/>
```

To disable:
```jsx
<TextInput
    value={this.state.password}
    onChangeText={this.setPassword}
    secureTextEntry={true}
    textContentType="none"
/>
```

This will set `textContentType` to an empty string: https://stackoverflow.com/a/46474180/5703116

<!--
  Does this PR require a documentation change?
  Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->

Docs PR coming up.

[IOS] [MINOR] [TextInput] - Added `textContentType` prop for iOS 10+. Will enable password autofill for iOS 11+.
Closes https://github.com/facebook/react-native/pull/18526

Differential Revision: D7469630

Pulled By: hramos

fbshipit-source-id: 852a9749be98d477ecd82154c0a65a7c084521c1
2018-04-02 02:46:43 -07:00
David Vacca 8a99241f81 Re-enable Yoga cloning in React Shadow Node
Reviewed By: achen1

Differential Revision: D7435365

fbshipit-source-id: 3e04b3252945112cf0c7206b0e6fb63535499eb9
2018-04-01 18:32:12 -07:00
David Vacca 5be4ff0261 Extend Yoga to be able clone Yoga Node with new children
Reviewed By: emilsjolander

Differential Revision: D7245421

fbshipit-source-id: 72578c8261f29e4a12fc6c72a91f2f891cd58d48
2018-04-01 18:32:12 -07:00
David Vacca 29ff30c539 Rename YogaNode.parent -> YogaNode.owner
Reviewed By: priteshrnandgaonkar

Differential Revision: D7352778

fbshipit-source-id: dcf1af5e72bfc3063b5c4bda197d7952a9194768
2018-04-01 18:32:12 -07:00
David Vacca aff5a75d8e Refactor cloning of YogaNode
Reviewed By: priteshrnandgaonkar

Differential Revision: D7339832

fbshipit-source-id: 2de6f47ae7601ac083d3b9fbe10ffaf6307ae760
2018-04-01 18:32:12 -07:00
David Vacca d58ba8242b Avoid app crashing when a StackOverflowError is thrown when rendering deep RN view hierarcy
Reviewed By: achen1

Differential Revision: D7400906

fbshipit-source-id: faaf701a88440f89390518f00e6a35f19e9203db
2018-03-31 23:37:54 -07:00
Vladislav Pilgasov 4906f8d28c Add an implementation of Animated.subtract
Summary:
Fixes #18451

I've added another example to NativeAnimationsExample, which makes use of `Animated.substract()`, let me know if the example is not desired / doesn't add much value. Below two GIFs of the new method working on iOS and Android:

<img width="320" src="https://user-images.githubusercontent.com/1437605/38154748-165cc5f8-3474-11e8-8b31-504444271896.gif" />
<img width="320" src="https://user-images.githubusercontent.com/1437605/38154749-1679bff0-3474-11e8-80b1-b558d44e0494.gif" />

<!--
  Required: Write your test plan here. If you changed any code, please provide us with
  clear instructions on how you verified your changes work. Bonus points for screenshots and videos!
-->

https://github.com/facebook/react-native-website/pull/276

[GENERAL] [ENHANCEMENT] [Animated] - Implemented Animated.subtract
Closes https://github.com/facebook/react-native/pull/18630

Differential Revision: D7462867

Pulled By: hramos

fbshipit-source-id: 4cb0b8af08bb0c841e44ea2099889b8c02a22a4a
2018-03-30 21:08:52 -07:00
Valentin Shergin 1f27098a1a Fabric: Proper Yoga node dirting in YogaLayoutableShadowNode
Summary: Any change must be propagate upwards.

Reviewed By: mdvacca

Differential Revision: D7389058

fbshipit-source-id: 09c74640d0e9607d2e17bdd31d7ce69df8565f72
2018-03-30 12:25:51 -07:00
David Aurelio 550339c71b Add `JReadableByteChannel`
Summary:
Adds `JReadableByteChannel`, which maps to `java.nio.ReadableByteChannel`.
This class is useful to stream data from Java to C++ memory (in conjunction with `JByteBuffer`).

Differential Revision: D7437312

fbshipit-source-id: 4979706148f0e20228f0f52341fb340497c24a8b
2018-03-29 23:06:55 -07:00
Kevin Gozali 1020ac9481 OSS: add gradle wrapper helper to prepare offline gradle caches
Summary:
This is to help build offline module caches for gradle builds.

allow-large-files

Reviewed By: hramos

Differential Revision: D7441450

fbshipit-source-id: 37ceb070223f0de06720f5c104ecfce2ad6cedfd
2018-03-29 21:17:02 -07:00
Ram N ee0c69dfa6 Keep nativeIDs immutable in ReactFindViewUtil
Reviewed By: mdvacca

Differential Revision: D7430144

fbshipit-source-id: c8e8242c1c3216258e4b8c27623160338e2578d8
2018-03-29 16:12:10 -07:00
Héctor Ramos 9bdc31069a Update Android Docker images
Summary:
yarn docker-build-android-base
yarn docker-build-android

[INTERNAL] [MINOR] [ContainerShip] - Bump versions in Dockerfiles
Closes https://github.com/facebook/react-native/pull/18597

Differential Revision: D7433542

Pulled By: hramos

fbshipit-source-id: 5ec7496c84203a0ed20ef3875ac3d367914a0e80
2018-03-29 11:32:42 -07:00