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

16005 Коммитов

Автор SHA1 Сообщение Дата
Kevin Gozali 45288a0f63 TM iOS C++: don't throw if a method is not found
Summary: Let JS decide if a missing method should be treated as an error, or whether it allows optional methods (e.g. methods that are only for android or for ios).

Reviewed By: JoshuaGross

Differential Revision: D14155799

fbshipit-source-id: 1e298b46a59761cf09e98147da885b1e9a9a675a
2019-02-20 14:55:08 -08:00
David Aurelio d53bfed9bb Add config for avoiding JNI refs
Summary:
@public

Adds `YogaConfig#avoidGlobalJNIRefs` to control whether nodes created with a config will use weak global JNI refs. Used for experimentation.

Reviewed By: SidharthGuglani

Differential Revision: D14149982

fbshipit-source-id: c777c8b3af2167d96154db5aa6afec1476dac35b
2019-02-20 11:59:21 -08:00
David Aurelio 17a27facc5 Add support for context-aware cloning functions
Summary:
@public

Context-aware cloning functions are an internal Yoga feature that will be used for Yoga’s JNI code.

It will be possible to specify a context when calculating layout, which will be passed on to cloning functions. This will be a private feature.

Reviewed By: SidharthGuglani

Differential Revision: D14149470

fbshipit-source-id: 1d11106e65f9d872d10f191763da001f8d158a61
2019-02-20 11:59:21 -08:00
David Aurelio 57fce665fb Clone children only during layout, allow mixing shared + owned children
Summary:
@public

Limit child cloning to layout calculation. This also allows for mixing shared and owned children.

Rationale:
We do allow for shared children if the caller manages themselves. The single known use case is React Native.

So far, we have cloned children eagerly whenever child lists are mutated, or layout is run. This was to allow for a quick check of the owner of any first child, assuming that either *all* or *no* child of a node are shared.

For Yoga/Java, we want to get rid of global weak JNI refs, and these are also used to invoke clone callbacks. We can achieve that goal by switching to an alternative approach, passing additional data to the layout pass. This additional data has to be passed to any configured cloning callback. Therefore, it is desirable to **only call cloning functions during the layout pass.**

The obvious solution seems to be to not uphold the invariant of the first child determining shared/owned state of all siblings, and allow for a mix of shared and own children.

Reviewed By: shergin

Differential Revision: D14136223

fbshipit-source-id: 34490cfeeb2170c99d6ed1b9bdcbcedb316813af
2019-02-20 11:59:21 -08:00
David Aurelio 9b6bbe69d6 Move node cloning to `YGConfig`
Summary:
@public

Encapsulates node cloning within `YGConfig`.
This is necessary for allowing for context-aware cloning functions, which will ultimately allow for removal of weak global JNI references.

Reviewed By: shergin

Differential Revision: D14132608

fbshipit-source-id: 0dec114c8e172b1e34a4b7fd146c43f13c151ade
2019-02-20 11:59:21 -08:00
Dulmandakh b4017a9923 bump gradle to 5.0, android gradle plugin to 3.3.1 (#23324)
Summary:
This PR bumps gradle to 5.0, which includes Kotlin DSL 1.0, and android gradle plugin to 3.3.1, which includes includes various bug fixes and performance improvements. Also Gradle 5.x requires Java 8.

This is preparation for Kotlin DSL migration.

[Android] [Changed] - Bump Gradle to 5.0

Pull Request resolved: https://github.com/facebook/react-native/pull/23324

Reviewed By: mdvacca

Differential Revision: D14028563

Pulled By: hramos

fbshipit-source-id: 61fe1a2d4ea5707d6f07945acbd950f852420e13
2019-02-20 11:42:54 -08:00
Eric Lewis 19866aee3d Fix 50 xcode warnings (#23553)
Summary:
This PR reduces the number of warnings in React from 68 to 18. Mostly by marking unused variables. RNTester's warnings are more than halved.

[iOS] [Fixed] - Xcode warnings
Pull Request resolved: https://github.com/facebook/react-native/pull/23553

Differential Revision: D14151339

Pulled By: hramos

fbshipit-source-id: 8255330bf910a69a4c03051d91d7b0de3fadf2d1
2019-02-20 10:17:26 -08:00
empyrical ff588b5087 JSI: Minor tweaks for building on MSVC (#23492)
Summary:
This is a re-submit of #23367, which was accidentally over-written in this commit:

0d7faf6f73

This pull request makes this change to `jsi.h`:

 * Tweak the call to constructor `Pointer(Runtime::PointerValue* ptr)` in the constructor for `PropNameID`. I am not sure why MSVC wasn't working with the original version, but it compiles after I tweak that.

[General] [Fixed] - Tweaked `jsi.h` to build on MSVC
Pull Request resolved: https://github.com/facebook/react-native/pull/23492

Differential Revision: D14151511

Pulled By: hramos

fbshipit-source-id: 52d726d7b978d321a0343566ee527f2ec25e93f8
2019-02-20 10:12:12 -08:00
Eric Lewis 38e91e6a9d fix getPhotos params on RNTester XHR example. (#23548)
Summary:
Fixes redscreen on RNTester's XHR page. CameraRoll getPhotos was missing params.

ss: https://i.imgur.com/JLThyrF.png

[iOS] [Fixed] - RNTester XHR Example crash
Pull Request resolved: https://github.com/facebook/react-native/pull/23548

Differential Revision: D14151304

Pulled By: hramos

fbshipit-source-id: 7ff02c7fe32f09aecd50bc7df9f37b7cd2851b1c
2019-02-20 09:57:26 -08:00
Christoph Nakazawa 59377830b4 JavaScript tests for symbolication
Summary:
People in open source are now contributing to our symbolication code. They cannot figure out how to run buck for their tests so I instead converted them to Jest tests. See https://github.com/facebook/react-native/pull/23514 for an example contribution where people are struggling.

This PR:
* Changes the stdin reading mechanism to also work inside of a forked child process
* I manually verified that the previous BUCK tests were all passing after my modifications to the main script
* I rewrote each test using Jest
* I then switched the passing tests over to use snapshots

As a result, there are now a few fewer files and they all run inside of Jest. The code being tested is identical and keeps working.

Reviewed By: davidaurelio

Differential Revision: D14147615

fbshipit-source-id: 699044a579278f6451bb9d26a05712f00e4b7c04
2019-02-20 05:08:53 -08:00
Joshua Gross ab6ea9c938 Enable NativeAnimationDriver in Fabric
Summary:
Enables NativeAnimationDriver in Fabric.

Fabric animations:
{F151048224}

Pre-Fabric animations:

{F151048344}

Reviewed By: mdvacca

Differential Revision: D14114388

fbshipit-source-id: 1f64db168ae037535a31def7da28b9e0474b7198
2019-02-20 00:15:04 -08:00
Levi Buzolic a89fe4165c Map TextInput textContentType strings to Objective-C constants (#22611)
Summary:
This is an updated version of #22579 which uses compile conditionals to prevent `use of undeclared identifier` errors when compiling on older versions of Xcode.

--------

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/22611

Differential Revision: D13460949

Pulled By: cpojer

fbshipit-source-id: e6d1108422b850ebc3aea05693ed05118b77b5de
2019-02-19 23:52:40 -08:00
Eric Lewis 35b6f866f1 helpful error on canOpenURL for missing scheme (#23535)
Summary:
iOS 9 introduced a whitelist for schemes that apps are allowed to open / check against, the current behavior of React Native is to simple return `NO` when a scheme is missing from that whitelist. It would be more helpful to throw an error with a suggested fix for the problem:
```
Unable to open URL: asos://checkout, add asos to LSApplicationQueriesSchemes in Info.plist.
```

[iOS] [Changed] - canOpenURL throws when custom scheme isn't in LSApplicationQueriesSchemes.
Pull Request resolved: https://github.com/facebook/react-native/pull/23535

Differential Revision: D14143005

Pulled By: cpojer

fbshipit-source-id: 4ead5f073690e627b4a4bbe3fa5a6cb5af46b589
2019-02-19 22:16:01 -08:00
Héctor Ramos eb414b7f8d Update iOS Snapshots (#23538)
Summary:
The iOS snapshots needed to be updated after cf5f25472d updated `ViewExample.js`.

[iOS] [Fixed] - Updated snapshots on iOS.
Pull Request resolved: https://github.com/facebook/react-native/pull/23538

Differential Revision: D14146723

Pulled By: cpojer

fbshipit-source-id: f949d4c7925ab53ef42f42689bc2ed7b254dea48
2019-02-19 22:07:32 -08:00
zhongwuzw f8b52151eb Fixed textInput appearance not update when text attributes changed (#23533)
Summary:
If we change the text attributes dynamically, for example, change the textColor, it not works in iOS, Android works fine.

[iOS] [fixed] - Fixed textInput appearance not update when text attributes changed
Pull Request resolved: https://github.com/facebook/react-native/pull/23533

Differential Revision: D14146700

Pulled By: cpojer

fbshipit-source-id: 4a7c84d6e7f818acb712242bea6484b177a775c6
2019-02-19 22:02:20 -08:00
Eric Lewis c3df673f12 Fabric: Fix dangling brace (#23540)
Summary:
This pull request fixes a dangling brace, causing Xcode to be unable to build RCTFabricSample.

[General] [Fixed] - Fabric: Xcode build issue
Pull Request resolved: https://github.com/facebook/react-native/pull/23540

Differential Revision: D14142990

Pulled By: hramos

fbshipit-source-id: d6c2313d831e2ea5d22c77543814b86bfe8a1d53
2019-02-19 21:55:18 -08:00
jsfu f08c94bd36 fix the TextInput can't control input length when value's length > maxLength (#23545)
Summary:
I found the TextInput can't control input length when default value's length > maxLength.
for example:
1.Set the value in special cases
```
<TextInput value={'12345678'} maxLength={6}/>
```
2.Quickly press the keyboard with multiple fingers

```
// RCTBaseTextInputView.m
……
if (_maxLength) {
    NSUInteger allowedLength = _maxLength.integerValue - backedTextInputView.attributedText.string.length + range.length;
    if (text.length > allowedLength) {
……
```
when value's length > maxLength,the allowedLength not a negative number.it was transformed into a big number,because it is type NSUInteger.so the `text.length > allowedLength` always false.

[iOS][Fixed] - fix the TextInput can't control input length when value's length > maxLength
Pull Request resolved: https://github.com/facebook/react-native/pull/23545

Differential Revision: D14146581

Pulled By: cpojer

fbshipit-source-id: f53b1312ae55fad9fc10430ab94784c1a9ad4723
2019-02-19 21:41:07 -08:00
zhongwuzw 9375a12620 Fixed RNTester tvOS build error on Xcode10 (#23543)
Summary:
We add info.plist into `Copy Bundle Resources`, it leads to build error on new Xcode10 compile system.

[iOS] [fixed] - Fixed RNTester tvOS build error on Xcode10
Pull Request resolved: https://github.com/facebook/react-native/pull/23543

Differential Revision: D14146488

Pulled By: cpojer

fbshipit-source-id: 10d9973fadb7e79e76e6a2a4945c9108184e4708
2019-02-19 21:28:09 -08:00
zhongwuzw f8276805ca Add ImageIO nullable check in Image module (#23544)
Summary:
Add ImageIO nullable check in Image module to prevent crash.

[iOS] [Fixed] - Add ImageIO nullable check in Image module
Pull Request resolved: https://github.com/facebook/react-native/pull/23544

Differential Revision: D14146483

Pulled By: cpojer

fbshipit-source-id: 813caebea1e24d5e282b21cc50240ec1886339d5
2019-02-19 21:22:37 -08:00
zhongwuzw be36aa89c5 Remove fake OCMock group (#23546)
Summary:
We created a fake OCMock group like below which text color is red, actually we have another OCMock group in `RNTesterUnitTests`, so we can remove this.
![image](https://user-images.githubusercontent.com/5061845/53064665-9dcad300-3503-11e9-93c0-fd63b4395ba3.png)

[iOS] [Fixed] - Remove fake OCMock group in RNTester
Pull Request resolved: https://github.com/facebook/react-native/pull/23546

Differential Revision: D14146477

Pulled By: cpojer

fbshipit-source-id: 4878c8d40eab451f20bd7e223d93d212e514f26d
2019-02-19 21:17:02 -08:00
Eric Lewis d419f0787c Fix testScrollViewExample flakiness (#23541)
Summary:
Sometimes images are slow to load, and they are quite heavy. This converts the ScrollViewExample to a list of simple text items, similar to the append example inside of it.

What it looks like: https://i.imgur.com/jt083Iv.png

[iOS] [Fixed] - Fix testScrollViewExample flakiness
Pull Request resolved: https://github.com/facebook/react-native/pull/23541

Differential Revision: D14142947

Pulled By: hramos

fbshipit-source-id: c897a4caa5374ef67e3d67306e3124c29b969565
2019-02-19 16:24:08 -08:00
Skylar Peterson 5ff6b97d33 React scroll views should group accessibility children
Summary: If we don't group accessibility children, we can get into a state where the accessibility frame for our content lines up in such a way that VoiceOver doesn't know to scroll the scroll view, and instead jumps to the next piece of content (like the tab bar at the bottom)

Reviewed By: ikenwoo

Differential Revision: D14141532

fbshipit-source-id: 53b0971f494a39f0eba827e441a4cd9e08317663
2019-02-19 15:37:02 -08:00
David Vacca 6aa297a7f3 Fabric: Fixed crash when LayoutMetrics contained NaN values
Summary:
CALayer will crash if we pass NaN or Inf values.

It's unclear how to detect this case on cross-platform manner holistically, so we have to do it on the mounting layer as well.
NaN/Inf is a kinda valid result of some math operations. Even if we can (and should) detect (and report early) incorrect (NaN and Inf) values which come from JavaScript side, we sometimes cannot backtrace the sources of a calculation that produced an incorrect/useless result.

Besides that, I will investigate why the crash is actually happening, so we might need to fix something in layout engine. But, it general, we cannot capture all errors like that, so we need to have it here anyway.

Reviewed By: JoshuaGross, mmmulani

Differential Revision: D14126058

fbshipit-source-id: 807e5a223bdef48af9a3b7210803863431e8c507
2019-02-19 13:03:15 -08:00
David Vacca 22d776f5c2 Fix AssertionError in EventDispatcher
Summary: This task fixes an AssertionError in EventDispatcher class, this is produced by a race condition.

Reviewed By: JoshuaGross

Differential Revision: D14134907

fbshipit-source-id: 7b670ee35e47c0d8a9f7f7b68a3b8f7193b7de54
2019-02-19 12:11:39 -08:00
David Aurelio 49d91456fd Extract abstract class `YogaNode`
Summary:
@public

Here, we extract an abstract class from `YogaNode`, in order to allow for experimentation with different implementations.

The reason for not choosing an interface is to keep ABI compatibility for `YogaNode.create()`.

Reviewed By: pasqualeanatriello

Differential Revision: D14044990

fbshipit-source-id: f8eb246338b55f34f0401198c0655abfcb7c9f37
2019-02-19 11:19:31 -08:00
David Aurelio 043d0d0e2d Switch to `YogaNode.create()`
Summary:
@public

Switches instance creation from `new YogaNode()` to `YogaNode.create()`.

This allows for experimentation with different implementations, while maintaining API + ABI compatibility internally at FB, as well as for dependent projects in open source and elsewhere.

Reviewed By: amir-shalem

Differential Revision: D14122975

fbshipit-source-id: f194b146b7cd693dba1a7dafdf92d350e54cb179
2019-02-19 11:19:31 -08:00
Héctor Ramos 2c25e34060 Use new yearless copyright header format
Summary: Use the new copyright header format used elsewhere in the React Native repository.

Reviewed By: shergin

Differential Revision: D14091706

fbshipit-source-id: b27b8e6bcdf2f3d9402886dbc6b68c305150b7d5
2019-02-19 10:35:12 -08:00
David Aurelio b5f497a005 Add support for context-aware print functions
Summary:
@public

Context-aware print functions are an internal Yoga feature that will be used for Yoga’s JNI code.

It will be possible to specify a context when calculating layout, which will be passed on to baseline and measure functions. This will be a private feature.

Reviewed By: SidharthGuglani

Differential Revision: D14131098

fbshipit-source-id: 7a9da307274ceccba9f7debba581b70c1ebf2c98
2019-02-19 09:58:27 -08:00
David Aurelio 2661e102f6 Make node printing private
Summary:
@public

Removes `YGNodeGetPrintFunc`, and encapsulates node printing within `YGNode`.
This is necessary for allowing for context-aware callback functions, which will ultimately allow for removal of weak global JNI references.

On a side node, the printing logic does not seem to be well thought through: print functions print as a side effect to whatever output they choose. Printing that uses callbacks is printing to different output streams or strings, though.

We need to consolidate Yoga debugging, and make it all more stringent.

Reviewed By: SidharthGuglani

Differential Revision: D14131024

fbshipit-source-id: 68704682dab3e7dfba61930bb03003d7d4723b80
2019-02-19 09:58:27 -08:00
David Aurelio 6e2b7c80af Allow to calculate layout with context
Summary:
publc

Adds the ability to calculate layout with a context pointer set.

The context is passed through to measure and baseline functions of individual nodes.

This will be used to remove the necessity of holding weak global JNI references for each node.

Reviewed By: SidharthGuglani

Differential Revision: D14101426

fbshipit-source-id: 25047e1e44af48feb22ea686285d70803e8961bb
2019-02-19 09:58:26 -08:00
David Aurelio 1d836e333f Add support for context-aware measure and baseline functions
Summary:
@public

Context-aware measure and baseline functions are an internal Yoga feature that will be used for Yoga’s JNI code.

It will be possible to specify a context when calculating layout, which will be passed on to baseline and measure functions. This will be a private feature.

Reviewed By: SidharthGuglani

Differential Revision: D14100509

fbshipit-source-id: acf4a030549b2e38d5ce0cd5dbe837864e5ffd81
2019-02-19 09:58:26 -08:00
David Aurelio 42d5517c7a Call measure and baseline fns within `YGNode`
Summary:
@public

Stricter encapsulation of baseline and measure callbacks withing `YGNode`.

Instead of invoking these callbacks directly (`node->getBaseline()(...)`), they are invoked via methods on `YGNode` (`node->baseline(...)`).

This change will allow us to add the concept of a *Layout Context,* where measure and baseline functions will be able to receive an additional `void *` argument if configured accordingly. This API will be used internally for Yoga’s JNI bindings, to avoid storing a weak JNI reference for each node, and avoid reference table overflows.

Changed API:

- `YGNodeGetMeasureFunc()` -> `YGNodeHasMeasureFunc()`
- `YGNodeGetBaselineFunc()` -> `YGNodeHasBaselineFunc()`
- `YGNode::getMeasure()` -> `YGNode::hasMeasureFunc()` + `YGNode::measure()`
- `YGNpde::getBaseline()` -> `YGNode::hasBaselineFunc()` + `YGNode::baseline()`

Reviewed By: SidharthGuglani

Differential Revision: D14099550

fbshipit-source-id: 2653ab36acc252a9747986bc88d21dac22d8c91b
2019-02-19 09:58:26 -08:00
David Aurelio dc55e2980e Add support for context-aware logging functions
Summary:
@public

Context-aware logging functions are an internal Yoga feature that will be used for Yoga’s JNI code.

It will be possible to specify a context when calculating layout, which will be passed on to baseline and measure functions. This will be a private feature.

Reviewed By: SidharthGuglani

Differential Revision: D14123482

fbshipit-source-id: 8ba3b6c493bf79fe09831f22d2b6da44f09e3d95
2019-02-19 09:58:26 -08:00
David Aurelio 77104b05be Call logger from within `YGConfig`
Summary:
@public

Stricter encapsulation of logging callbacks within `YGConfig`.

Instead of invoking the logging callback directly (`node->logger(...)`), callers now have to go through `YGConfig::log()`.

This change will allow us to add the concept of a *Layout Context,* where logging functions will be able to receive an additional `void *` argument if configured accordingly. This API will be used internally for Yoga’s JNI bindings, to avoid storing a weak JNI reference for each node, and avoid reference table overflows.

Changed API:

- `YGConfig::logger()` -> `YGConfig::log()`

Reviewed By: SidharthGuglani

Differential Revision: D14123483

fbshipit-source-id: 87b8bb7de0e4346b6a41e57a70ac4eb8d79b24af
2019-02-19 09:58:26 -08:00
David Aurelio e8f95dc7a1 Make logging private
Summary:
@public

Makes logging implementation internal to Yoga.

Breaking changes: removed  `YGLog` and `YGLogWithConfig`.

The upcoming changes to the JNI layer (removal of weak global refs for each node) requires adding additional parameters to the logging functions that will only be available when calculating layout.

Reviewed By: SidharthGuglani

Differential Revision: D14123390

fbshipit-source-id: 468e4a240c190342868ffbb5f8beb92324cdfdd6
2019-02-19 09:58:26 -08:00
Yuichi ONO b23676836f `flexWrap` should be kebab-case inside inline-style (#761)
Summary:
Inside css inline style, it should be spelled as `flex-wrap`.
Pull Request resolved: https://github.com/facebook/yoga/pull/761

Reviewed By: davidaurelio

Differential Revision: D14100508

Pulled By: SidharthGuglani

fbshipit-source-id: 65ebc984d959555107d58ad16ca27b2b8b4d0874
2019-02-19 04:54:43 -08:00
Laurin Quast 3e4d353d2c feat(permissions-android): export Rationale type and add missing properties according to docs (#23510)
Summary:
I checked the documentation over at https://facebook.github.io/react-native/docs/permissionsandroid and the documented properties `buttonPositive`, `buttonNegative` and `buttonNeutral` are not available in the flow-type definitions.

___

Also the Rationale type is not exported which makes it hard to reuse it in a library or in your own application code.

However I do not know if it is actually intended to import "internal" flow-types from `react-native` since I could not find any other type or interface being exported. So I am not 100% sure if I should have done this.

[General] [Added] - Export Rationale flow-type and add missing properties `buttonPositive`, `buttonNegative` and `buttonNeutral` to the documentation.
Pull Request resolved: https://github.com/facebook/react-native/pull/23510

Differential Revision: D14123848

Pulled By: cpojer

fbshipit-source-id: 4040590932db645da6422d680246fed1d46dbe79
2019-02-18 07:04:58 -08:00
Miguel Jimenez Esun e10d984c43 Upgrade Jest to 24.1.0
Summary: Upgrade Jest to 24.1.0 (latest stable)

Reviewed By: cpojer

Differential Revision: D14101975

fbshipit-source-id: a9b0d5899a2d0ebb98650ee719ae2ae9d45f7e47
2019-02-18 04:48:13 -08:00
James Munro 794da6a4e4 Remove SnapshotViewIOS from public interface (#23497)
Summary:
Part of Lean Core #23313

Removes `SnapshotViewIOS` from the public RN interface.

I think there's a wider discussion to be had here about whether `RCTTest` should be part of the public distribution or at least whether this should be split into a separate utils package. It's mainly used by the RNTester app. It seems to be little known about but there are [some references to it online](https://blog.callstack.io/testing-your-react-native-apps-abfe41903dfd).

[iOS] [Removed] - `SnapshotViewIOS` is no longer publicly exported from RN
Pull Request resolved: https://github.com/facebook/react-native/pull/23497

Differential Revision: D14123280

Pulled By: cpojer

fbshipit-source-id: badaf6cb5d2195268f0f8b429fc11d6525747708
2019-02-18 04:04:23 -08:00
David Aurelio 7030399ec8 Add `YogaNode.create()`
Summary:
Adds a factory method to `YogaNode`.

While this is purely redundant at the moment, it will allow experimentation in follow-up diffs. We will have concrete implementations deriving from `YogaNode` (which will be abstract).

Going through `YogaNode.create()` means that we can maintain ABI compatibility.

Reviewed By: amir-shalem

Differential Revision: D14122974

fbshipit-source-id: 15d92f296d91cc8bbd79a196f370d2dbb69b3f92
2019-02-18 03:07:49 -08:00
Dulmandakh 84a2fb0a4a SYSTEM_ALERT_WINDOW only in debug builds (#23504)
Summary:
SYSTEM_ALERT_WINDOW permission is used only for debug builds to show draw overlay views or show warnings/errors. This permissions is unused in release builds, and there is an issue regarding removing unused permissions on Android build https://github.com/facebook/react-native/issues/5886#issuecomment-464495388. This PR removes SYSTEM_ALERT_WINDOW from all builds bug debug.

[Android] [Changed] - SYSTEM_ALERT_WINDOW permissions available only in debug builds
Pull Request resolved: https://github.com/facebook/react-native/pull/23504

Differential Revision: D14123045

Pulled By: cpojer

fbshipit-source-id: 68829a774ff23c7cb2721076a9d3870405f48fea
2019-02-18 02:39:55 -08:00
gengjiawen d056d756b0 add clang-format to current toolchain (#23434)
Summary:
add `clang-format` toolchain. we have 2558 files need to process in current task.
cc cpojer empyrical shergin matthargett
Pull Request resolved: https://github.com/facebook/react-native/pull/23434

Differential Revision: D14067789

Pulled By: cpojer

fbshipit-source-id: ddf812fc9579068ebb850bacedde6675376f18b7
2019-02-17 16:03:12 -08:00
zhongwuzw f95876ba8c Remove android initialAppState fallback check (#23487)
Summary:
1. We expose the `initialAppState` for Android in #19935, so we can remove the fallback check for Android.
2. Rename `RCTCurrentAppBackgroundState` to `RCTCurrentAppState`, it's a private file function, so it's safe to rename, `RCTCurrentAppState` is more suitable because we actually get app state, not app background state.

[Android] [Enhancement] - Remove android `initialAppState` fallback check.
Pull Request resolved: https://github.com/facebook/react-native/pull/23487

Differential Revision: D14121293

Pulled By: cpojer

fbshipit-source-id: fec196cef2969fe6f6f1571f4ebcafcec26266a1
2019-02-17 15:32:13 -08:00
Michael Diarmid 5560a47c1d Add `folly_compiler_flags` to Core subspec (#23488)
Summary:
This fixes the following iOS build error when using React via pods (using the new Xcode build system);

> project/Pods/Folly/folly/portability/Config.h:20:10: 'folly/folly-config.h' file not found

https://github.com/react-native-community/react-native-releases/issues/79#issuecomment-463628317
https://github.com/react-native-community/react-native-releases/issues/79#issuecomment-463675118
https://github.com/react-native-community/react-native-releases/issues/79#issuecomment-464117823

[iOS] [Fixed] - Fixed a "'folly/folly-config.h' file not found" build error when using React via CocoaPods
Pull Request resolved: https://github.com/facebook/react-native/pull/23488

Differential Revision: D14121296

Pulled By: cpojer

fbshipit-source-id: 5eb2ba3066aef2bc9cfb95a9172cbef921c47170
2019-02-17 15:14:11 -08:00
zhongwuzw a6fde5d846 Apply latest shadow view workflow description (#23485)
Summary:
Apply latest shadow view workflow description

[iOS] [Fixed] - Apply latest shadow view workflow description
Pull Request resolved: https://github.com/facebook/react-native/pull/23485

Differential Revision: D14121276

Pulled By: cpojer

fbshipit-source-id: 128158a560dddd6dbb7213368410c3f36818b5fb
2019-02-17 15:08:16 -08:00
Vishwesh Jainkuniya 9126add6b9 Add prop to configure `importantForAutofill`. (#22763)
Summary:
In API 26, autofill framework was introduced in Android.
Read more about Autofill at https://developer.android.com/guide/topics/text/autofill.

Now, if in case for some text input if developer wants to disable
autofill then he can take help from this `importantForAutoFill` prop
and pass `no` to it.

Also important of auto fill can be configured with this prop, like:
* `auto`: Let the Android System use its heuristics to determine if the view is important for autofill.
* `no`: This view isn't important for autofill.
* `noExcludeDescendants`: This view and its children aren't important for autofill.
* `yes`: This view is important for autofill.
* `yesExcludeDescendants`: This view is important for autofill, but its children aren't important for autofill.

Default value if `auto`.

Read more at: https://developer.android.com/guide/topics/text/autofill-optimize

Changelog:
----------
[Android] [Added] - Add prop to configure `importantForAutofill` in `TextInput`.
Pull Request resolved: https://github.com/facebook/react-native/pull/22763

Differential Revision: D14121242

Pulled By: cpojer

fbshipit-source-id: aa4360480dd19f6dde66f0409d26a41a6a318c94
2019-02-17 14:33:37 -08:00
David Vacca 3102ea51b2 Use ReadableNativeMap equality on UpdateLocalData (#23408)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/23408

Use equals method in the updateLocalData method

Reviewed By: JoshuaGross

Differential Revision: D14026378

fbshipit-source-id: 762559276a1fe63035e0f5d055620f95b8f62fb0
2019-02-17 11:06:00 -08:00
David Vacca f4536422d6 Implement equality for ReadableNativeMap
Summary: This diff implements equality for ReadableNativeMap, the underlying implementation relies on the method HashMap.equals()

Reviewed By: kathryngray

Differential Revision: D14019065

fbshipit-source-id: aeaec22ce1066241ed85f0527f5cd804e3c763dd
2019-02-17 11:06:00 -08:00
David Vacca a8703fe10b Implement equality for RedableNativeArray
Summary: This diff implements equality on RedableNativeArray objects. This relies on the Arrays.deepEquals method

Reviewed By: kathryngray

Differential Revision: D14022108

fbshipit-source-id: 48b59529a9060a2bddba5fc8e3681c922ec31be4
2019-02-17 11:06:00 -08:00
Scott Rice c86f59cb82 Set UIManagerType as required for source_only_abi
Summary: This allows using this annotation when Buck has `java.abi_generation_mode = source_only` set.

Differential Revision: D14119311

fbshipit-source-id: 020e709924e70adb8a160069a1da9b209b99befa
2019-02-16 16:55:24 -08:00