Commit Graph

13414 Commits

Author SHA1 Message Date
Gabriele Mondada bfcfe7961d fix use of C++ syntax in an header file
Summary:
All public header files can be included from Obj-C and Swift, except RCTSurfaceSizeMeasureMode.h which contains C++ code.

Change is trivial and can be validated by review.

None.

[IOS][BUGFIX][{RCTSurfaceSizeMeasureMode.h}] - fix use of C++ syntax in an header file that could be included from Obj-C and Swift
Closes https://github.com/facebook/react-native/pull/18730

Differential Revision: D7550290

Pulled By: shergin

fbshipit-source-id: 3835e2c57697a067ff94afdaeaca06bce132ef66
2018-04-08 23:29:38 -07:00
Eric Rozell 4b6e9d3dfd Revert "Remove Platform check from WebSocket module"
Summary:
This reverts commit b9be28915c.

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.
-->

Fix #18696

<!--
  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!
-->

Run Jest tests.
Run WebSocket example from RNTester on Android.

<!--
  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.
-->

[CATEGORY] [TYPE] [LOCATION] - Message

<!--
  **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
-->
[ANDROID][BUGFIX][WebSocketModule] - revert change that regresses WebSocketModule
Closes https://github.com/facebook/react-native/pull/18733

Differential Revision: D7548850

Pulled By: hramos

fbshipit-source-id: b8c79810c1cd6e5a30ec4118bd5ff8ad719f04b9
2018-04-08 18:15:53 -07:00
gengjiawen 9874004711 enhance RNTester android config
Summary:
* cliPath is not config right
* root config can be better config instead of a relative path which can easily go wrong if location changed
* DeveloperSupport should only be in debug mode.

* make https://github.com/facebook/react-native/pull/18732 change on local.
* config signingConfig
* execute `./gradlew :RNTester:android:app:assembleRelease`, and run app on device to check everything is fine.

none

[GENERAL][ENHANCEMENT][RNTester]
Closes https://github.com/facebook/react-native/pull/18746

Differential Revision: D7548846

Pulled By: hramos

fbshipit-source-id: 8943f84a6c99456477dff2deeaacc96f093b2e09
2018-04-08 17:25:38 -07:00
Sebastian Markbage 9574f88701 Move takeSnapshot from React repo to RN
Reviewed By: sophiebits

Differential Revision: D7547298

fbshipit-source-id: 6ab0c0a9e244a2f68d27307b84285b2c8fff1342
2018-04-07 23:23:33 -07:00
Sam Mueller 554243eb56 Fix TouchHistoryMath import
Summary:
The reference needed to be updated after the file was moved in this commit:
06085d3836

Otherwise, results in the packager failing with the following error:
> Unable to resolve module TouchHistoryMath from /node_modules/react-native/Libraries/Interaction/PanResponder.js: Module TouchHistoryMath does not exist in the Haste module map
Closes https://github.com/facebook/react-native/pull/18732

Differential Revision: D7547181

Pulled By: sebmarkbage

fbshipit-source-id: 78028c2f46faa2ce130a1a0c25fcaca47d2516a8
2018-04-07 21:09:24 -07:00
David Vacca 16bed9e6e5 Support cloning of virtual ReactShadowNodes
Reviewed By: achen1

Differential Revision: D7542648

fbshipit-source-id: 58494db9f8525d4deabc6345f36941fa93a1d887
2018-04-07 00:51:13 -07:00
Liamandrew 3372541a2a Add ability for Animated views to be created with scale X or scale Y
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!

-->

*Accidentally closed previous PR*

Sometimes it can be useful to have an animated view be created with either scale X or scale Y in cases where scaleXY might not be as visually appealing.

Test Plan
Tested on both ios and android in the sample project:

https://github.com/Liamandrew/ScaleAnimationSample

![scaleanimation](https://user-images.githubusercontent.com/30114733/37023697-d0aa7372-217a-11e8-8d3b-2958c63ad83a.gif)
Closes https://github.com/facebook/react-native/pull/18220

Differential Revision: D7542334

Pulled By: hramos

fbshipit-source-id: 208472e5d8f5a04ca3c3a99adce77b035e331ef1
2018-04-06 17:46:54 -07:00
Kevin Gozali 667ca15893 android: don't process touch events too early
Summary: There can be a race when loading JS from rootview for the first time vs touching rootview before JS is ready. This may cause redbox on the JS side.

Reviewed By: mdvacca

Differential Revision: D7531334

fbshipit-source-id: 36ffa1e5ff205f60b95e0a1d1016301ea76936aa
2018-04-06 17:36:20 -07:00
Dulmandakh b0fa3228a7 Implement Image.defaultSource property on Android
Summary:
This pull request implements Image.defaultSource property on Android, using Fresco (http://frescolib.org/docs/placeholder-failure-retry.html), which will show placeholder image (local asset) while loading remote image. Implementation code is almost same with loadingIndicatorSource, but without rotation.

This requires release or production to bundle local images in an APK file.

This provides feature parity with iOS.

Set Image.defaultSource on Android, and will show it while loading Image.source.

```JSX
<Image
  defaultSource={require('<path to image>')}
  source={{uri: '<url to remote image>'}}
  style={{ height: 300, width: 300 }}
/>
```

[ANDROID] [FEATURE] [IMAGE] - Image.defaultSource will show local image as placeholder while loading remote Image.source.
Closes https://github.com/facebook/react-native/pull/18588

Differential Revision: D7540489

Pulled By: himabindugadupudi

fbshipit-source-id: 908ceb659b3416e517bba64c76a31879d965ec09
2018-04-06 16:03:00 -07:00
David Vacca bf7601fde1 Avoid holding references to ReactShadowNode after a tree is commited
Reviewed By: achen1

Differential Revision: D7495721

fbshipit-source-id: 33d5bba5040729f891455a9c330234fe25130b02
2018-04-06 15:17:51 -07:00
David Vacca 9fd2b9a75f Add more logs into FabricUIManager and ReactShadowNodeImpl
Reviewed By: shergin, achen1

Differential Revision: D7495615

fbshipit-source-id: 4227b6648aaff8d9fe59bff1d4f75fd546baae6a
2018-04-06 15:17:50 -07:00
David Vacca 84ae1c9aec Move execution of Yoga.calculateLayout method before diffing algorithm
Reviewed By: shergin

Differential Revision: D7495581

fbshipit-source-id: 63d2f2a66c53727dea7981837d6d0f896bac35d3
2018-04-06 15:17:50 -07:00
David Vacca e21bbee586 Mutate shared ReactShadowNode during Fabric.appendChild
Reviewed By: shergin

Differential Revision: D7495539

fbshipit-source-id: 2b2b06d3d4f02a00b01c7ed27d47b61787ea922f
2018-04-06 15:17:50 -07:00
Mike Grabowski 9736ddc061 Fix `run-ios` not turning on Simulator app
Summary:
Right now, `run-ios` will "boot" Simulator in the headless mode in the background, as long as the Simulator.app is not running. It is exactly what "detox" does - it executes your test suite in the background.

It seems to me that the author of this change was testing it with `Simulator.app` open.

In order to fix this behavior, we have to make sure it runs before we attempt booting.

This passed through the release process since we don't use `run-ios` there (it recommends turning on XCode and testing manually which is what I have done recently too).

Differential Revision: D7535693

Pulled By: hramos

fbshipit-source-id: 881db7740ace805ecefb98bfdb660e32aafd4664
2018-04-06 14:34:04 -07:00
Andrew Chen (Eng) c2b9be08f8 Thread safe renderComponent
Reviewed By: mdvacca

Differential Revision: D7528307

fbshipit-source-id: 1f22898c17f10b883965b03d5c95bbb3c39209c4
2018-04-06 12:52:03 -07:00
Mike Grabowski 159869d250 Fix: "Metro listenting on port undefined"
Summary:
Regression introduced in 2ad34075f1.

Fixes https://github.com/facebook/react-native/issues/18681
Closes https://github.com/facebook/react-native/pull/18722

Differential Revision: D7535684

Pulled By: hramos

fbshipit-source-id: 21bc79091148daba7b668965cd5becaa43117721
2018-04-06 10:44:07 -07:00
Angly Cat c6610577fd Fix launching iOS simulator regression
Summary:
PR #17284 (accepted in 2ad34075f1) introduced a couple of regressions.

~1. There's the code:~
```
.then((appName) => resolve(selectedSimulator.udid, appName));
/* ... */
.then((udid, appName) => {
```

~~This makes `appName` to be always `undefined` as per `resolve` accepts only 1 argument. This regression causes issues if an app name differs from a scheme name.~

~This PR fixes this by wrapping both values in an array.~

This was fixed in 589eae1432.

2. The code
```
child_process.execFileSync('xcrun', ['simctl', 'boot', selectedSimulator.udid]);
```
makes a simulator *boot*, but the simulator *doesn't launch*. That's a regression, which forces developers to launch simulators by other means (by running a number of elaborate console commands, by running Xcode, or by running a simulator manually).

This PR reverts that part of changes.

Create a blank project with a name that differs from scheme name. Try to `react-native run-ios` in it. See that a simulator is launched and installing succeeds. Without this changes simulator wouldn't launch, and installing step would fail because of app name mismatch.

[CLI][BUGFIX][local-cli/runIOS/runIOS.js] - Fix running on multiple simulators feature regressions
Closes https://github.com/facebook/react-native/pull/18711

Differential Revision: D7535150

Pulled By: hramos

fbshipit-source-id: 5c714231e9977c0c829b6f8c793497cd31cd46b5
2018-04-06 10:12:37 -07:00
Kevin Gozali 95f625e151 Fixed RNTester (iOS) xcode project to include new Yoga files
Summary: Recent commit that added YGConfig.h broke this project because the files were not added to it.

Reviewed By: shergin

Differential Revision: D7530369

fbshipit-source-id: 77129288905d25b94ad7aad4be43e0052a784163
2018-04-05 22:07:01 -07:00
Sebastian Markbage 06085d3836 Move TouchHistoryMath from React Repo to React Native
Summary:
This hasn't been used by React core for a while. It's unclear why it was in the first place.

We can move it back next to the Panresponder.

https://github.com/facebook/react/pull/12557

Reviewed By: sophiebits

Differential Revision: D7529949

fbshipit-source-id: ef9892cfa8d2d6768da216b81befabe02795a245
2018-04-05 22:07:01 -07:00
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