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

14744 Коммитов

Автор SHA1 Сообщение Дата
Emily Janzer b8cb8d50a5 Update copyright for yoga files
Summary: Appeasing lint

Reviewed By: hramos

Differential Revision: D9819535

fbshipit-source-id: 0080f17a62291291a0ea90942af4b38588e9057f
2018-10-05 18:48:50 -07:00
Emily Janzer d279b7c74d Add point at beginning of InitializeCore
Summary: Also add an optional timestamp param to PerformanceLogger.markPoint() so you can backdate a point

Reviewed By: alexeylang

Differential Revision: D10149337

fbshipit-source-id: 6cc5f95b34b3293589e7cb41b99cee17bf128163
2018-10-05 18:33:59 -07:00
Tim Yung 7142e9b1c5 React sync for revisions ade5e69...d836010
Summary:
This sync includes the following changes:
- **[d83601080](https://github.com/facebook/react/commit/d83601080)**: Wrap retrySuspendedRoot using SchedulerTracing (#13776) //<Sophie Alpert>//
- **[40a521aa7](https://github.com/facebook/react/commit/40a521aa7)**: Terminology: Functional -> Function Component (#13775) //<Dan Abramov>//
- **[605ab10a4](https://github.com/facebook/react/commit/605ab10a4)**: Add envify transform to scheduler package (#13766) //<Michael Ridgway>//
- **[acc7f404c](https://github.com/facebook/react/commit/acc7f404c)**: Restart from root if promise pings before end of render phase (#13774) //<Andrew Clark>//
- **[cbc224028](https://github.com/facebook/react/commit/cbc224028)**: fix - small misspelling (#13768) //<Spencer Davies>//
- **[4eabeef11](https://github.com/facebook/react/commit/4eabeef11)**: Rename ReactSuspenseWithTestRenderer-test -> ReactSuspense-test //<Andrew Clark>//
- **[95a3e1c2e](https://github.com/facebook/react/commit/95a3e1c2e)**: Rename ReactSuspense-test -> ReactSuspenseWithNoopRenderer-test //<Andrew Clark>//
- **[96bcae9d5](https://github.com/facebook/react/commit/96bcae9d5)**: Jest + test renderer helpers for concurrent mode (#13751) //<Andrew Clark>//
- **[5c783ee75](https://github.com/facebook/react/commit/5c783ee75)**: Remove unreachable code (#13762) //<Heaven>//
- **[36c5d69ca](https://github.com/facebook/react/commit/36c5d69ca)**: Always warn about legacy context within StrictMode tree (#13760) //<Brian Vaughn>//
- **[3e9a5de88](https://github.com/facebook/react/commit/3e9a5de88)**: UMD react-cache build (#13761) //<Maksim Markelov>//
- **[8315a30b9](https://github.com/facebook/react/commit/8315a30b9)**: --save is no longer needed (#13756) //<Joe Cortopassi>//
- **[ce96e2df4](https://github.com/facebook/react/commit/ce96e2df4)**: Rename simple-cache-provider to react-cache (#13755) //<Andrew Clark>//
- **[c5212646f](https://github.com/facebook/react/commit/c5212646f)**: Removed extra typeof checks for contextType.unstable_read (#13736) //<Brian Vaughn>//
- **[806eebdae](https://github.com/facebook/react/commit/806eebdae)**: Enable getDerivedStateFromError (#13746) //<Brian Vaughn>//
- **[a0733fe13](https://github.com/facebook/react/commit/a0733fe13)**: pure (#13748) //<Andrew Clark>//
- **[4d17c3f05](https://github.com/facebook/react/commit/4d17c3f05)**: [scheduler] Improve naive fallback version used in non-DOM environments //<Andrew Clark>//
- **[469005d87](https://github.com/facebook/react/commit/469005d87)**: Revise `AttributeType` React Native Flow Type (#13737) //<Timothy Yung>//
- **[0dc0ddc1e](https://github.com/facebook/react/commit/0dc0ddc1e)**: Rename AsyncMode -> ConcurrentMode (#13732) //<Dominic Gannaway>//
- **[7601c3765](https://github.com/facebook/react/commit/7601c3765)**: Ensure "addEventListener" exists on "window" for "scheduler" package (#13731) //<Dominic Gannaway>//
- **[d0c0ec98e](https://github.com/facebook/react/commit/d0c0ec98e)**: Added a PureComponent contextType test (#13729) //<Brian Vaughn>//
- **[4b68a6498](https://github.com/facebook/react/commit/4b68a6498)**: Support class component static contextType attribute (#13728) //<Brian Vaughn>//
- **[f305d2a48](https://github.com/facebook/react/commit/f305d2a48)**: [scheduler] Priority levels, continuations, and wrapped callbacks (#13720) //<Andrew Clark>//
- **[970a34bae](https://github.com/facebook/react/commit/970a34bae)**: Bump babel-eslint and remove flow supressions (#13727) //<Brian Ng>//
- **[13965b4d3](https://github.com/facebook/react/commit/13965b4d3)**: Interaction tracking ref-counting bug fixes (WIP) (#13590) //<Brian Vaughn>//
- **[17e703cb9](https://github.com/facebook/react/commit/17e703cb9)**: Restore global window.event after event dispatching (#13688) (#13697) //<Sergei Startsev>//
- **[a775a767a](https://github.com/facebook/react/commit/a775a767a)**: Remove redundant logic (#13502) //<Heaven>//
- **[e1a067dea](https://github.com/facebook/react/commit/e1a067dea)**: Fix circular dependency in TracingSubscriptions (#13689) //<Maksim Markelov>//
- **[518812eeb](https://github.com/facebook/react/commit/518812eeb)**: Clarify comment (#13684) //<Heaven>//
- **[eeb817785](https://github.com/facebook/react/commit/eeb817785)**: Remove some old files from stats //<Dan>//
- **[7ea3ca1d1](https://github.com/facebook/react/commit/7ea3ca1d1)**: Rename schedule to scheduler (#13683) //<Dan Abramov>//
- **[bec2ddaf1](https://github.com/facebook/react/commit/bec2ddaf1)**: Update bundle sizes for 16.5.2 release //<Brian Vaughn>//
- **[4269fafb0](https://github.com/facebook/react/commit/4269fafb0)**: Updating package versions for release 16.5.2 //<Brian Vaughn>//
- **[4380f9ba1](https://github.com/facebook/react/commit/4380f9ba1)**: Revert "Updating package versions for release 16.6.0-alpha.0" //<Brian Vaughn>//
- **[72fad84e7](https://github.com/facebook/react/commit/72fad84e7)**: Revert "Updating dependencies for react-noop-renderer" //<Brian Vaughn>//
- **[c3fad5acf](https://github.com/facebook/react/commit/c3fad5acf)**: Revert "Update bundle sizes for 16.6.0-alpha.0 release" //<Brian Vaughn>//
- **[dd9120561](https://github.com/facebook/react/commit/dd9120561)**: Kepp calling peformWork consistent (#13596) //<Heaven>//
- **[42d12317a](https://github.com/facebook/react/commit/42d12317a)**: Update bundle sizes for 16.6.0-alpha.0 release //<Brian Vaughn>//
- **[489614c4f](https://github.com/facebook/react/commit/489614c4f)**: Updating dependencies for react-noop-renderer //<Brian Vaughn>//
- **[351c9015c](https://github.com/facebook/react/commit/351c9015c)**: Updating package versions for release 16.6.0-alpha.0 //<Brian Vaughn>//
- **[a210b5b44](https://github.com/facebook/react/commit/a210b5b44)**: Revert "Do not bind topLevelType to dispatch" (#13674) //<Dan Abramov>//
- **[1d8a75fef](https://github.com/facebook/react/commit/1d8a75fef)**: remove flow typings from Schedule.js (#13662) //<Alexey Raspopov>//
- **[d92114b98](https://github.com/facebook/react/commit/d92114b98)**: Resubmit: Fix updateWrapper causing re-render textarea, even though their data (#13643) //<Nathan Hunzaker>//
- **[0c9c591bf](https://github.com/facebook/react/commit/0c9c591bf)**: Do not bind topLevelType to dispatch (#13618) //<Nathan Hunzaker>//
- **[9f819a5ea](https://github.com/facebook/react/commit/9f819a5ea)**: [schedule] Refactor Schedule, remove React-isms (#13582) //<Andrew Clark>//
- **[9c961c0a2](https://github.com/facebook/react/commit/9c961c0a2)**: Fix some iframe edge cases (#13650) //<Jérôme Steunou>//
- **[8bc0bcabe](https://github.com/facebook/react/commit/8bc0bcabe)**: Add UMD production+profiling entry points (#13642) //<Brian Vaughn>//
- **[b488a5d9c](https://github.com/facebook/react/commit/b488a5d9c)**: Fix test comment typo (#13568) //<Heaven>//
- **[4bcee5621](https://github.com/facebook/react/commit/4bcee5621)**: Rename "tracking" API to "tracing" (#13641) //<Brian Vaughn>//
- **[72217d081](https://github.com/facebook/react/commit/72217d081)**: Update bundle sizes for 16.5.1 release //<Dan Abramov>//
- **[8b93a60c5](https://github.com/facebook/react/commit/8b93a60c5)**: Updating package versions for release 16.5.1 //<Dan Abramov>//
- **[ecbf7af40](https://github.com/facebook/react/commit/ecbf7af40)**: Enhance dev warnings for forwardRef render function (#13627) (#13636) //<Andres Rojas>//
- **[228240085](https://github.com/facebook/react/commit/228240085)**: Delete TapEventPlugin (#13630) //<Dan Abramov>//
- **[a079011f9](https://github.com/facebook/react/commit/a079011f9)**: ð Stop syncing the value attribute on inputs (behind a feature flag) (#13526) //<Nathan Hunzaker>//
- **[a7bd7c3c0](https://github.com/facebook/react/commit/a7bd7c3c0)**: Allow reading default feature flags from bundle tests (#13629) //<Dan Abramov>//
- **[d3bbfe09c](https://github.com/facebook/react/commit/d3bbfe09c)**: Fix IE version in comment //<Dan Abramov>//
- **[1b2646a40](https://github.com/facebook/react/commit/1b2646a40)**: Fix warning without stack for ie9 (#13620) //<Aliaksandr Manzhula>//
- **[e49f3ca08](https://github.com/facebook/react/commit/e49f3ca08)**:  honor displayName set on ForwardRef if available (#13615) //<Evan Jacobs>//

Release Notes:
[GENERAL] [FEATURE] [React] - React sync for revisions ade5e69...d836010

Reviewed By: bvaughn

Differential Revision: D10118547

fbshipit-source-id: ecde7ada80331abdc8bd7d279e0f3dbe9acde071
2018-10-05 18:19:54 -07:00
Dani 9282c9de39 Remove TimerMixin from TouchableOpacity (#21520)
Summary:
Related to #21485
This PR removes TimerMixin from TouchableOpacity
Pull Request resolved: https://github.com/facebook/react-native/pull/21520

Differential Revision: D10223753

Pulled By: RSNara

fbshipit-source-id: fc02077de7e73ee968b7944c0178892825099063
2018-10-05 17:25:40 -07:00
Marc Horowitz bb9b9a8b9d When converting arguments JS->Java, handle integers correctly
Summary:
If a folly::dynamic contains a double when a Java method is
declared to take an int, getInt() will be called, and a C++ exception
will be thrown.  This change uses similar logic to
NativeReadableMap.getInt() to convert a folly::dynamic double to a
jint.  This will still throw an exception if the JS value cannot be
represented as a jint without loss.

Reviewed By: fromcelticpark

Differential Revision: D10209492

fbshipit-source-id: fd96416200c6b283ce5c8f8fa4c227ceb8f43054
2018-10-05 16:21:33 -07:00
Eli White 5bfa39ece0 Skip flaky Animated test
Summary:
This test is disabled internally and flaky in open source causing CI to fail. Skipping it for now.

Related to: https://github.com/facebook/react-native/issues/21517

Reviewed By: RSNara

Differential Revision: D10223498

fbshipit-source-id: 37a3798c0abb7de829bc5b59e02f23d8943da882
2018-10-05 15:03:15 -07:00
Rafael Nunes G. da Silveira 4d6943168b Remove TimerMixin on ReactContentSizeUpdateTest (#21502)
Summary:
Related to #21485.
Removed `TimerMixin` from `ReactContentSizeUpdateTest`.
Pull Request resolved: https://github.com/facebook/react-native/pull/21502

Reviewed By: TheSavior

Differential Revision: D10218548

Pulled By: RSNara

fbshipit-source-id: 9a0642e14f8548d8dc9683f0f70353416ed04ae0
2018-10-05 14:03:01 -07:00
Thomas Carlson 6c20017152 Remove TimerMixin from TouchableWithoutFeedback (#21493)
Summary:
Related to #21485.
Removed `TimerMixin` from the `TouchableWithoutFeedback` component since it is currently not used.
Added tests cases for `TouchableWithoutFeedback` to check for any runtime issues.
Pull Request resolved: https://github.com/facebook/react-native/pull/21493

Differential Revision: D10219098

Pulled By: RSNara

fbshipit-source-id: d9517b2bd5b72b0450fa864f3556673ae3181552
2018-10-05 13:34:12 -07:00
Thomas BARRAS 8ceb1586ee Remove TimerMixin from ListView (#21488)
Summary:
Related to #21485

- Remove TimerMixin from ListView

- All flow tests succeed.
- RNTester: <ListView> iOS (this change should only affect iOS because calculateChildFrames is iOS only)
Show perf monitor, show ListView* screen, start scrolling. UI frame Rate is used at the beginning. When scrolling there is no drop in FPS rate.

TODO: I think a load test would be more relevant:
- Update props multiple times and scroll

[GENERAL] [ENHANCEMENT] [ListView.js] - rm TimerMixin
Pull Request resolved: https://github.com/facebook/react-native/pull/21488

Differential Revision: D10219088

Pulled By: RSNara

fbshipit-source-id: 946e4fc1319324c5bf4947a2060b18bebb6fc493
2018-10-05 12:20:24 -07:00
Rafael Oleza bd8b942ab9 Bump metro@0.48.0
Summary: llamadance

Reviewed By: jeanlauliac

Differential Revision: D10216618

fbshipit-source-id: 62284ab76651d3423b80f63b5d7bb355adbfaf06
2018-10-05 11:33:39 -07:00
Rafael Oleza 89a358f347 Expose enableBabelRuntime config param externally
Summary:
Up until now the `enableBabelRuntime` option in the `metro-react-native-preset` package was hardcoded in the transformer: our internal transformer set it to `false` and the opensource one was `true`.

This diff now exposes this param out to the config of Metro (now that it's quite easy to expose things) so anybody can set it to false or true.

This allows our end to end tests to set it to false to not have to deal with requires to `babel/runtime`.

Reviewed By: davidaurelio

Differential Revision: D10123776

fbshipit-source-id: 97e744eeb567c8e86ab3c613ac71970d226ed2ca
2018-10-05 11:33:38 -07:00
Héctor Ramos 6967a4fa56 Flag code analysis issues once per converter used (#21503)
Summary:
Fixes issue where the bot would leave multiple lines in the top review comment if, say, eslint found 30 issues, there would be 30 mentions of eslint having found issues.

See https://github.com/facebook/react-native/pull/21492 for an example of such a case, where `analysis-bot` left a spammy review at https://github.com/facebook/react-native/pull/21492#pullrequestreview-161837975.
Pull Request resolved: https://github.com/facebook/react-native/pull/21503

Differential Revision: D10219439

Pulled By: hramos

fbshipit-source-id: 75d32ef3bfeaa91ab614763a19494659ad1be0dd
2018-10-05 11:33:38 -07:00
Guilherme Varandas f1d6e225c5 Removing TimerMixin on ProgressViewIOSExample (#21500)
Summary:
Related to #21485.
Removed TimerMixin from the `RNTester/js/ProgressViewIOSExample.js` screen since it is currently not used.

- [x] `npm run prettier`
- [x] `npm run flow-check-ios`
- [x] `npm run flow-check-android`
- [x] runtime tests using `ProgressViewIOSExample` on Android and iOS

**RNTester steps**

- [x] Run RNTester.
- [x] Navigate to `ProgressViewIOSExample` and check if the animations are executed correctly and without lag.

[GENERAL] [ENHANCEMENT] [RNTester/js/ProgressViewIOSExample.js] - remove TimerMixin dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/21500

Reviewed By: TheSavior

Differential Revision: D10218366

Pulled By: RSNara

fbshipit-source-id: b44a0bbb50f6b0e85f406904131804eace941335
2018-10-05 11:18:21 -07:00
Valentin Shergin 3ad5c9e016 Fabric: Enabling clang-format for half of Fabric modules
Summary:
All code styles are terribly ugly. We have the only choise - choise something and embrace it.
This particular code style was borrowed from a neibour Fabric-friendly project because it follows established Facebook guides and respects client-side traditions.

Reviewed By: mdvacca

Differential Revision: D10218598

fbshipit-source-id: 8c4cf6713c07768566dadef479191661c79988f0
2018-10-05 11:03:23 -07:00
nd-02110114 3d31bebbeb Remove TimerMixin on ProgressBarAndroidExample.android.js (#21501)
Summary:
Related to #21485.
Removed TimerMixin from the `RNTester/js/ProgressBarAndroidExample.android.js` since it is currently not used.

- [x] npm run prettier
- [x] npm run flow-check-ios
- [x] npm run flow-check-android

In progress 🙇

[GENERAL] [ENHANCEMENT] [RNTester/js/ProgressBarAndroidExample.android.js] - remove TimerMixin dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/21501

Reviewed By: TheSavior

Differential Revision: D10218375

Pulled By: RSNara

fbshipit-source-id: c4c12f65855452bc2485f034a0560afd204512f4
2018-10-05 10:50:21 -07:00
Eli White 3aa8f09b44 Deprecate legacyImplementation
Summary: The legacy implementation doesn't provide additional functionality and has a negative impact on performance and user experience. The legacyImplementation prop is deprecated and will be removed in a future release.

Reviewed By: yungsters

Differential Revision: D10212762

fbshipit-source-id: 9b3416434ba392827b538c984c7ab4bcbe156e60
2018-10-05 10:23:21 -07:00
danibonilha 0de99bc8f5 Split ViewAccessibility into DeprecatedViewAccessibility and rename r… (#21422)
Summary:
This PR splits and renames all references of ViewAccessibility to DeprecatedViewAccessibility
Related to #21342
Pull Request resolved: https://github.com/facebook/react-native/pull/21422

Reviewed By: yungsters

Differential Revision: D10132659

Pulled By: RSNara

fbshipit-source-id: 68c371230c69ed37c3e44bf8a36043adb04afc78
2018-10-05 10:03:10 -07:00
Héctor Ramos 925f63dfbe Run publish_npm_package job on tagged commits without any pre-reqs (#21495)
Summary:
This PR gets master back on sync with fixes made to 0.57-stable.
Pull Request resolved: https://github.com/facebook/react-native/pull/21495

Differential Revision: D10209745

Pulled By: hramos

fbshipit-source-id: bc4d859adade820eac30e947514b6c6c2a27083f
2018-10-04 20:20:10 -07:00
Eli White 7536c9bdee Fix Incremental children flow type
Summary: Incremental appears to be causing flow errors on Github master causing CI to fail.

Reviewed By: RSNara

Differential Revision: D10205146

fbshipit-source-id: b86c2d099a2041ab1429b9aacb78ff1b382dca41
2018-10-04 14:33:56 -07:00
Radek Czemerys 997f382adc Fix deprecation warning message in Switch
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/21479

Differential Revision: D10205122

Pulled By: TheSavior

fbshipit-source-id: a7bbdae3b5dd6b47c4dc995e3c2e8e40abb64f13
2018-10-04 14:33:56 -07:00
Rafael Oleza 12ab08a5aa Bump metro@0.47.1
Summary: We need a new version of Metro with D10119384 to make the new Embeds work well

Reviewed By: davidaurelio

Differential Revision: D10119385

fbshipit-source-id: db7fc71c75c450720af41add466fc88ac38f3066
2018-10-04 04:03:13 -07:00
Emily Janzer c5186aeb46 Simplify OSS enums
Summary: Simplifying our OSS enums (remove private variables and methods) so that redex can more easily optimize them for us.

Reviewed By: achen1, Feng23

Differential Revision: D9812796

fbshipit-source-id: 11a8272db41ff04399d1cdf366e28ddf1b07b7be
2018-10-03 18:47:39 -07:00
Andrew Chen (Eng) fa6035bda6 Fix accessibility role/label
Summary: D10138128 had some shamefully wrong boolean logic to determine whether we should customize the accessibility delegate. Previously, we did it if BOTH the accessibility label AND role were present. We should actually do it if EITHER are present.

Reviewed By: mdvacca

Differential Revision: D10182135

fbshipit-source-id: 209a8ab43f5869762843fe878cfd59a7b9b5ab1a
2018-10-03 18:40:12 -07:00
Eli White 8a2187b8f9 Remove TimerMixin from TimerExample
Summary: $title

Reviewed By: yungsters

Differential Revision: D10180650

fbshipit-source-id: e757f2ae9a2de582c4b5260e557a66b5ad0c7f57
2018-10-03 15:02:36 -07:00
Grégoire Rit fdfe4220e0 Update flow Props declaration in TouchableWithoutFeedBack for onFocus and onBlur (#21462)
Summary:
Simple fix to avoid thoses flow error when using Touchables with onFocus & onBlur.

```
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/components/HomeMenu/MenuItem.js:32:8

Cannot create TouchableOpacity element because property onFocus is missing in object type [1] but exists in props [2].

     src/components/HomeMenu/MenuItem.js
      29│   render() {
      30│     const { text, style } = this.props
      31│     return (
 [2]  32│       <TouchableOpacity
      33│         hasTVPreferredFocus
      34│         style={style.item}
      35│         onFocus={() => this.onFocus()}
      36│         onPress={() => Alert.alert(`You pressed ${text}`)}
      37│       >
      38│         <ImageBackground source={separator} style={style.itemBackground}>
      39│           <Text style={style.text}>{text}</Text>
      40│         </ImageBackground>
      41│       </TouchableOpacity>
      42│     )
      43│   }
      44│ }

     node_modules/react-native/Libraries/Components/Touchable/TouchableOpacity.js
 [1] 286│ }): any): React.ComponentType<Props>);
```
Pull Request resolved: https://github.com/facebook/react-native/pull/21462

Differential Revision: D10179260

Pulled By: TheSavior

fbshipit-source-id: e6c5d1136bdde36c8bcbd4df8897a390dcba8e82
2018-10-03 14:02:49 -07:00
Ram N 7f6254be43 Cache the instance of `ChoreographerCompat`
Summary:
Since `ChoreographerCompat.getInstance()` is a singleton, we cache its instance.

This will be important in a subsequent diff where we ensure that `ChoreographerCompat.getInstance()` is only called on the UI thread

Reviewed By: achen1

Differential Revision: D9169298

fbshipit-source-id: 2067a50770dd41f5b1a12b62b6a9f8fea83d91e8
2018-10-03 13:40:36 -07:00
Ram N a5f3571770 Refactor the usages of ChoreographerCompat
Summary:
Reducing the places where we directly access `ChoreographerCompat.getInstance()`.

Since this is a singleton anyway, there was no need to pass this as an argument. In subsequent diffs, we will also ensure that `ChoreographerCompat.getInstance()` runs on the UI thread, so that the `Choreographer` it gets is based on the `Looper` of the main thread.

Reviewed By: achen1

Differential Revision: D10136624

fbshipit-source-id: ad18f7b61eb8b05094aff310f2eb90eb225427dc
2018-10-03 13:40:35 -07:00
Ram N 8b487d4d5a Create Handler lazily in DevServerHelper
Summary: Creating this Handler in the constructor implies that the constructor needs to run on the UI Thread. Since DevSupportManager is also initialized with ReactInstanceManager,

Reviewed By: mdvacca

Differential Revision: D10094981

fbshipit-source-id: b724b05ddbd6af68da1111a1a004491835f7a35a
2018-10-03 09:19:14 -07:00
David Vacca 98a6f19d7c Move 'top' prefix from UIManager to EventEmitter
Summary: This diff unifies the 'handling' of the top prefix in the EventEmitter.cpp class

Reviewed By: shergin

Differential Revision: D10149497

fbshipit-source-id: d0ddbbbeefe3790b414b101da47582161354c971
2018-10-02 15:09:05 -07:00
David Vacca cf66923831 Refactor UIManager -> FabricUIManager
Summary: This diff renames com.facebook.fbreact.fabric.UIManager to FabricUIManager, this is done in order to avoid confusion with com.facebook.react.bridge.UIManager

Reviewed By: shergin

Differential Revision: D10128635

fbshipit-source-id: 0cb874ec1ba698077d750214f1d25004065c2f59
2018-10-02 15:09:05 -07:00
David Vacca 001b04f983 Cleanup FabricBinding class
Summary: This diff removes unused method on the FabricBinding class, these methods were being used as part of the Fabric Android implementation, but they are not necessary anymore.

Reviewed By: shergin

Differential Revision: D10128636

fbshipit-source-id: 5afef4c2e9f4955af008200c5bdd2b6acc7ef333
2018-10-02 15:09:05 -07:00
David Vacca 9e7d918365 Introduce EventBeatManager and enable events
Summary: This diff introduces the concept of EventBeatManager, this is a class that acts as a proxy between the list of EventBeats registered in C++ and the Android side.

Reviewed By: shergin

Differential Revision: D10127857

fbshipit-source-id: a1956ca42d4c470fbc11cc9f30336a182fe7910c
2018-10-02 15:09:04 -07:00
Andrew Chen (Eng) 5be0dff433 Avoid view manager class loads (take 2)
Summary:
Second attempt at landing D9930713. Notes about the previous issue is mentioned as an inline comment below.

===========

We are currently iterating through each view manager to get its class name to pass to JS. JS uses this list to define lazy property accesses for each view manager to grab the constants synchronously. This results in each view manager's class loading immediately -- causing a small perf hit.

Let's avoid this view managers list entirely. JS is able to access each view manager directly by calling getConstantsForViewManager(name)

Reviewed By: axe-fb

Differential Revision: D10118711

fbshipit-source-id: 78de8f34db364a64f5ce6af70e3d8691353b0d4d
2018-10-02 14:03:24 -07:00
Mehdi Mulani e7e63fd409 Dealloc first time RCTNetInfo reachability callback
Summary:
@public
We're seeing a crasher where `self` on line 54 isn't an `RCTNetInfo`. The timing looks related to D9798488, so my theory is that this class is being deallocated before it resolves, and thus causes a crash.

Reviewed By: PeteTheHeat

Differential Revision: D10127341

fbshipit-source-id: 94eaba7def6b118092adcf6b4cce841ccc7d0b59
2018-10-02 14:03:23 -07:00
JenLindsay 408207b356 Split ImageProps into DeprecatedPropTypes (#21411)
Summary:
Related to #21342

- Split ImageProps.js: moved propType declarations to DeprecatedImageProps.js
- Renamed ImageProps references to DeprecatedImageProps in Image.ios.js
Pull Request resolved: https://github.com/facebook/react-native/pull/21411

Reviewed By: TheSavior

Differential Revision: D10146178

Pulled By: RSNara

fbshipit-source-id: 4db15eaaa8822e834af347d1927991dff1c427cb
2018-10-02 13:47:44 -07:00
Alexey Lang 1fc8a46570 Bump up the buffer size and show a warning if the trace might be truncated
Summary: The current buffer size isn't enough even to capture a short TTI trace.

Reviewed By: mhorowitz

Differential Revision: D10112538

fbshipit-source-id: 266fa6ffa916049245b21d7725a364d75589c776
2018-10-02 05:48:00 -07:00
Edward Karuna ff084a4e80 Add workaround for Android Gradle Plugin 3.2 change to asset dir (#21409)
Summary:
Android Gradle Plugin 3.2 uses a new intermediates/merged_assets directory instead of intermediates/assets. This workaround copies the javascript bundle to both directories for compatibility purposes.

Fixes #21132
Fixes #18357
Pull Request resolved: https://github.com/facebook/react-native/pull/21409

Differential Revision: D10141860

Pulled By: hramos

fbshipit-source-id: 0fb20fcec67ec2bfd7a8d9052599bbc70464b466
2018-10-02 03:02:41 -07:00
Sam Goldman 8a4975051e Upgrade xplat/js to Flow v0.82
Reviewed By: yungsters

Differential Revision: D10139929

fbshipit-source-id: ae44a8af7cab28c4acfd7c97e636467e44adcf37
2018-10-01 22:23:18 -07:00
BingBing c1561ab441 iOS: fix the baseline issue when displaying a mixture of different-language characters (#19653)
Summary:
This fixes #19193

Characters of different languages may have different height and different baseline, even with a same font and same font-size. When they mixed together, iOS will adjust their baselines automatically, to display a suitable view of text.

The problem is the behavior of dealing with the text-style property 'lineHeight'.

It once to be a right way at version 0.52.3, to setting a base-line-offset attribute for the whole range of the string. However, in current version, it enumerated the string, and set a different  base-line-offset for different font-height characters.

And this behavior broke the baseline adjustment made by the iOS. It just make every character's baseline aligned to a same line. But it is not supposed to displaying characters of different languages like that. Chinese characters' baseline is the bottom of each, however, it is not for English characters.

So maybe it is the better way to give a same value of base-line-offset attribute for the whole string. And this PR just did that: found the biggest value of font-height in the text, and calculate the offset with that biggest value, then set to the whole string. This will keep the origin baseline adjustment for different languages' chars made by iOS.

Since I always got an error when running the snapshot test locally, I can't even pass the them with the unmodified code in master branch.

The error is "Nesting of \<View\> within \<Text\> is not currently supported."

After I comment all of the check of that error from the source code, I got a different snapshot from the reference ones. It seems that all components which will cause that error are not rendered in the reference images.

Since this PR changed the behavior of 'lineHeight' property, it's better to add a new snapshot case for the situation of different-language-characters' mixture. So maybe somebody could help me with that or maybe it should be a issue?

[IOS] [BUGFIX] [Text] - fix the baseline issue when displaying a mixture of different-language characters
Pull Request resolved: https://github.com/facebook/react-native/pull/19653

Differential Revision: D10140131

Pulled By: shergin

fbshipit-source-id: 646a9c4046d497b78a980d82a015168cf940646b
2018-10-01 21:19:40 -07:00
Andrew Chen (Eng) d3f2f96f93 Fix default accessibility delegate
Summary:
The current accessibility implementation tries to generalize every view's accessibility node info by setting an accessibility delegate on every view -- regardless of whether or not any accessibility properties are set. This delegate however doesn't correctly set the appropriate accessibility node fields for every view. For example, ScrollViews needs AccessibilityNode.setScrollable(true) set, but the generic delegate does not account for this. For now let's avoid unnecessarily
setting an accessibility delegate on views that don't have any accessibility props set, which will likely fix the majority of these issues.

Reviewed By: mdvacca

Differential Revision: D10138128

fbshipit-source-id: b999b41e7256e3dce94cd70e9b944979d52f74fd
2018-10-01 18:47:29 -07:00
David Vacca 637d74f2a6 Expose EventEmitter.dispatchEvent as public
Summary: This diff exposes the method EventEmitter.dispatchEvent as public in order to be able to access it from the android side.

Reviewed By: shergin

Differential Revision: D10127509

fbshipit-source-id: d6ddf59c654a91fdeed5fba867ca31d6de96d607
2018-10-01 18:03:35 -07:00
Andrew Chen (Eng) 4ac500a337 Don't access ReadableNativeArray on UI thread
Summary: ReadableNativeArray initializes the ReactBridge which loads a bunch of c++ classes. Let's avoid doing this on the UI thread.

Reviewed By: mdvacca

Differential Revision: D10108380

fbshipit-source-id: ab4520535288ce450a865952e996b716d571df7f
2018-10-01 16:49:10 -07:00
Héctor Ramos b030fcbbf5 Update path to code analysis script (#21443)
Summary:
The script was moved after the original ShellCheck PR was opened, and this was lost during the rebase.
Pull Request resolved: https://github.com/facebook/react-native/pull/21443

Differential Revision: D10133498

Pulled By: hramos

fbshipit-source-id: da61b782362ab2d13cb6f0bca3fb1c9a0af08ae5
2018-10-01 15:22:35 -07:00
Alexander Khaylo 4768bea0cf Fix CameraRoll.getPhotos() crash on Android if device has a problematic video asset (#21438)
Summary:
Changed catching IOException to Exception
Fixes #20112
Pull Request resolved: https://github.com/facebook/react-native/pull/21438

Differential Revision: D10132453

Pulled By: hramos

fbshipit-source-id: c68fa8c45d43e4f2d116b8084ffd731ad6bf5aec
2018-10-01 14:32:27 -07:00
Ramanpreet Nara 07ac31eb3f Make Flow types more strict
Summary: Many of the optional types from the PR could have been made non-optional. I just made the change because it was simple enough to make and verify.

Reviewed By: TheSavior

Differential Revision: D10131969

fbshipit-source-id: b84693b5549708d7948fe3fd54295bc80be93790
2018-10-01 14:32:27 -07:00
Dishant Kaushik c8705330d7 InspectorPanel -> Delete PropTypes (#21392)
Summary:
Related to #21342
Pull Request resolved: https://github.com/facebook/react-native/pull/21392

Reviewed By: TheSavior

Differential Revision: D10129812

Pulled By: RSNara

fbshipit-source-id: 79e900b56eb043452ce8e13e998a9ad8d4443897
2018-10-01 14:32:27 -07:00
Ronaldo Lima 80066db654 Replace DeprecatedViewPropTypes.style for ViewStyleProp on IntegrationTestHarnessTest and InputAccessoryView (#21397)
Summary:
related #21342
Pull Request resolved: https://github.com/facebook/react-native/pull/21397

Reviewed By: TheSavior

Differential Revision: D10119623

Pulled By: RSNara

fbshipit-source-id: 16bdb3d5bf90c24b597bbc12fc416a50a0aa2bb1
2018-10-01 14:08:29 -07:00
Ram N ee74135a46 Add tracing to when SO libraries are loaded
Summary:
Currently, loading SO libraries is pretty expensive. While they are triggered due to accessing `ReadableNativeArray`. However, with preloader experiments, this block seems to move around and is loaded when the first dependent class loads it.

Also, as a part of D10108380, this will be moved again.

Adding a trace to keep track of where it moves.

Reviewed By: achen1

Differential Revision: D9890280

fbshipit-source-id: 4b331ef1d7e824935bf3708442537349d2d631d0
2018-10-01 14:08:29 -07:00
James Reggio 9e6522374b Fix artifacting on RN-drawn borders with asymmetric radii (#21208)
Summary:
This PR fixes an obscure rendering bug on iOS for borders with asymmetric radii. It appears to be a problem with the custom drawing that React Native performs when it cannot use native UIKit/CoreAnimation border drawing.
Pull Request resolved: https://github.com/facebook/react-native/pull/21208

Differential Revision: D10130120

Pulled By: hramos

fbshipit-source-id: d9fbc5c622c060db15658d038a068216b47bb26d
2018-10-01 12:52:20 -07:00
Daiki Nishikawa b6b0fc1f27 Move and Rename custom propType definitions in LayoutPropTypes (#21370)
Summary:
related #21342

TODO
* move LayoutPropType.js
* fix flow error

CheckList
 - [x] `yarn prettier`
 - [x] `yarn flow-check-android`
 - [x] `yarn flow-check-ios`

All flow checks pass.

[GENERAL] [ENHANCEMENT] [DeprecatedLayoutPropTypes.js] - Created.
[GENERAL] [ENHANCEMENT] [StyleSheetTypes.js] - add comments.
Pull Request resolved: https://github.com/facebook/react-native/pull/21370

Differential Revision: D10099715

Pulled By: RSNara

fbshipit-source-id: d0515fe0d56d9ed2fde50cc0bfb75b63aded1f5d
2018-10-01 12:19:15 -07:00