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

15637 Коммитов

Автор SHA1 Сообщение Дата
David Aurelio 206705892f Use bitfields for enum members of `YGStyle`
Summary:
@public

Puts all enum fields of `YGStyle` into bitfields. This saves 36 bytes (> 3%) per node.

Reviewed By: SidharthGuglani

Differential Revision: D13439606

fbshipit-source-id: b60a5444762041bc6f8cc5e04757034cb6893b30
2018-12-13 07:16:46 -08:00
David Aurelio bb1b80b763 Remove templates for setting/getting style properties
Summary:
@public

Replaces the `StyleProp` template with a simple setter macro / inlined getter code.

The template was introduced to replace more extensive macros that would generate function signatures, too.
Here, we keep the spirit of that change by only generating function bodies.

Reviewed By: SidharthGuglani

Differential Revision: D13439612

fbshipit-source-id: 36f6a86917d035be6891cb736d1f288d8e02f5cf
2018-12-13 07:16:46 -08:00
David Aurelio 05d90c3013 `YGNodeBoundAxisWithinMinAndMax` accepts `YGFloatOptional`
Summary:
@public

Saves some calls to `.unwrap()`

Reviewed By: SidharthGuglani

Differential Revision: D13439600

fbshipit-source-id: ce0f6bad9a0709e9d64e23d8349bc2423b9b2ad4
2018-12-13 07:16:46 -08:00
David Aurelio 3e3972628c Remove unnecessary `static` keyword
Summary:
@public

Header-declared inline functions shouldn’t be decleared `static`

Reviewed By: SidharthGuglani

Differential Revision: D13439607

fbshipit-source-id: 89555bb19a3fff6e29ca4afc10fe15fecca8fa17
2018-12-13 07:16:46 -08:00
David Aurelio 41c326ee9f Get rid of `static_cast` in `YGResolveValue`
Summary:
@public

Removes `static_cast` from `YGResolveValue`

Reviewed By: SidharthGuglani

Differential Revision: D13439605

fbshipit-source-id: 8736541c8e1d43fd698d368cb4f3211ffd929364
2018-12-13 07:16:46 -08:00
David Aurelio a56b67fa9b Inline `YGFloatOptional` completely
Summary:
@public
`YGFLoatOptional` only contains trivial functionality. Make it header-only.

Reviewed By: SidharthGuglani

Differential Revision: D13439609

fbshipit-source-id: 3f3c6c3a15e05ac55da2af30eb629f786ecb90a9
2018-12-13 07:16:45 -08:00
David Aurelio 688b3195c3 Pass `YGFloatOptional` by value, not reference
Summary:
@public

`YGFloatOptional` is a 32bit type now, and can be passed by value efficiently.

Reviewed By: SidharthGuglani

Differential Revision: D13439603

fbshipit-source-id: e12539ad5b3cccbd5bc27869866ca66c023b24a7
2018-12-13 07:16:45 -08:00
David Aurelio ada4831580 Eliminate `YGFloatOptional::getValue()`
Summary:
@public

Replace `YGFloatOptional::getValue()` with `YGFloatOptional::unwrap()`.

`YGFloatOptional::getValue()` has the unfortunate property of calling `std::exit` if the wrapped value is undefined.

Here, we eliminate the method, and just call `.unwrap()` everywhere.

Reviewed By: shergin

Differential Revision: D13439608

fbshipit-source-id: 5ae82b170537d0a10c301412567a7a66fd50bab4
2018-12-13 07:16:45 -08:00
David Aurelio 110c1c260f Remove `YGUnwrapFloatOptional`
Summary:
Replaces `YGUnwrapFloatOptional` with `YGFloatOptional::unwrap`.

This leads to more idiomatic C++, and to less function call nesting, thus increasing readability.

Reviewed By: SidharthGuglani

Differential Revision: D13439604

fbshipit-source-id: 33b43c08d725c253c359959e7cbbd83fd6bd9ba4
2018-12-13 07:16:45 -08:00
David Aurelio f90c2fb3f6 Store `YGFloatOptional` in 32 bits
Summary:
@public

After removing `-ffast-math`, `NaN` can again be used to represent `undefined`. That allows us to remove the additional flag from `YGFloatOptional`, and reduce memory usage.

Reviewed By: SidharthGuglani

Differential Revision: D13439611

fbshipit-source-id: 93e90f72f0415edb228b4e7d145e1fae35cc6b43
2018-12-13 07:16:45 -08:00
David Aurelio 2d6a10028f Add tests for `YGFloatOptional`
Summary:
@public

Adds tests for `YGFloatOptional`, to ease refactorings.

Reviewed By: SidharthGuglani

Differential Revision: D13439610

fbshipit-source-id: e29da7f85ccedc46520b59f6c893bad521d35417
2018-12-13 07:16:45 -08:00
David Aurelio 568472231f Make equality operator for `YGValue` inlineable
Summary:
@public

Makes `operator==` for `YGValue` an inline function.

Reviewed By: SidharthGuglani

Differential Revision: D13439601

fbshipit-source-id: c5dd1f35c40f0ffa8224ee2f40ac7cc3cd8e3cf9
2018-12-13 07:16:45 -08:00
David Aurelio b5c66a3fbe Move out `YGValue`
Summary:
@public

Creates a single header file for `YGValue`. This is in preparation of a more compact representation of `YGValue` within `YGStyle`.

Also fixes the incorrect definition of NAN.

Reviewed By: SidharthGuglani

Differential Revision: D13439602

fbshipit-source-id: 68eef2c391b6c9810f3c995b86fff7204ebe6511
2018-12-13 07:16:45 -08:00
David Aurelio 6f70d4c0ac Roll back `-ffast-math`
Summary:
@public

`-ffast-math` does not have measurable performance benefits.

By using `NaN` for *undefined* values again, we can squeeze `YGFloatOptional` into 32 bits.
This will also enable us to store `YGValue` (or a variant of it) in 32 bits.

Reviewed By: astreet

Differential Revision: D13403925

fbshipit-source-id: b13d026bf556f24ab4699e65fb450af13a70961b
2018-12-13 07:16:45 -08:00
Ram N 96e4a72679 Add definations for ReadableArray and WritableArray
Summary: In TurboModules, we need to call into WritableArray and ReadableArray interfaces, not their implementations. By adding these interfaces, we can invoke the corresponding Java classes directly.

Reviewed By: fkgozali

Differential Revision: D6981870

fbshipit-source-id: 12b12b204a7d38b24363452ab574d88b827c907f
2018-12-13 07:09:24 -08:00
David Aurelio 1decf879f8 Back out "[yoga][PR] Fix aspect ratio when stretching with main axis margin"
Summary: Original commit changeset: 6970e6072e79

Reviewed By: mdvacca

Differential Revision: D13437552

fbshipit-source-id: 65a55d716da6b6582e38efa906d3f540e58418bf
2018-12-12 16:20:45 -08:00
Blair Vanderhoof 4ed3344275 Update react-test-renderer to support hooks
Summary: The current version of react-test-renderer is throwing an error when we use hooks. Upgrading to 16.7.0-alpha.2 fixes it.

Reviewed By: sahrens

Differential Revision: D13104634

fbshipit-source-id: ac7f8d603293907c8653e247563a4d12413b10b9
2018-12-12 14:39:34 -08:00
Fred Liu 1a499f43b2 Enable removeClippedSubviews on Android only for improved scrolling performance
Summary: Android scrolling performance is very poor with this disabled. iOS has some KP with this enabled, so disable it for iOS.

Reviewed By: sahrens

Differential Revision: D13363494

fbshipit-source-id: efab77b5db9676dd0521ae4193465d45ac34dda3
2018-12-12 12:55:02 -08:00
Ram N dc52cc5a8f Add defination for ReadableMap interface
Summary: In ReactNative, Native Modules usually use `ReadableMap` interface to take in arguments to methods, not `ReadableNativeMap`. Adding this interface defination to C++, so that with TurboModules, we could use it with `getMethod` definations.

Reviewed By: fkgozali

Differential Revision: D6721049

fbshipit-source-id: cb6e82d618338e54199c7dd066a846e71e742bc6
2018-12-12 10:36:51 -08:00
Rafael Oleza c9dc1c68a2 Create metro-react-native-babel-transformer package
Summary:
By having this package we can remove the dependency from `react-native` to `metro` and then unblock the releases of metro to npm.

We cannot use this package yet from `react-native` since it hasn't been published, what I'm gonna do here is the following:

1. Land this diff
2. Publish manually a version of `metro-react-native-babel-transformer@0.50.0` once this diff lands.
3. Update the RN repo to depend on `metro-react-native-babel-transformer` instead of `metro`.

Then we should be able to publish versions of metro :)

Differential Revision: D13432231

fbshipit-source-id: 522152e32162cc5fc40aea2fa4c8fd53c528e2e3
2018-12-12 09:42:15 -08:00
Rick Hanlon 3bef4bddbf Measure responder region on first state transition
Summary:
This diff fixes a bug in Touchable and Pressability where a long delay setting would unwillingly trigger presses by the user.

The cause of this bug is that we were not calculating the responder region until _after_ the delay. If you were to lift up outside of the press rect _before_ we calculate the responder region, we wouldn't be able to calculate that you're outside of the region (i.e. never transitioned to an "out" state) and would register the press

The fix is to start the calculation as soon as you transition into the initial state, so the calculation is available by the time we need to check if you're in an out state

Reviewed By: TheSavior

Differential Revision: D13412934

fbshipit-source-id: 55d1c2a9e70d4e3ce268f92075d7d09dd842a81e
2018-12-11 22:40:49 -08:00
David Vacca f8bc32abb0 AutoFormat ReactWebViewManager
Summary: easy diff to auto format ReactWebViewManager using our current java code guidelines

Reviewed By: fkgozali

Differential Revision: D13425320

fbshipit-source-id: e59407751c324896e9d6aea8a356949e7cadccaa
2018-12-11 21:28:53 -08:00
David Vacca d1b90ee9e2 Allow to toggle Android WebView HardwareAcceleration from JS
Summary:
This diff exposes a new prop for WebView in Android to disable HardwareAcceleration.
Disabling hardware acceleration is sometimes required to workaround chromium bugs: https://bugs.chromium.org/p/chromium/issues/detail?id=501901

Reviewed By: fkgozali

Differential Revision: D13425243

fbshipit-source-id: e3cd53c72d01f74624b60834496f3cc44076b6b5
2018-12-11 21:28:53 -08:00
Nat Mote aaa4a38fbc Upgrade to Flow v0.88.0
Summary:
allow-large-files

https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/#update-xplat-js

Reviewed By: samwgoldman

Differential Revision: D13418170

fbshipit-source-id: 91ab0d2788c1061b8c81a39f8a017eedea48abe2
2018-12-11 20:01:00 -08:00
Comical DERSKEAL 448a665286 Update CompositeReactPackage.java (#21421)
Summary:
Fixed a typo in function doc.

Release Notes:
--------------
[INTERNAL][MINOR][CompositeReactPackage.java] - Updated a function documentation.

<!--
  **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
-->
Pull Request resolved: https://github.com/facebook/react-native/pull/21421

Differential Revision: D13422878

Pulled By: hramos

fbshipit-source-id: ce08080d67652159c7f8bbb1ac8b0bfada814b4b
2018-12-11 18:46:26 -08:00
Birkir Rafn Guðjónsson ba9c208cdf Support additional UIBarStyle's in RCTConvert (#20102)
Summary:
Adds two additional UIBarStyles to RCTConvert

- [x] UIBarStyleBlackOpaque
- [x] UIBarStyleBlackTranslucent

Does not affect any tests or current usage of this conversion.
Pull Request resolved: https://github.com/facebook/react-native/pull/20102

Differential Revision: D13421942

Pulled By: hramos

fbshipit-source-id: 1e609eca0fdea2b56b9f6ac87e759c661bdee12b
2018-12-11 17:43:24 -08:00
Mike Marcacci f59d79caba Fix #20991 - use name from app.json if available (#20992)
Summary:
Fix #20991 - use name from `app.json` if available, instead of using `package.json`.
Pull Request resolved: https://github.com/facebook/react-native/pull/20992

Differential Revision: D13422928

Pulled By: hramos

fbshipit-source-id: 72dd07e82a366439f663508b07c1de5ca59b9dbf
2018-12-11 17:24:38 -08:00
Sunny Luo 0314fca63a Use relative path for SCRIPTDIR (#22598)
Summary:
Fixes https://github.com/facebook/react-native/issues/22521

The current approach has an issue with white spaces when compiling in Xcode 10.1

![space](https://user-images.githubusercontent.com/615282/49782648-07836f80-fd52-11e8-952f-b93f8c593c60.png)

Change back to relative path fixes this issue
Pull Request resolved: https://github.com/facebook/react-native/pull/22598

Differential Revision: D13421446

Pulled By: hramos

fbshipit-source-id: 688157b2e951399059cb6c95e2a6ce8d176e9b9c
2018-12-11 13:30:07 -08:00
David Vacca aeaeac88f8 Disables StateListAnimator for React Slider Android 6 and 7
Summary:
This diff disables the StateListAnimator for the ReactSlider component in Android 6 and 7
This is this is a hack to prevent T37452851 and https://github.com/facebook/react-native/issues/9979

Reviewed By: yungsters

Differential Revision: D13404685

fbshipit-source-id: d4c4f8796664c890f6a6b3502d3493370e17c300
2018-12-11 11:54:59 -08:00
David Vacca 39b6890346 Fix crash when removing root nodes
Summary: If a children of a root node is being removed and the Root Node is empty, it was likely already removed and cleaned previously, likely due to a race condition caused by RN's async nature. In those cases, let's avoid crashing the app and instead silently ignore the root view removal.

Reviewed By: fkgozali

Differential Revision: D13405817

fbshipit-source-id: 0179d10a88a2d19f1db5ea35b48cb83d9d7429a6
2018-12-11 03:28:04 -08:00
Kevin Gozali 2918679479 iOS: ignore extra modules during bridge start up if it's marked for TurboModule
Summary: Currently, bridge delegate can provide extra modules during bridge start up path. For TurboModules, we don't need this mechanism (if we need eager init, it will be done in a different way). So, let's ignore modules marked as RCTTurboModule if they are supplied as "extra native modules".

Reviewed By: axe-fb

Differential Revision: D13383710

fbshipit-source-id: c88d32739be9f66e0daf07ef5465ea6457f8d1c6
2018-12-11 00:00:56 -08:00
Josh Justice 33fb70f6b6 Remove persistence from RNTester app (#22596)
Summary:
Previously the RNTester app saved what screen you were on and what filter text was entered into the initial screen. This made e2e testing complex, as each test needed to manually restore the state to the home screen. If the state ever got out of sync with the test's expectations, it could lead to multiple failed tests.

There is still one specific component that uses persistence: `RNTesterSettingSwitchRow`. Persistence can be removed from this component next time tests for it are updated. As a result, `RNTesterStatePersister` is not yet entirely removed from the app.
Pull Request resolved: https://github.com/facebook/react-native/pull/22596

Differential Revision: D13413457

Pulled By: cpojer

fbshipit-source-id: 3faa26a94139397b4bce6b62ff43e9c2f870b145
2018-12-10 21:36:52 -08:00
Salakar 794d2264f9 Allow 'userInfo' for native promise.reject + add native error stack support (#20940)
Summary:
As mentioned [here](https://github.com/react-native-community/react-native-releases/issues/34#issuecomment-417718601), Android is missing native Promise reject with a `userInfo` `WritableMap` support and also `nativeStack` support (which addresses `TODO(8850038)`). This PR adds Android support for both of these.

React Native on iOS ([here](https://github.com/facebook/react-native/blob/master/React/Base/RCTUtils.m#L433)) and Windows ([here](https://github.com/Microsoft/react-native-windows/pull/732)) already support this so this is a relatively minor addition to bring Android in line with the other platforms. (JS support is also [here](https://github.com/facebook/react-native/blob/master/Libraries/BatchedBridge/NativeModules.js#L145-L148))

Existing methods remain unchanged other than general cleanup of variable names (`e -> throwable`) and adding code comments/docs.

Additionally, the `ShareTestModule` implementation of Promise (SimplePromise) was updated to reflect these changes - other line changes in this file are from formatting in Android Studio - if this is an issue let me know.

 - Currently inconsistent with other platforms.
 - Blocking a couple of issues over at [invertase/react-native-firebase](https://github.com/invertase/react-native-firebase) - save for re-writing everything to Promise resolve only - which is no small change and isn't a great solution either.
Pull Request resolved: https://github.com/facebook/react-native/pull/20940

Differential Revision: D13412527

Pulled By: cpojer

fbshipit-source-id: 2ca6c5f3db9ff2c2986b02edda80bc73432f66d3
2018-12-10 21:15:55 -08:00
Héctor Ramos 5194495e97 Propagate exit code in test_objc (#22562)
Summary:
Any failures in `test_objc` within the objc-test.sh script have been kept hidden as `xcpretty` was swallowing the exit code from xcodebuild.

Fixes the issue TheSavior brought up in #22470 where failing snapshot tests were not reflected on Circle.

Run on Circle CI and confirm `test_objc` fails (iOS tests *are* broken on master).
Pull Request resolved: https://github.com/facebook/react-native/pull/22562

Differential Revision: D13406987

Pulled By: hramos

fbshipit-source-id: 3f3da01ab4c0ad87077813b06d2fdf788f32f6b8
2018-12-10 20:34:12 -08:00
Christoph Nakazawa f8e13afb23 Remove react-native-cli
Summary: This is now part of https://github.com/react-native-community/react-native-cli/tree/master/packages/global-cli

Reviewed By: TheSavior

Differential Revision: D13396231

fbshipit-source-id: 9d490ae26bf90a79e20797c96be81f08562f4017
2018-12-10 19:08:10 -08:00
Christoph Nakazawa 63a6bb7637 Remove remaining references to local-cli
Summary: This removes the remaining references to `local-cli`. We already have a `cli.js` file on the root that was just forwarding to the local-cli folder, so I removed that. It also seems that `setupBabel.js` is no longer necessary in RN.

Reviewed By: TheSavior

Differential Revision: D13396218

fbshipit-source-id: a945cb91dae39c4b58c5cabcca6b0f0328fc4717
2018-12-10 19:08:10 -08:00
Christoph Nakazawa eb413bc9e0 Remove "babel-core" and other babel 6 modules.
Summary: We are using babel 7 and should not be using babel 6 any longer, this removes some references to babel 6 modules.

Reviewed By: yungsters

Differential Revision: D13137326

fbshipit-source-id: 4a2db84522e5613f72a8005f0b1e9943e815f9ec
2018-12-10 18:12:05 -08:00
Josh Justice 9cd6ae2f4b Updated Button e2e tests to look up elements via testID (#22593)
Summary:
Previously the e2e test for Butto looked up elements by label. This can be fragile, and based on my understanding from TheSavior we would prefer to use testIDs. This also sets a consistent pattern we can point future contributors to, to follow.

Note that we are still looking up elements in the alerts shown by label. I haven't yet looked into whether it would be possible to add testIDs to alerts; it might be too complex to be worth it.
Pull Request resolved: https://github.com/facebook/react-native/pull/22593

Differential Revision: D13410799

Pulled By: TheSavior

fbshipit-source-id: 4bda80f4b8e7fe3ef17cd33209ec86d9183fd5e9
2018-12-10 17:54:23 -08:00
Luis Flores f14edd8a0c Fix ListViewMock unique key error (#14894)
Summary:
Add key prop to renderHeader and renderFooter in ListViewMock.
Fix unique key error when using jest snapshots.

It closes #12762
Pull Request resolved: https://github.com/facebook/react-native/pull/14894

Reviewed By: TheSavior

Differential Revision: D13396721

Pulled By: cpojer

fbshipit-source-id: 5bbcb8157e3cd98fe07f2a037e1dbc06ab599c87
2018-12-10 17:13:54 -08:00
byronluk 6a483495c8 added utfsequence to react-native exports (#20955)
Summary:
Fixes #20935

Added UTFSequence module to React-Native exports. Put it under // APIs but I'm not certain if it belongs there.
Pull Request resolved: https://github.com/facebook/react-native/pull/20955

Differential Revision: D13396903

Pulled By: cpojer

fbshipit-source-id: 29cb2ee1431132bd7ca4973fecb0025cd6303a14
2018-12-10 17:10:23 -08:00
Marius Reimer ddc3471f88 set blob as default XMLHttpRequest header response type if supported (#22063)
Summary:
This is a problem that is discussed in issue #21092

Related issues: #21851 #19717

Found the code to eventually fix this issue [here](899b155746/fetch.js (L486))

- [x] Fetching an image locally and check if the blob is there, as well as its size > 0.

___
Help reviewers and the release process by writing your own release notes. See below for an example.

[GENERAL] [ENHANCEMENT] [whatwg-fetch] - set blob as default XMLHttpRequest header response type if supported
Pull Request resolved: https://github.com/facebook/react-native/pull/22063

Differential Revision: D13408797

Pulled By: cpojer

fbshipit-source-id: 9822d5a7e24bacd72838f3fc9a61b1a97b44484b
2018-12-10 16:59:20 -08:00
Ben Holcomb 6cc6f8f488 Revert D13402177: [react-native][PR] Map textContentType strings to Objective-C constants
Differential Revision:
D13402177

Original commit changeset: 55f4a2029cd3

fbshipit-source-id: b4871d10a9622f3312845a6682c482760e7e79e0
2018-12-10 13:05:12 -08:00
Levi Buzolic 077386a233 Map textContentType strings to Objective-C constants (#22579)
Summary:
Fixes #22578

Currently the only `textContentType` values that work are: `username`, `password`, `location`, `name` and `nickname`. This is due to the strings provided by React Native not matching up with the underlying string constants used in iOS (with the exception of the aforementioned types). Issue #22578 has more detail examples/explanation.
Pull Request resolved: https://github.com/facebook/react-native/pull/22579

Differential Revision: D13402177

Pulled By: shergin

fbshipit-source-id: 55f4a2029cd3ea1fb4834e9f56d2df5a05b31b4e
2018-12-10 12:11:51 -08:00
Josh Justice 1bc704d4c7 Add Touchable E2E tests (#22570)
Summary:
Adds some initial tests for Touchable*. It only tests the first screen worth of examples; in a separate PR I'll work on an alternate way to "scroll" to individual examples in tests, before I add tests for the rest of the Touchable examples.

On the live stream where I began writing these tests, I reorganized the "Touchable feedback examples" to the top of the list so it would be on-screen for testing. I didn't include this reorganization or test in this PR; that can be added in once the "alternative to scrolling" is added in, to avoid having to reorganize.

Changelog:
----------
[General] [Added] - Add E2E tests for Touchable
Pull Request resolved: https://github.com/facebook/react-native/pull/22570

Differential Revision: D13400348

Pulled By: TheSavior

fbshipit-source-id: 821af135296049090427a16472cc14dabeb10ab4
2018-12-10 10:58:15 -08:00
Emil Sjölander ee6b0d6658 Fix aspect ratio when stretching with main axis margin (#834)
Summary:
I've noticed that when a child's size is determined by `align-items: stretch` in combination with `aspect-ratio` its size is wrongly calculated to account for margin in the main axis when there is more than enough space.

See playground: https://goo.gl/tgW6cD

I've yet to figure out exactly how to solve this but i've started by writing a failing test when can be seen in the first commit here.

I assumed I had found the bug here https://github.com/facebook/yoga/blob/master/yoga/Yoga.cpp#L1838 where margin is being subtracted from the desired width even though the measure mode tells it to measure to exactly that size. However, if we don't remove this margin from the available width then 15 tests fail (including the one I just added) not quite figured out why yet. I'm also a bit confused at to why this would only happen for nodes with `aspect-ratio` and not for nodes where an explicit height and width is set.
Pull Request resolved: https://github.com/facebook/yoga/pull/834

Reviewed By: astreet

Differential Revision: D13223579

Pulled By: davidaurelio

fbshipit-source-id: 6970e6072e79f3bb6f9097355ab6e441441bfd88
2018-12-10 09:23:01 -08:00
Rafael Oleza c8047bfe66 Fix flow types
Summary:
This diff ignores the `react-native-local-cli` from being used internally.

Unfortunately, since `react-native-local-cli` has its own dependency on Metro, and using `yarn` selective resolutions causes some issues with `flow` rechecks that have not been resolved (https://fb.facebook.com/groups/flow/permalink/2220467474668522/), the easiest way to move forward is to just not install the `react-native-local-cli` package internally (we don't need it since we have our own cli).

Reviewed By: pvdz

Differential Revision: D13377495

fbshipit-source-id: 6d6edbd947104e050ad1c31a657fc21fe6848692
2018-12-10 08:36:29 -08:00
Elliott Sprehn 167d7861cb Don't crash on second resolve or reject in PromiseImpl. (#20303)
Summary:
Promise semantics per JS should allow calling resolve or reject repeatedly without crashing. Only the first one should do anything, but others should be allowed. This change fixes the Java bridge for Android. A separate change is needed for iOS.

Issue #20262
Pull Request resolved: https://github.com/facebook/react-native/pull/20303

Differential Revision: D13396975

Pulled By: cpojer

fbshipit-source-id: 81f14f73654fa7c44e043f574a39fda481ace44b
2018-12-10 05:56:22 -08:00
luckyzeng 3592122af3 Delete unused code in console.js (#20860)
Summary:
The isPrimitive method in [console.js](5c2720b089/Libraries/polyfills/console.js (L364)) is unused. It should be deleted.
Pull Request resolved: https://github.com/facebook/react-native/pull/20860

Differential Revision: D13396715

Pulled By: cpojer

fbshipit-source-id: ddfd828086106c997dcc77f5eae67adb6a0c1dfa
2018-12-10 05:48:32 -08:00
Josh Justice fb16af7944 Detox debug build (#22572)
Summary:
Adds a Detox configuration and instructions for running the app in development mode in Detox. This speeds up developing tests, because changes to production code don't require a full rebuild.
Pull Request resolved: https://github.com/facebook/react-native/pull/22572

Differential Revision: D13396883

Pulled By: cpojer

fbshipit-source-id: 186cc8d75eccae411b602cb0f68f0e11856e0743
2018-12-10 02:33:31 -08:00
Christoph Nakazawa 78132a0ab8 Fix weird `createAnimatedComponent` babel/flow bug
Summary: There are some versions of babel 7's flow support that cause problems with property initializers. I changed this code to use class properties to fix the issue. See https://github.com/facebook/react-native/issues/20588

Reviewed By: TheSavior

Differential Revision: D13396959

fbshipit-source-id: a76266ac0c8a6a19a1c45f7136de4aba9c72581d
2018-12-10 00:39:06 -08:00