Commit Graph

685 Commits

Author SHA1 Message Date
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
Jeff Chien 475f1b5796 Reverted commit D3126513
Summary:Using TouchableNativeFeedback has been a problem for me because the ripples it makes don't follow the child view's border radii so the ripples stick out of the child view's rounded corners. This PR should fix this problem with a minor caveat: this only works for TouchableNativeFeedback.Ripple and not TouchableNativeFeedback.SelectableBackground. I searched how I could apply corner radius to selectableItemBackground and it doesn't seem to be possible (the prevalent advice is to create the ripple manually which is equivalent to using TNF.Ripple in our case), though I could be wrong.

I added [an example to UIExplorer (TouchableExample)](http://i.imgur.com/CHY9xjW.png). This is my first PR to this repo so let me know if something's wrong. Cheers!
Closes https://github.com/facebook/react-native/pull/6515

Differential Revision: D3126513

Pulled By: AaaChiuuu

fb-gh-sync-id: 4a00e7177ee4ffd8dffeca143f4f43f08c99b5a1
fbshipit-source-id: 4a00e7177ee4ffd8dffeca143f4f43f08c99b5a1
2016-04-24 15:45:19 -07:00
Mike Grabowski 02578df4f7 Fallback for textAlign: justify
Summary:Fixes #5408 as per ide and vjeux suggestions here https://github.com/facebook/react-native/issues/529#issuecomment-107328799

Could've been probably done in a single `if` clause, but this is more explicit and leaves potential place for future implementation (if we ever decide to do so)
Closes https://github.com/facebook/react-native/pull/7197

Differential Revision: D3217740

Pulled By: vjeux

fb-gh-sync-id: aa08a5c42e43c1abe17b72a424ee96146f2667f6
fbshipit-source-id: aa08a5c42e43c1abe17b72a424ee96146f2667f6
2016-04-24 11:29:23 -07:00
Krzysztof Magiera dd244f5530 Support for Animated.interpolate
Summary:This change adds native animated support for Animated.interpolate

Animated.interpolate allows for defining nodes that outputs an interpolated value of their input node based on the interpolation node configuration. For now native animated implementation only supports a linear interpolation for a given input and output ranges (ranges can consists of multiple segments). Native interpolation node is compatible with the JS implementation with the exception that not all attributes that can be used in JS are supported. Before we migrate interpolation node from JS->native we verify that only supported props are used.

**Test Plan**
Run JS tests: `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js`
Run java tests: `buck test ReactAndroid/src/test/java/com/facebook/react/animated`
Closes https://github.com/facebook/react-native/pull/7141

Differential Revision: D3216546

fb-gh-sync-id: 29876e33956615c6370ca4d332abe048f8dba5b8
fbshipit-source-id: 29876e33956615c6370ca4d332abe048f8dba5b8
2016-04-23 02:37:28 -07:00
Rui Chen 862136a398 Revert the suspicious text input change for now
Reviewed By: nickholub

Differential Revision: D3213682

fb-gh-sync-id: 5b3090864c4c50f307de22493c9a7a8cb4687621
fbshipit-source-id: 5b3090864c4c50f307de22493c9a7a8cb4687621
2016-04-22 17:34:28 -07:00
Felix Oghina ed7d13bf57 Backed out D3190875
Reviewed By: astreet

Differential Revision: D3212319

fb-gh-sync-id: 2b93bf83c2e7f687ad1762a199c9a150862395ff
fbshipit-source-id: 2b93bf83c2e7f687ad1762a199c9a150862395ff
2016-04-22 11:24:40 -07:00
Jeff Chien e438954938 Modify TouchableNativeFeedback (Ripple) to follow borderRadius
Summary:Using TouchableNativeFeedback has been a problem for me because the ripples it makes don't follow the child view's border radii so the ripples stick out of the child view's rounded corners. This PR should fix this problem with a minor caveat: this only works for TouchableNativeFeedback.Ripple and not TouchableNativeFeedback.SelectableBackground. I searched how I could apply corner radius to selectableItemBackground and it doesn't seem to be possible (the prevalent advice is to create the ripple manually which is equivalent to using TNF.Ripple in our case), though I could be wrong.

I added [an example to UIExplorer (TouchableExample)](http://i.imgur.com/CHY9xjW.png). This is my first PR to this repo so let me know if something's wrong. Cheers!
Closes https://github.com/facebook/react-native/pull/6515

Differential Revision: D3126513

Pulled By: mkonicek

fb-gh-sync-id: 1d3e92243abf9706132ae47c485d9e04a9b47d81
fbshipit-source-id: 1d3e92243abf9706132ae47c485d9e04a9b47d81
2016-04-22 09:07:50 -07:00
Andrew Gray 774296b263 Implemented stopLoading
Summary:**Motivation:** In my app, I'm using a WebView that loads content from my mobile site.  What I want to do is when a user presses a link on the loaded page, I want to stop the WebView's request, hijack the URL and open the URL in a new WebView, pushed to the top of the navigator stack.  To me, this gives the overall app a more native feel, instead of implementing a rudimentary navbar on the main WebView to go back.

**Attempted Workarounds:** I've attempted to get similar functionality by capturing the onNavigationStateChange event in the WebView, and then within calling goBack + pushing the new view to the navigator stack.  From a functionality standpoint, this works.  However, from a UI standpoint, the user can clearly see the webview change states to a new page + go back before having the new view pushed on top of their nav stack.
Closes https://github.com/facebook/react-native/pull/6886

Differential Revision: D3212447

Pulled By: mkonicek

fb-gh-sync-id: 05911e583d9ba54ddbd54a772153c80ed227731e
fbshipit-source-id: 05911e583d9ba54ddbd54a772153c80ed227731e
2016-04-22 08:15:25 -07:00
Dan Caspi fcac6e081d Support for WITH_JSC_MEMORY_PRESSURE in iOS 8's JSC.
Reviewed By: lexs

Differential Revision: D3162471

fb-gh-sync-id: 1fb1584ccfa507c5697958ce8837f637fa8a301c
fbshipit-source-id: 1fb1584ccfa507c5697958ce8837f637fa8a301c
2016-04-22 00:45:25 -07:00
Krzysztof Magiera cd11738819 Support for stopping animations that run on UI thread.
Summary:This change extends animated native module API with `stopAnimation` method that is responsible for interrupting actively running animation as a reslut of a JS call. In order for the `stopAnimation` to understand `animationId` argument I also had to add `animationId` to `startAnimation` method. As JS thread runs in parallel to the thread which executes the animation there is a chance that JS may call `stopAnimation` after the animation has finished. Because of that we are not doing any checks on the `animationId` parameter passed to `stopAnimation` in native and if the animation does not exists in the registry we ignore that call.

**Test Plan**
Run JS tests: `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js`
Run java tests: `buck test ReactAndroid/src/test/java/com/facebook/react/animated`
Closes https://github.com/facebook/react-native/pull/7058

Differential Revision: D3211906

fb-gh-sync-id: 3761509651de36a550b00d33e2a631c379d3900f
fbshipit-source-id: 3761509651de36a550b00d33e2a631c379d3900f
2016-04-22 00:02:25 -07:00
Angela Hess 5a93877673 Add ability to disable scroll on android ViewPager
Summary: Similar to ScrollView, adds ability to set scrollEnabled={false}, which prevents dragging. Paging is still possible by updating initialPage.

Reviewed By: AaaChiuuu

Differential Revision: D3209743

fb-gh-sync-id: ce4140323a03f2257a9bb310c7285418b01abae7
fbshipit-source-id: ce4140323a03f2257a9bb310c7285418b01abae7
2016-04-21 19:43:27 -07:00
Dan Caspi c6c72ddad4 Set RNFeed to use iOS 8's JSC. Working but missing features.
Reviewed By: lexs

Differential Revision: D3162414

fb-gh-sync-id: d7eb65969486eddd623501e5eaa07f957088a846
fbshipit-source-id: d7eb65969486eddd623501e5eaa07f957088a846
2016-04-21 19:00:30 -07:00
Spencer Ahrens 47dff23fe4 Change "Hide/Show" Inspector to "Toggle"
Summary:The JS and native state can get out of sync if you reload JS while inspecting, so don't even bother trying on
native.

Reviewed By: lexs

Differential Revision: D3203020

fb-gh-sync-id: a3b7294bb0c28c0508f508be53d3ef895a7195b0
fbshipit-source-id: a3b7294bb0c28c0508f508be53d3ef895a7195b0
2016-04-21 16:57:20 -07:00
Martin Konicek bc32e06e56 Add an option to load the Boost library from the filesystem
Summary:Building React Native for Android from source the first time is quite slow. A large part of the time is spent downloading the Boost C++ library. If the code is already present on the system, there's no need to download it.
**Test plan**

CircleCI tests on this pull request. The env variable is not defined on CircleCI so this pull request should have no effect.
Closes https://github.com/facebook/react-native/pull/7116

Differential Revision: D3207397

Pulled By: mkonicek

fb-gh-sync-id: 3454947f6c90fda0d8d2cbb17a1af518e45b47fd
fbshipit-source-id: 3454947f6c90fda0d8d2cbb17a1af518e45b47fd
2016-04-21 06:48:22 -07:00
Horcrux 4e5c85b6bb [ART]fix stroke bug
Summary:Fix a stroke bug.
Stroke path will be coverd by fill layer.
Fix it by stroke path after fill is done
Closes https://github.com/facebook/react-native/pull/7092

Differential Revision: D3203188

Pulled By: spicyj

fb-gh-sync-id: 9b950372822da4dc520552c0c31aa3435750a0a3
fbshipit-source-id: 9b950372822da4dc520552c0c31aa3435750a0a3
2016-04-20 12:50:29 -07:00
Philipp von Weitershausen ed930b4710 Add support for sending binary data in websockets
Summary:This is a reprise of #6327, but with iOS 7.0 compatibility and less `package.json` changes.

**Test Plan:** Load WebSocketExample in UIExplorer app and start websocket test server script (both provided in #6889) and test sending binary data on both iOS and Android
Closes https://github.com/facebook/react-native/pull/6961

Differential Revision: D3202022

Pulled By: mkonicek

fb-gh-sync-id: 38843d0a9c0172971c5c70a5139ded04042b280a
fbshipit-source-id: 38843d0a9c0172971c5c70a5139ded04042b280a
2016-04-20 08:53:25 -07:00
Krzysztof Magiera ec5dfbf8c7 Support for Animated.multiply node
Summary:This change adds native animated support for Animated.multiply nodes.

Animated.multiply allows for defining nodes that would output a product of values of the input nodes.

**Test Plan**
Run JS tests: `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js`
Run java tests: `buck test ReactAndroid/src/test/java/com/facebook/react/animated`
Closes https://github.com/facebook/react-native/pull/7071

Differential Revision: D3197663

fb-gh-sync-id: 35f64244a2482c487a81e5e7cd08f3c0e56d9b78
fbshipit-source-id: 35f64244a2482c487a81e5e7cd08f3c0e56d9b78
2016-04-19 13:20:20 -07:00
Krzysztof Magiera b5375bdc09 Support for Animated.add
Summary:This change adds suport native animated support for Animated.add.

Animated.add lets you declare node that outputs a sum of it input nodes.

**Test Plan**
Play with the following playground app: https://gist.github.com/39de37faf07480fcd7d1
Run JS tests: `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js`
Run java tests: `buck test ReactAndroid/src/test/java/com/facebook/react/animated`
Closes https://github.com/facebook/react-native/pull/6641

Differential Revision: D3195963

fb-gh-sync-id: bb1e1a36821a0e071ad0e7d0fa99ce0d6b088b0a
fbshipit-source-id: bb1e1a36821a0e071ad0e7d0fa99ce0d6b088b0a
2016-04-19 02:58:21 -07:00
TETRA2000 978fa488ec add space between words
Summary: Closes https://github.com/facebook/react-native/pull/7045

Differential Revision: D3194558

fb-gh-sync-id: 57691d4d54bbe2bdce6abf885b6aa0f341f12644
fbshipit-source-id: 57691d4d54bbe2bdce6abf885b6aa0f341f12644
2016-04-18 18:29:23 -07:00
Micha? Gregorczyk fd35ddcc65 Store lock file in persistent directory.
Reviewed By: tadeuzagallo

Differential Revision: D3190827

fb-gh-sync-id: 42dd65bccd7c248989475f68c81061079e3601a4
fbshipit-source-id: 42dd65bccd7c248989475f68c81061079e3601a4
2016-04-18 11:45:39 -07:00
Philipp von Weitershausen 20cae51a8f Add support for receiving binary type data (ArrayBuffer)
Summary:This brings the same functionality that's already present on iOS, introduced in #4483, to Android: convert binary payloads to base64 strings and send them to JS land that way, where they'll be turned into an ArrayBuffer.

**Test Plan:** Used test server from #6889 (in `--binary` mode) to send some binary data to the Android UIExplorer example (also from #6889). Verified it's received correctly as `ArrayBuffer`.
Closes https://github.com/facebook/react-native/pull/6868

Differential Revision: D3184797

Pulled By: mkonicek

fb-gh-sync-id: e78c640c43b3e41a75ddba79acc04e5eaab5667d
fbshipit-source-id: e78c640c43b3e41a75ddba79acc04e5eaab5667d
2016-04-18 11:12:28 -07:00
Felix Oghina a3ef44b4ba throw IllegalArgumentException instead of AssertionError when JS module is not found
Reviewed By: astreet

Differential Revision: D3190875

fb-gh-sync-id: ac34872d8d36247a8bb28bdfbf985ebcdadd4e33
fbshipit-source-id: ac34872d8d36247a8bb28bdfbf985ebcdadd4e33
2016-04-18 10:01:19 -07:00
hi大头鬼hi 42cfba558f fix typo
Summary:Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

(You can skip this if you're fixing a typo or adding an app to the Showcase.)

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).

fix typo in comment
Closes https://github.com/facebook/react-native/pull/7027

Differential Revision: D3190693

Pulled By: dmmiller

fb-gh-sync-id: fe1eddaeb13deac6f93da7ec600c267df2599586
fbshipit-source-id: fe1eddaeb13deac6f93da7ec600c267df2599586
2016-04-18 03:55:19 -07:00
grgmo d09cd62011 Add support for ontimeout and onerror handler when using XMLHttpRequest for Android and iOS
Summary:Currently React-Native does not have `ontimeout` and `onerror` handlers for [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest). This is an extension to [No timeout on XMLHttpRequest](https://github.com/facebook/react-native/issues/4648).

With addition to two handlers, both Android and iOS can now handle `ontimeout` if request times out and `onerror` when there is general network error.

**Test plan**

Code has been tested on both Android and iOS with [Charles](https://www.charlesproxy.com/) by setting a breakpoint on the request which fires `ontimeout` when the request waits beyond `timeout` time and `onerror` when there is network error.

**Usage**

JavaScript -

```
var request = new XMLHttpRequest();

function onLoad() {
    console.log(request.status);
};

function onTimeout() {
    console.log('Timeout');
};

function onError() {
    console.log('General network error');
};

request.onload = onLoad;
request.ontimeout = onTimeout;
request.onerr
Closes https://github.com/facebook/react-native/pull/6841

Differential Revision: D3178859

Pulled By: lexs

fb-gh-sync-id: 30674570653e92ab5f7e74bd925dd5640fc862b6
fbshipit-source-id: 30674570653e92ab5f7e74bd925dd5640fc862b6
2016-04-15 05:17:21 -07:00
Gaëtan Renaudeau fffcb9c88a Fix ImageEditingManager when no external cache
Summary:`externalCacheDir == null && externalCacheDir == null` is obviously a typo in existing code.
Closes https://github.com/facebook/react-native/pull/6429

Differential Revision: D3184362

fb-gh-sync-id: 1cd966ed96414348c4319d44679d2c912df6cc93
fbshipit-source-id: 1cd966ed96414348c4319d44679d2c912df6cc93
2016-04-15 04:51:25 -07:00
Konstantin Raev b2ecc83ead fixed test dependency broken in D3168150
Summary:fixes Circle
Closes https://github.com/facebook/react-native/pull/6978

Differential Revision: D3179133

fb-gh-sync-id: 6558168735b4097a68bf7423a7c249a45cc2684a
fbshipit-source-id: 6558168735b4097a68bf7423a7c249a45cc2684a
2016-04-14 07:50:22 -07:00