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

710 Коммитов

Автор SHA1 Сообщение Дата
Olivier Notteghem 68b2f49a31 Improves react image loading handlers to mimic iOS behavior
Reviewed By: vjeux

Differential Revision: D3283011

fbshipit-source-id: acb04f8b2ccbab99a59040a7ca70aa46cbf73faa
2016-05-10 14:17:27 -07:00
Andy Street f1d12f6b38 Make runJSBundle synchronous
Summary: This is called on the JS thread so we don't need to post a runnable.

Reviewed By: lexs

Differential Revision: D3281388

fbshipit-source-id: ff292a710442c0b84c6ee31a2644a5c2ea650dc9
2016-05-10 09:21:24 -07:00
Andy Street 1c31aea83f Update "This shouldn't be possible. Congratulations." error message
Summary: Apparently this *is* possible. Congratulations to me.

Reviewed By: nicklockwood

Differential Revision: D3281361

fbshipit-source-id: 53c6ab83d959aa8a77880f4f772a7a7d7ccf4950
2016-05-10 09:17:23 -07:00
Konstantin Raev 4c3286f2a2 Made UIManager set displayContstants
Reviewed By: andreicoman11

Differential Revision: D3281309

fbshipit-source-id: f5568f2127e7e26dcbd77b3845092346ac06c0db
2016-05-10 08:34:31 -07:00
Martin Konicek 128d93b8aa Revert Android websocket: Include cookies with request
Summary:
This reverts the commit bf8b5499bb
Pull request: https://github.com/facebook/react-native/pull/6851
Internal Phabricator revision: D3257466

See the pull request for discussion.

Reviewed By: bestander

Differential Revision: D3277433

fbshipit-source-id: 623f93e1bce47ac156ffab154c57495b85ffa936
2016-05-09 13:37:29 -07:00
Nikhilesh Sigatapu d4f6f61a96 Increase the stack size for the React queue on older Android phones
Summary:
Older Android devices don't have a large stack by default and with about 16 levels of views the app will crash. Modern Android devices are fine so we can continue to use the system defaults while using a 2MB stack on older Android devices.
Closes https://github.com/facebook/react-native/pull/7416

Differential Revision: D3276805

Pulled By: astreet

fbshipit-source-id: a7b31a1be62e13f333148ca0908eb01a11aa4562
2016-05-09 11:48:23 -07:00
Jesse Sessler 191d278fda Modal Status Bar Translucent
Summary:
Currently the Modal component on Android is rendered below the Status Bar, which changes it's color to grey, and in the UIExplorer example the backdrop is just formatted to look the same color. In some scenarios users may want to preserve the color of their status bar and make it look as though the modal is appearing on top. This PR allows for that.

This GIF shows current behavior and new behavior with the translucentStatusBar prop set to true.

![](http://g.recordit.co/BSX5g9obRC.gif)

I've updated the UIExplorer app to demonstrate and the docs as shown below

![image](https://cloud.githubusercontent.com/assets/4265163/14742854/500e1292-086c-11e6-9275-71808b0cbed7.png)

Thanks!
Closes https://github.com/facebook/react-native/pull/7157

Differential Revision: D3264497

Pulled By: dmmiller

fb-gh-sync-id: 61346d99414d331d3420f44a4c5f6341b0973be6
fbshipit-source-id: 61346d99414d331d3420f44a4c5f6341b0973be6
2016-05-09 07:08:22 -07:00
Andy Street 54f7ae1c02 Force react applications to be explicitly unmounted
Summary:
We previously were unmounting the react application unconditionally when the ReactRootView#onDetachedFromWindow. This is nice in that it automatically allows us to reclaim memory, but there are many scenarios where a ReactRootView can be embedded in another piece of UI that detaches its children as part of its normal function (e.g. ListView, RecyclerView, ViewPager, etc).

As such, we will now enforce that the hosting Activity/Fragment/??? explicitly calls unmountReactApplication in the same way it calls startReactApplication. For Applications extending ReactActivity/AbstractReactActivity, this will happen automatically in onDestroy.

Reviewed By: foghina

Differential Revision: D3265161

fb-gh-sync-id: 4d49b0c41256213f00874f57e784aa8741dbf394
fbshipit-source-id: 4d49b0c41256213f00874f57e784aa8741dbf394
2016-05-09 04:09:29 -07:00
UnoDeTantos f7ce0c1c2f Adds progressViewOffset to RefreshControl
Summary:
Add the possibility to define a progress view top offset to RefreshControl on android. As i comment in #6740, contentInset does the trick on IOS.

Looking android documentation seems that exists a possible solution:
http://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html#setProgressViewOffset(boolean, int, int)

This pull request implement that but keeping it simple, only a top offset.

For example, now we could put navigation bar over the scrollview (or listview) and define a progressViewOffset on RefreshView in order to start behind the navigation. At this point we could make some kind of coordinator layout to hide/show navigation on scroll.

To maintain the default behavior, start point is equal to start point minus progress circle diameter in order to create that progress circle before the start point.
Closes https://github.com/facebook/react-native/pull/6759

Differential Revision: D3240664

Pulled By: mkonicek

fb-gh-sync-id: ccf866272e871811c1c6dcc2a34f5c217967feee
fbshipit-source-id: ccf866272e871811c1c6dcc2a34f5c217967feee
2016-05-09 01:51:22 -07:00
Sokovikov ff431734a4 Revert "Revert "fix border style without borderRadius""
Summary: Closes https://github.com/facebook/react-native/pull/7389

Differential Revision: D3269828

Pulled By: mkonicek

fb-gh-sync-id: 896789fcc76953a035cf8701d3a90211b92b6b80
fbshipit-source-id: 896789fcc76953a035cf8701d3a90211b92b6b80
2016-05-06 09:23:22 -07:00
Russell Porter a412fd1504 Remove unused generated strings.xml files
Differential Revision: D3265330

fb-gh-sync-id: a0ca96e4c3db63051dc3c09ca99d492fb3624b51
fbshipit-source-id: a0ca96e4c3db63051dc3c09ca99d492fb3624b51
2016-05-05 16:08:26 -07:00
Jimmy Mayoukou dd8caf4cf2 Implement returnKeyType/returnKeyLabel on Android
Summary:
This PR implements [`returnKeyType`](http://facebook.github.io/react-native/docs/textinput.html#returnkeytype) on Android.

It is implemented with [`EditText.setImeOptions()`](http://developer.android.com/reference/android/widget/TextView.html#setImeOptions(int)) that allows us to specify options on an input, in this case change the return button icon. To be noted that it is also possible to specify a string instead of an icon with [`EditText.setImeActionLabel()`](http://developer.android.com/reference/android/widget/TextView.html#setImeActionLabel(java.lang.CharSequence, int)) while being 2 different things I added both of these behaviors in this PR since it was mostly at the same place/component.

**Problems encountered :**

- All the `ReactEditText`s were set to `IME_ACTION_DONE` by default ([reference](a2157dbbe0/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java (L78))). I'm not sure
Closes https://github.com/facebook/react-native/pull/6905

Differential Revision: D3264755

Pulled By: dmmiller

fb-gh-sync-id: 4a090e31b620a245847c06ba1895cfea02e88d0f
fbshipit-source-id: 4a090e31b620a245847c06ba1895cfea02e88d0f
2016-05-05 10:22:19 -07:00
Konstantin Raev 457e348081 Open sourced SwipeRefreshLayoutRecordingModule
Reviewed By: dmmiller

Differential Revision: D3264212

fb-gh-sync-id: 8790200a0d3c47050d6a91c906854b3a55640829
fbshipit-source-id: 8790200a0d3c47050d6a91c906854b3a55640829
2016-05-05 08:17:34 -07:00
Andy Street a1ba0918ab Protect against JS module call race condition while initializing react instance
Summary: Fixes a race condition where JS module functions could be called in between ##initializeWithInstance(catalystInstance);## and ##CatalystInstance#runJSBundle##, before the BatchedBridge in JS was set up. We now guarantee that all JS module methods that are called after `ReactContext#hasActiveCatalystInstance()` returns true will have the batched bridge created and ready to use.

Reviewed By: lexs

Differential Revision: D3258651

fb-gh-sync-id: 66e66533cc86d185e7c865376d6a5cdc6520d2d4
fbshipit-source-id: 66e66533cc86d185e7c865376d6a5cdc6520d2d4
2016-05-05 05:52:19 -07:00
Andy Street a69b883537 Simplify ReactRootView
Summary:
I need to do some refactoring of what happens when a ReactRootView is attached/detached from the window. In doing so, I found ReactRootView is way more complicated than it needs to be and very hard to understand. This simplifies it while maintaining functionality.

Basically:
- When you start a react application, if the root view is measured, we attach it to the instance.
- If it wasn't measured, we do nothing
- In onMeasure, if we have a ReactInstanceManager, but are not attached to it, attach to it.

None of this needs to depend on whether we're attached to the window or whether an attach is scheduled afaict.

Reviewed By: dmmiller

Differential Revision: D3260056

fb-gh-sync-id: 974c19ed75a07f83299472f75346bd6be7414128
fbshipit-source-id: 974c19ed75a07f83299472f75346bd6be7414128
2016-05-05 05:07:28 -07:00
Dave Miller a3146e41a2 Add pagingEnabled to HorizontalScrollView
Summary:
This adds support for pagingEnabled to the HorizontalScrollView.

This is an initial implementation.

Because Android doesn't provide great details about what is happening with a scroll view after you are done touching it, we have some post touch handling.  This is kicked off either by touch up or a fling call.
Once we are doing that handling, we start a runnable that basically checks if we are still scrolling.  If we are, we just schedule that runnable again and check a frame later.  If we are done scrolling (no onScrollChanged since we last fired), we could be in one of two states, the fling is done or we are done snapping to the page boundary.  If we are in the fling done case, we then check if we need to scroll to a page boundary.  If so, we call smoothScrollTo and schedule ourself to check onScroll events again until done with that scroll.  If we are done with both (either we only did momentum scroll or we did that and then snapped to page), we can then fire the final event and stop checking.  This logic is all in handlePostTouchScrolling.

Because of the decision to only do page scrolling after momentum ends, we do allow you to scroll through with momentum a number of pages and the transition can be a little strange where it stops a sec and then slides to be page aligned.  As a follow up, we can probably smooth that up by changing the value we pass to super.fling() that would adjust it to be let momentum carry it to the page boundary.

Reviewed By: weicool

Differential Revision: D3207608

fb-gh-sync-id: 02f62970ed9a5e3a5f9c0d959402756bc4b3699e
fbshipit-source-id: 02f62970ed9a5e3a5f9c0d959402756bc4b3699e
2016-05-05 04:14:22 -07:00
Konstantin Raev 110d1587ae Added stability to OSS instrumentation tests
Summary:
This change makes all instrumentation tests to be executed in sequence in independent retriable processes.

With a new test being open sourced recently our CI stability degraded.
This PR should bring back stability because tests won't affect each other and will have shorter lifetime
Closes https://github.com/facebook/react-native/pull/7353

Differential Revision: D3259081

fb-gh-sync-id: 48ccdb5dbd561d416526497ff474378db9ca3c60
fbshipit-source-id: 48ccdb5dbd561d416526497ff474378db9ca3c60
2016-05-04 10:59:33 -07:00
Alexander Blom 041185edfd Let JS modules use strings instead of ids on Android
Reviewed By: nicklockwood

Differential Revision: D3229626

fb-gh-sync-id: f8b2e8c9fc0d25d67f623cdbbe9930a02a40d1de
fbshipit-source-id: f8b2e8c9fc0d25d67f623cdbbe9930a02a40d1de
2016-05-04 10:29:26 -07:00
Martin Konicek 00167e4956 Add scripts for running tests locally
Summary:
I was going to add an integration test and realized it would be useful to have an easy way to run these test locally. Added scripts and documented how to use them.

**Test plan**

`./scripts/run-android-local-unit-tests.sh`

<img width="786" alt="screen shot 2016-05-04 at 3 55 26 pm" src="https://cloud.githubusercontent.com/assets/346214/15018667/7f4981cc-1212-11e6-9fcb-12493c29015c.png">

`./scripts/run-android-local-integration-tests.sh`

<img width="772" alt="screen shot 2016-05-04 at 3 57 23 pm" src="https://cloud.githubusercontent.com/assets/346214/15018677/90b54810-1212-11e6-83d4-58530eb41d79.png">

Buck check by replacing `which buck` by `which duck` in the scripts:

<img width="805" alt="screen shot 2016-05-04 at 4 09 37 pm" src="https://cloud.githubusercontent.com/assets/346214/15018696/aa008262-1212-11e6-9a22-173507cd771f.png">

Checked the website renders fine:

`cd website; npm install; npm start`

![screen shot 2016-05-04 at 4 05 23 pm](https://cloud.githubusercontent.com/asse
Closes https://github.com/facebook/react-native/pull/7386

Differential Revision: D3258717

fb-gh-sync-id: 023eb9fdb59b00f9507e2e0694ad0934bb564c03
fbshipit-source-id: 023eb9fdb59b00f9507e2e0694ad0934bb564c03
2016-05-04 08:58:18 -07:00
Srikanth K Hari bf8b5499bb android websocket: include cookies with request
Summary:
Previously cookie headers weren't sending on websocket connection requests for android.
This commit fixes the issue.
Closes https://github.com/facebook/react-native/pull/6851

Differential Revision: D3257466

fb-gh-sync-id: 4225d11c8c6efd09493ef938a65f024dcbaff749
fbshipit-source-id: 4225d11c8c6efd09493ef938a65f024dcbaff749
2016-05-03 21:12:29 -07:00
Digeff 785cc07589 Change the Debug Menu string from Debug/Stop JS Remotely to Debug/Stop Remote JS
Summary:
Changed debug menu string as requested in: https://github.com/facebook/react-native/pull/5683 by ide and matthewwithanm

![image](https://cloud.githubusercontent.com/assets/14098140/14967128/ab9ca244-106a-11e6-9168-c8e36285dfb1.png)
Closes https://github.com/facebook/react-native/pull/7334

Differential Revision: D3256730

fb-gh-sync-id: 0265d684ef2e216956a0d0a1bdb5295c58126853
fbshipit-source-id: 0265d684ef2e216956a0d0a1bdb5295c58126853
2016-05-03 20:47:23 -07:00
Konstantin Raev 1fb8643cb6 Fixes NPE in setFontWeight method
Summary:
We have a crash in prod t11090540, urgent fix same way as in setFontStyle
Closes https://github.com/facebook/react-native/pull/7362

Reviewed By: foghina

Differential Revision: D3254158

Pulled By: dmmiller

fb-gh-sync-id: a497d0d4d0e4df9284e328ebb14fee74ba2f899b
fbshipit-source-id: a497d0d4d0e4df9284e328ebb14fee74ba2f899b
2016-05-03 14:38:18 -07:00
Dave Miller 20d53b1f23 Have Modal dismiss Dialog when the ReactInstance goes away
Reviewed By: angelahess

Differential Revision: D3252808

fb-gh-sync-id: 1f3085412f409581f161cf2151b251e818851d84
fbshipit-source-id: 1f3085412f409581f161cf2151b251e818851d84
2016-05-03 13:29:29 -07:00
Charles Dick 0a7a228fbb Fix crash in adsmanager login by nolonger assuming only one react context exists at once
Reviewed By: lexs

Differential Revision: D3252624

fb-gh-sync-id: e1d1c914be4e0caab953478f12441b440bd1f894
fbshipit-source-id: e1d1c914be4e0caab953478f12441b440bd1f894
2016-05-03 13:28:23 -07:00
Konstantin Raev 1b9b3ba58c Stabilise tests in SandCastle and prepare for OSS
Reviewed By: mkonicek

Differential Revision: D3244884

fb-gh-sync-id: d96dddca65175a90ee70aeb1c7530cea04860f61
fbshipit-source-id: d96dddca65175a90ee70aeb1c7530cea04860f61
2016-05-03 06:04:46 -07:00
Igor Avramovic 850ce649d4 Render top back and back button on search results
Differential Revision: D3238568

fb-gh-sync-id: d28eee4cefb88a4b43fd3c16357de3443aec6bc5
fbshipit-source-id: d28eee4cefb88a4b43fd3c16357de3443aec6bc5
2016-04-29 17:59:22 -07:00
Konstantin Raev 0c590b325d Revert "fix border style without borderRadius"
Summary:
Subj broke ObjC snapshot tests

This reverts commit 58876d5a03.
Closes https://github.com/facebook/react-native/pull/7303

Differential Revision: D3243670

fb-gh-sync-id: acef6bc7a50b0fa7dc112b88407644e8226d6f85
fbshipit-source-id: acef6bc7a50b0fa7dc112b88407644e8226d6f85
2016-04-29 16:37:23 -07:00
Sebastian Markbage 373537b281 Deprecate transformMatrix and decomposedMatrix
Summary:
transformMatrix only worked on iOS and there is an equivalent API that (mostly)
works cross platform.

decomposedMatrix could technically be passed on Android but it wasn't document and explicitly flagged as not working.

My goal is to deprecate both uses and then the only supported API is the `transform: [{ matrix: ... }]` form.

The only difference is that on Android the matrix gets decomposed.

Currently there is some special cased magic that renames transform -> transformMatrix or decomposedMatrix depending on platform.

https://github.com/facebook/react/blob/master/src/renderers/native/ReactNative/ReactNativeAttributePayload.js#L50

Therefore I'm adding an alias for both native platforms called just "transform".

Next I'll swap over the JS to always target the name "transform". The only difference is how the value is marshalled over the bridge in processTransform.

To do this, I have to clean up a few callers. Mostly that's just swapping to the new API.

For buildInterpolator this is a bit trickier but this fixes it for all our use cases (which is only the Navigator in AdsManager).

Reviewed By: vjeux

Differential Revision: D3239960

fb-gh-sync-id: 838edb6644c6cdd0716834f712042f226ff3136f
fbshipit-source-id: 838edb6644c6cdd0716834f712042f226ff3136f
2016-04-29 14:19:25 -07:00
Ronak Patel edf5d85be0 Passing current activity while creating react instance manager
Reviewed By: astreet

Differential Revision: D3236602

fb-gh-sync-id: efbac8f0d8c770f2edf6fb447498e650302d98c7
fbshipit-source-id: efbac8f0d8c770f2edf6fb447498e650302d98c7
2016-04-29 11:46:23 -07:00
Charles Dick 24b2990467 Capture heap from the dev menu
Reviewed By: foghina

Differential Revision: D3229856

fb-gh-sync-id: c6321cfb309c93572a51bba625d63246a75f0254
fbshipit-source-id: c6321cfb309c93572a51bba625d63246a75f0254
2016-04-29 07:35:22 -07:00
Konstantin Raev f99786cc89 Made SandCastle run the same Instrumentation Tests that are open sourced and are running on CI
Reviewed By: mkonicek

Differential Revision: D3229774

fb-gh-sync-id: 48239e8898eb011ad767bf102aa65025351363c6
fbshipit-source-id: 48239e8898eb011ad767bf102aa65025351363c6
2016-04-29 05:11:59 -07:00
Sokovikov 58876d5a03 fix border style without borderRadius
Summary:
closes #6721 closes #3159
before(without borderRadius)
![bug](https://cloud.githubusercontent.com/assets/1488195/14235087/fcf79f8a-f9eb-11e5-9d44-7ab1d131be24.jpg)

after
![fix](https://cloud.githubusercontent.com/assets/1488195/14235067/8cf128b4-f9eb-11e5-8170-ad3a146d6104.jpg)
Closes https://github.com/facebook/react-native/pull/6789

Differential Revision: D3240657

Pulled By: mkonicek

fb-gh-sync-id: 4eb8f72d7278d880297fb73653ef530719af3d5b
fbshipit-source-id: 4eb8f72d7278d880297fb73653ef530719af3d5b
2016-04-29 04:53:29 -07:00
Dave Miller 3a5457cd7c Add support for setChildren
Summary: This adds support for UIManager.setChildren on Android like D2757388 added for iOS.

Reviewed By: andreicoman11

Differential Revision: D3235369

fb-gh-sync-id: b538556ec4abdb606f9be26d1b74734046bca0cd
fbshipit-source-id: b538556ec4abdb606f9be26d1b74734046bca0cd
2016-04-29 04:03:24 -07:00
Kudo Chien 3f0207d7b5 Fix textShadowOffset error without width or height
Summary:
textShadowOffset design is `ReactPropTypes.shape({width: ReactPropTypes.number, height: ReactPropTypes.number})`, so either width or height is optional.
Unfortunately, in Android implementation, it is my bad not handling optional case and lead to an exception.
Thanks kohver for reporting [this issue](https://github.com/facebook/react-native/pull/4975#issuecomment-213006641)

**Test plan (required)**

*Before this fix*
1. Modify TextExample.android.js to `<Text style={{fontSize: 20, textShadowOffset: {height: 10}, textShadowRadius: 1, textShadowColor: '#00cccc'}}>` which really raise a redbox.

*After this fix*
1. Test original TextExample.android.js textShadowOffset works well.
2. Modify TextExample.android.js to `<Text style={{fontSize: 20, textShadowOffset: {height: 10}, textShadowRadius: 1, textShadowColor: '#00cccc'}}>` which works well without redbox.
Closes https://github.com/facebook/react-native/pull/7119

Differential Revision: D3240607

Pulled By: mkonicek

fb-gh-sync-id: b13221ae1586594890b0f4aa644ace7c0d5d6c58
fbshipit-source-id: b13221ae1586594890b0f4aa644ace7c0d5d6c58
2016-04-29 03:50:29 -07:00
Jesse Sessler 2bb1c263db Modal Animation Types
Summary:
Currently the Modal component uses the slide up / down animation for presenting and hiding the Modal with no options. This PR gives users a choice to use a fade in / out animation or the current slide animation (slide is the default). Android and iOS.

![](http://g.recordit.co/nfJSg487Ox.gif)  ![](http://g.recordit.co/QHGDuUFbPy.gif)

I've updated the UIExplorer and documentation.

![image](https://cloud.githubusercontent.com/assets/4265163/14743130/0bd8282c-086e-11e6-93eb-3d344431337d.png)

Thanks!
Closes https://github.com/facebook/react-native/pull/7156

Differential Revision: D3237809

Pulled By: javache

fb-gh-sync-id: 813e56ada8b19990dc5018527dc3a81b2c8b349a
fbshipit-source-id: 813e56ada8b19990dc5018527dc3a81b2c8b349a
2016-04-28 16:00:32 -07:00
Michael Ortiz 13acd7ed7e Reverted commit D3234404
Summary:
**Motivation**: Arc drawing has been broken on Android for some time. dgladkov submitted a PR, which ended up having a bug and was never merged. This PR should fix that bug as well as provide screenshots to prove it works.

**Reproducing the Bug:** dgladkov made a simple test app which helps to illustrate the bug. The repo can be found [here](https://github.com/dgladkov/RNArtArcDrawingBug). The demo app illustrates that on iOS, wedges are drawn correctly, but Android only draws full circles. [Direct Link to iOS Before](https://github.com/dgladkov/RNArtArcDrawingBug/blob/master/images/ios.png). [Direct Link to Android Before](https://github.com/dgladkov/RNArtArcDrawingBug/blob/master/images/android.png).

**Proof The Bug is Fixed:** [Here is a direct link to Android After pic.](http://i.imgur.com/9dTU2Xn.png) You can see the wedges match the iOS Before screenshot.

**What went wrong:** dgladkov's solution relied on Java's modulus, which in fact, implements modulus in a non-standard way. Modulus should a
Closes https://github.com/facebook/react-native/pull/7049

Differential Revision: D3234404

Pulled By: spicyj

fb-gh-sync-id: 6b85eb42389da6c344ec9723c7f81f61473246b0
fbshipit-source-id: 6b85eb42389da6c344ec9723c7f81f61473246b0
2016-04-28 15:48:26 -07:00
Bruno Barbieri 41e89b4129 fontFamily, fontStyle and fontWeight support for TextInput
Summary:
fontFamily, fontWeight and fontStyle properties are being ignored for TextInput.

There's an additional issue that happens when you add secureTextEntry={true}  it overrides the current font preferences (because it defaults to monospace) so we have to reapply it.
Master right now:

![screen shot 2016-03-21 at 6 21 05 pm](https://cloud.githubusercontent.com/assets/1247834/13936110/c25ffea8-ef91-11e5-8d71-1b0a55184e24.png)

Demo after the fix:

![5ux4bpjfwh](https://cloud.githubusercontent.com/assets/1247834/13935865/0f2ca8be-ef90-11e5-82c7-d5a2dd33b70e.gif)
Closes https://github.com/facebook/react-native/pull/6564

Differential Revision: D3081623

Pulled By: bestander

fb-gh-sync-id: 329cac6755b5a0dd549e546768f39efa7b7f4daa
fbshipit-source-id: 329cac6755b5a0dd549e546768f39efa7b7f4daa
2016-04-28 13:22:22 -07:00
Nathan Spaun 4e05d00f0d Prefetch images in Group mall and reactions icons
Reviewed By: ericvicenti

Differential Revision: D3227821

fb-gh-sync-id: b7a8c3e6e82604b98ec0d25eaab0c3b4c95bd683
fbshipit-source-id: b7a8c3e6e82604b98ec0d25eaab0c3b4c95bd683
2016-04-28 11:12:21 -07:00
Charles Dick f6d9a9097f Add heap snapshot to fbandroid JSC
Reviewed By: michalgr

Differential Revision: D3168026

fb-gh-sync-id: 123c9caa1ae7792cfa93590de4832b76c8178edb
fbshipit-source-id: 123c9caa1ae7792cfa93590de4832b76c8178edb
2016-04-28 05:31:19 -07:00
David Aurelio 8c1b773e4d Show columns in redboxes
Reviewed By: foghina

Differential Revision: D3229814

fb-gh-sync-id: 0e1c3692e0780287d5e31dbd24fa3145eb0882ec
fbshipit-source-id: 0e1c3692e0780287d5e31dbd24fa3145eb0882ec
2016-04-28 03:58:23 -07:00
Thomas Leplus f323b02eff Fix ClassCastException
Summary: Closes https://github.com/facebook/react-native/pull/7225

Differential Revision: D3234878

Pulled By: dmmiller

fb-gh-sync-id: 00f36f3c45e3492026729175e393812879149773
fbshipit-source-id: 00f36f3c45e3492026729175e393812879149773
2016-04-28 03:19:19 -07:00
Michael Ortiz 1af47603cf Fix ReactNativeART arc drawing on Android
Summary:
**Motivation**: Arc drawing has been broken on Android for some time. dgladkov submitted a PR, which ended up having a bug and was never merged. This PR should fix that bug as well as provide screenshots to prove it works.

**Reproducing the Bug:** dgladkov made a simple test app which helps to illustrate the bug. The repo can be found [here](https://github.com/dgladkov/RNArtArcDrawingBug). The demo app illustrates that on iOS, wedges are drawn correctly, but Android only draws full circles. [Direct Link to iOS Before](https://github.com/dgladkov/RNArtArcDrawingBug/blob/master/images/ios.png). [Direct Link to Android Before](https://github.com/dgladkov/RNArtArcDrawingBug/blob/master/images/android.png).

**Proof The Bug is Fixed:** [Here is a direct link to Android After pic.](http://i.imgur.com/9dTU2Xn.png) You can see the wedges match the iOS Before screenshot.

**What went wrong:** dgladkov's solution relied on Java's modulus, which in fact, implements modulus in a non-standard way. Modulus should a
Closes https://github.com/facebook/react-native/pull/7049

Differential Revision: D3234404

Pulled By: spicyj

fb-gh-sync-id: 4974b818dc49d9d16f2483c49b462c459a8bb479
fbshipit-source-id: 4974b818dc49d9d16f2483c49b462c459a8bb479
2016-04-27 22:18:27 -07:00
Dave Miller 57c40d9a6f Fix crash caused by accessibility being turned on and using a Modal
Summary: When the ModalHostView is added as a child of whatever view holds it, if accessibility is turned on, Android will walk up to the root and then walk all children of the child and verify that they are indeed children of the root.  Since ModalHostView actually adds its children to a new ReactDialogViewGroup which has the Dialog as a parent, there is a disagreement about the tree deep in the bowels of View when it performs that walk.  The trick is to stop from adding the children of the ModalHostView when walking for accessibility.  The accessibility of those children views are properly handled by the hosting Dialog.

Reviewed By: andreicoman11

Differential Revision: D3230033

fb-gh-sync-id: 1e5ac334c996b1d5f50c75ded60805d8b871477a
fbshipit-source-id: 1e5ac334c996b1d5f50c75ded60805d8b871477a
2016-04-27 10:16:25 -07:00
Andy Street 6a2603745e Fix build break of react native exopackage apps
Reviewed By: lexs

Differential Revision: D3229733

fb-gh-sync-id: e74a2d4fbbdf019f898f87a05bdbd31b4e233463
fbshipit-source-id: e74a2d4fbbdf019f898f87a05bdbd31b4e233463
2016-04-27 08:02:24 -07:00
Andy Street 50d8d46733 Add ability to expose sync hooks from Java to JS
Summary:
This only works for the new cxx bridge (hopefully open sourcing soon!).

This diff allows Java native modules to expose synchronous hooks to JS via the ReactSyncHook annotation. The methods will appear in JS on the native module object (e.g. you would do `require('UIManager').mySyncHook('foo');`) which allows us to enforce that required native modules are installed at build time. In order to support remote debugging, both the args and return type must be JSON serializable (so that we can go back across to the device to resolve synchronous hooks).

Follow ups will be integration tests, adding support for return types besides void, and adding support for remote debugging.

Reviewed By: mhorowitz

Differential Revision: D3218794

fb-gh-sync-id: 7e3366a8254276f5a55eb806287419287ca9182b
fbshipit-source-id: 7e3366a8254276f5a55eb806287419287ca9182b
2016-04-27 07:51:28 -07:00
Felix Oghina fb76154b42 handle null args array in proxy invocation handler
Reviewed By: astreet

Differential Revision: D3212837

fb-gh-sync-id: 1a66de68cc13758a41514e4bef6808b818b9682e
fbshipit-source-id: 1a66de68cc13758a41514e4bef6808b818b9682e
2016-04-27 02:28:19 -07:00
Pavlo Kushnir 036199d3f7 Use std::string in folly::dynamic
Reviewed By: joeg, snarkmaster

Differential Revision: D3189410

fb-gh-sync-id: 9bb9090ca6012ac32ba9fb79041b26ec4888781f
fbshipit-source-id: 9bb9090ca6012ac32ba9fb79041b26ec4888781f
2016-04-26 02:28:30 -07:00
Chris Hopman 860b7ddc35 Don't defer dispatching of events while paused
Reviewed By: astreet

Differential Revision: D3186718

fb-gh-sync-id: 888c6e0cc0b52edbbc6b9e0cb285ce1a2d1bf987
fbshipit-source-id: 888c6e0cc0b52edbbc6b9e0cb285ce1a2d1bf987
2016-04-25 12:47:21 -07:00
Dave Miller 8e7ea1179a Fix Popover location in Events
Reviewed By: andreicoman11

Differential Revision: D3219054

fb-gh-sync-id: cc25bd63be284ae7e8232652936a67fd792feabc
fbshipit-source-id: cc25bd63be284ae7e8232652936a67fd792feabc
2016-04-25 10:15:21 -07:00
Tadeu Zagallo c5307a6e7c Bringing fbsystrace to iOS 8's JSC
Reviewed By: michalgr

Differential Revision: D3163295

fb-gh-sync-id: 3cc2083accc4ba6947efc631f3574412022b1e1f
fbshipit-source-id: 3cc2083accc4ba6947efc631f3574412022b1e1f
2016-04-25 09:45:24 -07:00