Commit Graph

12295 Commits

Author SHA1 Message Date
David Detlefs 05e862d48d Add Systrace-based telemetry to Hermes GC.
Reviewed By: amnn

Differential Revision: D6393879

fbshipit-source-id: d35a4647d000356dc99bce3187acc50d3a69ddeb
2017-11-23 15:15:54 -08:00
Rafael Oleza 968c88d141 Enable end to end deltas by default on Android
Reviewed By: mjesun

Differential Revision: D6406466

fbshipit-source-id: ab776d9ea89ed2ab83b8ede78be4e5d5f3074e34
2017-11-23 13:04:48 -08:00
Pritesh Nandgaonkar 0984f29a32 Refactor and move YGNodeToString implementation to different file
Reviewed By: emilsjolander

Differential Revision: D6397372

fbshipit-source-id: 79e701efe7f19db6dac1aea6328ebf0ac84a7ac3
2017-11-23 09:46:30 -08:00
Alex Dvornikov e7bd0f056b Remove self capturing RCTCxxBridge->_pendingCalls
Differential Revision: D6387237

fbshipit-source-id: 3244bba439ba9fc38c5be09657cbdc787b9b4585
2017-11-23 05:17:19 -08:00
Jean Lauliac 7d969a05de packager-worker-for-buck: bundleCommand-test.js: add more consistency
Reviewed By: davidaurelio

Differential Revision: D6395673

fbshipit-source-id: 24516bd456a231708891e789f1d5aa5c18f4eeca
2017-11-23 03:16:19 -08:00
Rafael Oleza 2ae255a6ea Update jest preprocessors to use the ast from the transformers
Reviewed By: jeanlauliac

Differential Revision: D6390677

fbshipit-source-id: e023fc32188c2d601b35d7a2e3f0f6f8af067962
2017-11-22 13:41:57 -08:00
Jean Lauliac 7fd5aa84a1 packager-worker-for-buck: refactor and fix source map output
Reviewed By: davidaurelio

Differential Revision: D6385199

fbshipit-source-id: f104f7b000dde131b57b671d14d4ec4e0d30d7a2
2017-11-22 05:22:21 -08:00
Nicolas Charpentier b9e7006cc6 Fix markdown in requiresMainQueueSetup warning
Summary:
nit-picking

[IOS] [MINOR] [React/Base/RCTModuleData.mm] - Fix markdown in `requiresMainQueueSetup` warning
Closes https://github.com/facebook/react-native/pull/16916

Differential Revision: D6394725

Pulled By: shergin

fbshipit-source-id: 272c5a6ee529af0b162230e8a07275043a888907
2017-11-22 02:31:05 -08:00
Nicolas Charpentier ee3532b5c2 Implement requiresMainQueueSetup in RCTTVNavigationEventEmitter
Summary:
Fix the following warning:

> Module RCTTVNavigationEventEmitter requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.

Trivial change.

[IOS] [MINOR] [RCTTVNavigationEventEmitter] - Implement `requiresMainQueueSetup` in `RCTTVNavigationEventEmitter`
Closes https://github.com/facebook/react-native/pull/16915

Differential Revision: D6394636

Pulled By: shergin

fbshipit-source-id: 3981655832715e73e93ef917d987e25097029b84
2017-11-22 00:39:33 -08:00
Héctor Ramos 75123c614b Remove empty lines to ensure JavaScript is loaded
Summary:
This is not currently an issue within the current site infrastructure, but eliminating these empty lines will ensure the code is not parsed as plain markdown text by some libraries.
Closes https://github.com/facebook/react-native/pull/16917

Differential Revision: D6389212

Pulled By: hramos

fbshipit-source-id: 853ace6f31c32abee36b563198ec79ca3c55176f
2017-11-21 14:27:06 -08:00
Leland Richardson b6f1a6085f Increase prepare js timeout
Summary:
We run into this timeout virtually every live-reload now, which I believe is just a function of the size of our React Native code base. Looking at the code, right now the prepare JS call is run and retried 3 times, with a wait/timeout of 1s each. On android, it's done 3 times with a wait/timeout of 5s on each. For consistency, I've updated it to be the same timeout as on android. Trying this with our project, we no longer get red-boxes when we live-reload for the first time.

I've run this on our project locally, and it fixed the issue. It's a very simple change, so I don't believe any additional testing should be needed.

[IOS][BUGFIX][RCTWebsocketExecutor] - Increased timeout to prevent false-positive redbox during development of large RN code base
Closes https://github.com/facebook/react-native/pull/16794

Differential Revision: D6387545

Pulled By: shergin

fbshipit-source-id: c6e58fb82e072c01f9e1277a58d2640d6140a8c7
2017-11-21 14:01:20 -08:00
James Reggio dc01eff72d Fix crash with non-zero blurRadius less than 1
Summary:
There's a crash-inducing bug with `Image.blurRadius` on Android.

`blurRadius` is specified in JavaScript as a `float`, but it's cast to `int` before being passed to the `IterativeBoxBlurPostProcessor`. However, in `IterativeBoxBlurPostProcessor`, there is an argument precondition requiring the integer `blurRadius` to be non-zero.

Because the `== 0` condition is evaluated on the `float`, it's possible for a `blurRadius` in the range of `(0, 1)` (non-inclusive) to pass the conditional, and then be truncated to `0` and passed as an argument to `IterativeBoxBlurPostProcessor`, which will fail its precondition and crash the app.

This change works in our app, which was previously crashing.

[ANDROID] [BUGFIX] [Image] Fixed crash when specifying an Image.blurRadius between (0, 1)
Closes https://github.com/facebook/react-native/pull/16845

Differential Revision: D6387416

Pulled By: shergin

fbshipit-source-id: d5191aa97e949ffd41e6d68c96b3c7bcbc82a52e
2017-11-21 12:30:49 -08:00
Mateusz Wielgos b9a5862f67 react-native-git-upgrade signal termination
Summary:
When performing an upgrade using react-native-git-upgrade git can fail with a signal, however, only exit codes are accounted for.

Related issue: #12336

In my case, Git fails with a `SIGPIPE` signal - have not figured out why yet, but that's a separate issue. Before, since exit code was not zero, the console would default to the error case, but since no exit code was supplied, the error message was meaningless - `exited with code null`. Now, it errors out with `terminated with signal 'SIGPIPE'`, while still taking account of exit codes. Quoting [nodejs docs](https://nodejs.org/api/child_process.html#child_process_event_exit):

> The 'exit' event is emitted after the child process ends. If the process exited, code is the final exit code of the process, otherwise null. If the process terminated due to receipt of a signal, signal is the string name of the signal, otherwise null. One of the two will always be non-null.

I would be happy to write a test case for this but I haven't seen any react-native-git-upgrade ones?

[CLI] [ENHANCEMENT] [react-native/react-native-git-upgrade] - Git terminated by signal error message
Closes https://github.com/facebook/react-native/pull/16822

Differential Revision: D6387451

Pulled By: shergin

fbshipit-source-id: 25bf9dabdb5fda70d220bcd5f14c3c92bba8c3d4
2017-11-21 12:16:21 -08:00
Nikita Tuk 15179f1798 Fixed fractional border width on iOS
Summary:
Incorrect render for borders that are not proportional to device pixel: borders get stretched and become significantly bigger than expected.
Rdar: http://www.openradar.me/15959788

Incorrect render for borders that are not proportional to device pixel: borders get stretched and become significantly bigger than expected.
Rdar: http://www.openradar.me/15959788

Reviewed By: shergin

Differential Revision: D6317674

fbshipit-source-id: 6bc331447458583a02c0e56d0d011a31d31d70a8
2017-11-21 12:16:21 -08:00
Ramanpreet Nara 5aa1fb3ff3 Fix border-rendering in APIs < 18
Summary:
`Canvas.clipPath` isn't supported with hardware acceleration in APIs below 18. The rounded border rendering logic for Android relies on this method. Therefore, rounded borders do not render correctly on such devices.

**Screenshot of Nexus 5 running API 17 (Before these changes):**
https://pxl.cl/9rsf

**The fix**: If the API version is less than 18 and we're rendering rounded borders, I disable hardware acceleration. Otherwise, I enable it. I'm going to check to see if this has perf regressions by running a CT-Scan.

With this change, rounded borders render correctly on Android devices running versions of Android between Honeycomb to JellyBean MR2.

**Screenshot of Nexus 5 running API 17 (After these changes):**
https://pxl.cl/9rrk

Reviewed By: xiphirx

Differential Revision: D6153087

fbshipit-source-id: 16e35be096051ac817c8b8bcdd132ecff3b4b167
2017-11-21 11:17:03 -08:00
Jesús Darío 60828566a7 Add a sample to clarify animation callback
Summary:
Even having worked long with React Native, I am pretty new to animations, so it took me a while to figure out how to trigger some code after an animation had finished. After some investigation, it
was evident I did not ready as in depth as I am supposed to, but this can be a problem for many
who, like me, try to search quick through docs and other resources.

Here more cases:
https://stackoverflow.com/questions/38053071/react-native-animated-complete-event
https://github.com/facebook/react-native/issues/3212

Read the proposed sample, and see if it is adequate.

 [DOCS] [ENHANCEMENT] [AnimatedImplementation.js] - Adds a sample for animation callbacks
Closes https://github.com/facebook/react-native/pull/16770

Differential Revision: D6304441

Pulled By: hramos

fbshipit-source-id: c22e391aece6a62684a78847fc74df203c2438d7
2017-11-21 11:02:57 -08:00
Gabriel Peal 1e18d907bf Prevent a crash when no cursor drawable is set
Summary:
React Native 0.43 added additional functionality to setSelectionColor that also tints the cursor drawable of the View. However, some views may not have a cursor drawable set in which case, the code will crash when attempting to load a drawable with resource id 0.

We encountered this in our RN 0.45 upgrade in the Airbnb app.

lelandrichardson
Closes https://github.com/facebook/react-native/pull/14789

Differential Revision: D6386076

Pulled By: shergin

fbshipit-source-id: faa5a1edb3be8d08988f46205c0f22d17b63b5bc
2017-11-21 10:36:10 -08:00
Pritesh Nandgaonkar d7ab9496bc Change c files to cpp
Reviewed By: gkassabli

Differential Revision: D6271299

fbshipit-source-id: 66c0e54ccf019d72d1fd0b4d117826e4e84fdc89
2017-11-21 10:18:29 -08:00
Héctor Ramos 3c9092acf3 Fix Shadow Props
Summary:
Quick fix
Closes https://github.com/facebook/react-native/pull/16910

Differential Revision: D6385891

Pulled By: hramos

fbshipit-source-id: 5fcb0674db14282ccac5aa26518a84888a5e3005
2017-11-21 10:18:29 -08:00
Pritesh Nandgaonkar d950dc6a21 Deleted YGSetMemoryFucs as it is unused
Reviewed By: emilsjolander

Differential Revision: D6374147

fbshipit-source-id: 8c896dce23571268a1a52df5cc72486af9d66df7
2017-11-21 03:37:54 -08:00
Adam Ernst 33cefc1760 RCTRedBox should appear beneath the status bar
Reviewed By: fromcelticpark

Differential Revision: D6370566

fbshipit-source-id: fe59a789113c2e8c24e96e560647efbd8bdfe67b
2017-11-20 18:36:27 -08:00
Adam Ernst 9180d4eb82 Make RCTPackagerConnection a singleton
Reviewed By: fromcelticpark

Differential Revision: D6361741

fbshipit-source-id: 96e92dff5dd3d7aa1f7555442b0eba90e7dbf47c
2017-11-20 18:36:27 -08:00
Brian Vaughn c91d87213e Replace fburl.com link with public fb.me link
Summary:
Follow up from [this comment](1b22d49ae8 (commitcomment-25699227)).
Closes https://github.com/facebook/react-native/pull/16892

Differential Revision: D6374118

Pulled By: bvaughn

fbshipit-source-id: e692985d6736986acc073fa036d413121ce51f41
2017-11-20 13:56:15 -08:00
Héctor Ramos 79e24ede40 Migrate additional docs to the new format
Summary:
[DOCS]
Closes https://github.com/facebook/react-native/pull/16874

Differential Revision: D6375515

Pulled By: hramos

fbshipit-source-id: 64359b45a37c7b478919121573ca04dbb1ce6609
2017-11-20 13:16:12 -08:00
Rafael Oleza f587f8d51d Enable end to end deltas by default on Android
Reviewed By: mjesun

Differential Revision: D6374111

fbshipit-source-id: f372242ddbb8a278041d1ebb2aace227a571c2e0
2017-11-20 13:16:11 -08:00
Dmitry Zakharov f1015664e9 Fix crash when destroying catalyst
Reviewed By: fromcelticpark

Differential Revision: D6373275

fbshipit-source-id: c36b53f023800097b301d530250b05e5b2a4dfca
2017-11-20 07:38:53 -08:00
Kevin Brown 0ff576081b Corrected types of page_info return value in documentation.
Summary:
I was confused by the current documentation, as it was requesting me to pass the previously received `end_cursor` into the next fetch but it was declared as a boolean. I checked in the debugger and it's just mislabeled in the docs, so this PR fixes the docs.

I tried to push this change back in #15472 but wasn't able to undo the borked rebase, so I'm submitting a new PR.

This is a change to documentation only.

[DOCS] [BUGFIX] [Libraries/CameralRoll/CameraRoll.js] - Corrected return type in the documentation for the `start_cursor` and `end_cursor` values.
Closes https://github.com/facebook/react-native/pull/16830

Differential Revision: D6371585

Pulled By: hramos

fbshipit-source-id: 5038041e95a04ea4c2de8d2b535a8a4e019289f6
2017-11-19 17:45:55 -08:00
Eric Rozell 766f020e68 Minor bug in random generator for `selection` prop
Summary:
`.sort()` will sort on the string value by default, so if you generate [18, 8], they will stay in that order. Adding comparer to ensure values are sorted numerically.

Found a bug in RNTester.

Ran RNTester and confirmed that bug could be reproduced.

[IOS][BUGFIX][RNTester] - patch test to implement desired behavior.
Closes https://github.com/facebook/react-native/pull/16871

Differential Revision: D6371550

Pulled By: shergin

fbshipit-source-id: 84866d1eb02c2be51cd15a60490604d28fa18973
2017-11-19 17:15:42 -08:00
John Wilson 6b26971a56 Removed Duplicate data.
Summary:
Prop for SectionList 'ItemSeperatorComponent' was repeated twice.

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

-->

(Write your motivation here.)

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

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/16872

Differential Revision: D6370787

Pulled By: hramos

fbshipit-source-id: f5b53376b6c169d96089e8706612587cc50d8669
2017-11-19 09:57:06 -08:00
John Wilson 3aa38564f7 Correcting the redirection link.
Summary:
Correcting the redirection link to the right section ID for ListFooterComponent.

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

-->

(Making the site flow better.)

(Just fixed a small typo!)

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/16873

Differential Revision: D6370785

Pulled By: hramos

fbshipit-source-id: bb6e5ca4e9bb585f94670c233258d602136e3097
2017-11-19 09:30:48 -08:00
Nathan Brown 44c16499fd Mention <ImageBackground> when error is thrown
Summary:
Improve the error message shown when you try to nest components in an
`<Image>` component by referencing the `<ImageBackground>` component.

It would be helpful if the error message displayed when you try to nest components in an `<Image>` component mentioned the `<ImageBackground>` component. Especially since this component is not yet well documented.

[IOS][MINOR][Libraries/Image/Image.ios.js] - Surfaced `<ImageBackground>` in error message
[ANDROID][MINOR][Libraries/Image/Image.android.js] - Surfaced `<ImageBackground>` in error message
Closes https://github.com/facebook/react-native/pull/16880

Differential Revision: D6369396

Pulled By: shergin

fbshipit-source-id: c4ae4dbb77d0fce6cbd7a42d1957d16112b24549
2017-11-18 17:27:58 -08:00
Brian Vaughn 1b22d49ae8 renderApplication() supports async initial render
Reviewed By: sahrens

Differential Revision: D6339469

fbshipit-source-id: d832de936c50edcdc6953b72b5ad18ce1b652187
2017-11-17 13:33:03 -08:00
Alexander Komissarov ad89ea7b50 check if listener is still in the set before calling onHostResume
Reviewed By: achen1

Differential Revision: D6341419

fbshipit-source-id: e49188803bbf3641bad6a9cc8c497d453798bbce
2017-11-17 11:20:45 -08:00
Rafael Oleza 231c7a0304 Add end to end Delta support to Android devices
Reviewed By: davidaurelio

Differential Revision: D6338677

fbshipit-source-id: 8fa8f618bf8d6cb2291ce4405093cad23bd47fc3
2017-11-17 07:47:38 -08:00
Alex Dvornikov 0ac5a5230c Make RCTNativeModule::invokeInner explicitely return folly::none in case of error
Differential Revision: D6347967

fbshipit-source-id: 88788da321ca75d20b6c1a8e3d41642af7c6155e
2017-11-17 03:17:20 -08:00
Logan Daniels d19d137cc1 Fix minimumViewTime in ViewabilityHelper
Reviewed By: sahrens

Differential Revision: D6350352

fbshipit-source-id: e909600875156127eb3144726981ab62e0015e6e
2017-11-16 20:15:46 -08:00
Héctor Ramos bd9cb37ccf Update buck to v2017.11.16.01
Summary:
Android tests on CI have been failing since late October due to dd016f334c which makes use of a new Buck feature, `required_for_source_only_abi`. Circle was using an older September release. In this PR, we update to the latest release.

Green is good. Red is bad.

Wait for Circle to run.

[INTERNAL][BUGFIX][./circleci/config.yml] - Update Buck version
Closes https://github.com/facebook/react-native/pull/16861

Differential Revision: D6355335

Pulled By: hramos

fbshipit-source-id: 411d0b229f0dfb7e9dfc07c300b6546bf7afcdfe
2017-11-16 18:18:37 -08:00
Héctor Ramos 64d80b13db Migrate to new documentation format
Summary:
Now that the Component and API docs are no longer auto-generated, we need to consolidate on a new format for our jsdoc comments. Any help from the community will be appreciated.

In this initial pull request, we'll be tackling the following docs:

- `AccessibilityInfo`, an API doc.
- `ActivityIndicator`, a Component doc.
- `View`, a Component doc.

This top comment will serve as a style guide, and when in doubt, please refer to the individual commits in this PR.

Each commit should update a single component or API, along with any relevant markdown files.

- Documentation in the JavaScript source files should be succinct. Any verbosity should be moved over to the markdown docs in the website...
- ...by adding a link to the relevant method/prop on the website to every comment block.
- Avoid markdown style links in JavaScript source files, opt for plain old URIs.

Let code document itself:

- If a method is Flow typed, the comment block does not need to repeat this information.
- If a param can be one of several values, and the type definition is easily determined from the code, the values should not be repeated in the comment block. Again, move this to the markdown doc if not present already.
Closes https://github.com/facebook/react-native/pull/16790

Differential Revision: D6353840

Pulled By: hramos

fbshipit-source-id: 9712c459acc33092aae9909f3dd0b58a00b26afc
2017-11-16 17:04:45 -08:00
Adrien Thiery 0182086350 Disable git hooks for the upgrade process
Summary:
I'm loving `react-native-git-upgrade`, such a life and time saver, but when doing the upgrade, if git hooks are defined globally to be applied, `react-native-git-upgrade` uses these git hooks, although they might not be relevant to the upgrade process (and potentially make it way longer).

Btw, thanks ncuillery for the great tool 😄

To test, I :
* cloned my project
* upgraded it with the npm published `react-native-git-upgrade` version : Git hooks are running during the upgrade
* cloned the `react-native` repo
* did my modifications on the `react-native-git-upgrade/cliEntry.js` file
* `npm i -g react-native-git-upgrade/` after running `yarn` in that folder
* Re-cloned my project in another folder
* Upgraded it with `react-native-git-upgrade` : The hooks are not running anymore, yay!

[CLI] [ENHANCEMENT] [react-native/react-native-git-upgrade] - Do not run git hooks in the upgrade process

I plan to add an option to the cli so you can pass `--verify` or `--use-git-hooks` if you DO want your git hooks to run, but don't have the time right now and I think the default should be to not run them.
Closes https://github.com/facebook/react-native/pull/16855

Differential Revision: D6353781

Pulled By: hramos

fbshipit-source-id: e4b0f55d10c37bc805b32cb4c0fe3c863346482d
2017-11-16 16:43:05 -08:00
Ashok Menon 52e3ae9063 Unify Systrace native hook argument passing.
Reviewed By: javache

Differential Revision: D6316024

fbshipit-source-id: c1b315fac2c3cf8558d0c9eb0eb2c7d3efe5c64f
2017-11-16 08:01:06 -08:00
Pritesh Nandgaonkar 6c70975689 Replace printf with YGLog calls
Reviewed By: gkassabli

Differential Revision: D6297015

fbshipit-source-id: 6a67bdf33ef121785ac14938f5d3ed6e9d6f2656
2017-11-16 05:34:27 -08:00
Brian Vaughn c7f37074ac React sync for revisions 589c0a2...2d23a45
Reviewed By: acdlite

Differential Revision: D6328351

fbshipit-source-id: 88dc0f6ec9947e4a908c21f3a3df46bca5a7fdbc
2017-11-15 09:16:18 -08:00
Naman Goel da047966e4 Improve types for React Native styles.
Reviewed By: TheSavior

Differential Revision: D6226807

fbshipit-source-id: b64a77383e6e685f4017c47fc9a5095ed63b062c
2017-11-14 13:18:33 -08:00
allengleyzer 3e4cf0e8d2 Added progress updates for all XMLHttpRequest upload types
Summary:
Previously, only form-data request bodies emitted upload progress updates. Now,
other request body types will also emit updates.

Addresses issues:
https://github.com/facebook/react-native/issues/15724
https://github.com/facebook/react-native/issues/11853

This is a bug fix for functionality that's missing on Android. These events are already working correctly on iOS.

Run the following code on Android, and ensure that events are being sent:
```
const fileUri = 'file:///my_file.dat';
const url = 'http://my_post_url.com/';
const xhr = new XMLHttpRequest();

xhr.upload.onprogress = (event) => {
    console.log('progress: ' + event.loaded + ' / ' + event.total);
}

xhr.onreadystatechange = () => {if (xhr.readyState === 4) console.log('done');}

console.log('start');

xhr.open('POST', url);

xhr.send({ uri: fileUri }); // sending a file (wasn't sending progress)
xhr.send("some big string"); // sending a string (wasn't sending progress)

const formData = new FormData(); formData.set('test', 'data');
xhr.send(formData); // sending form data (was already working)
```

[ANDROID] [BUGFIX] [XMLHttpRequest] - Added progress updates for all XMLHttpRequest upload types

Previously, only form-data request bodies emitted upload progress updates. Now,
other request body types will also emit updates.

Addresses issues:
https://github.com/facebook/react-native/issues/15724
https://github.com/facebook/react-native/issues/11853
Closes https://github.com/facebook/react-native/pull/16541

Differential Revision: D6325252

Pulled By: hramos

fbshipit-source-id: 4fe617216293e6f451e2a1af4fa872e8f56d4f93
2017-11-14 11:01:17 -08:00
Wei Yeh 58edf024a1 Fix typo in SafeArea documentation
Reviewed By: shergin

Differential Revision: D6316656

fbshipit-source-id: 12d37f9d8ad2481b7f6685c8d675ce84234bd814
2017-11-14 10:32:15 -08:00
Dmitry Zakharov cfa2bbf2f6 Remove minNumShakes from ReactInstaneManager
Reviewed By: kathryngray

Differential Revision: D6313521

fbshipit-source-id: ffef1f96fbec88cdcc7597fa81505aee59e10bb8
2017-11-14 09:38:03 -08:00
Dmitry Zakharov 4f886a29a1 Remove android_react_native_perf.use_separate_ui_bg_thread experiment.
Reviewed By: AaaChiuuu

Differential Revision: D6313250

fbshipit-source-id: 583a729a157a2053827631a43e38917753e78477
2017-11-14 06:58:46 -08:00
Dmitry Zakharov 053776338e Cleanup ReactInstanceManager
Reviewed By: kathryngray

Differential Revision: D6296922

fbshipit-source-id: 2fbf11f09a3c25ff3e7c222edc2e01b81e687943
2017-11-14 05:46:08 -08:00
Dmitry Zakharov 4894ac430d Remove splitting to BridgeCorePackage and ReactNativePackage.
Reviewed By: kathryngray

Differential Revision: D6286129

fbshipit-source-id: 8d75e610291402ccbffb137ce46e64d11826b950
2017-11-14 04:56:43 -08:00
Kevin Gozali 28d5d6baf1 Fix asset resolver url handling
Summary:
1. file:// may get prepended to an http:// source URL during dev mode, making an invalid URL
2. the logic to detect `isLoadedFromFileSystem()` should've checked for file:// protocol to not get confused by http:// URL

Reviewed By: zahanm

Differential Revision: D6307187

fbshipit-source-id: e7e7a41bf721dd0601b0c1877e278e1e435ef5e2
2017-11-12 23:01:40 -08:00