Commit Graph

645 Commits

Author SHA1 Message Date
Andy Street d3b8846400 Easy: Add Java module and method name to systrace in xplat bridge
Summary: We lost java module and method names in systrace when we moved to the xplat bridge.

Reviewed By: mhorowitz

Differential Revision: D3116042

fb-gh-sync-id: a61181f4d6be04c70122b7f79d426e364df1e988
fbshipit-source-id: a61181f4d6be04c70122b7f79d426e364df1e988
2016-03-30 12:53:36 -07:00
Sokovikov e20e8a3cc8 Add support for vibration patterns
Summary:and "not supported" warnings for ios
Closes https://github.com/facebook/react-native/pull/6400

Differential Revision: D3113988

fb-gh-sync-id: 169623f157ec59c38b4368cbc668c85201b67ed8
fbshipit-source-id: 169623f157ec59c38b4368cbc668c85201b67ed8
2016-03-29 21:45:20 -07:00
Martin Bigio e54876dbd0 Fix duplicated buck dependency
Summary: Closes https://github.com/facebook/react-native/pull/6657

Differential Revision: D3098193

Pulled By: martinbigio

fb-gh-sync-id: 535cba9767494b886c03a1d67e71f4ebb3eb48f7
fbshipit-source-id: 535cba9767494b886c03a1d67e71f4ebb3eb48f7
2016-03-25 09:42:23 -07:00
Mart?n Bigio 5e559f85a0 Use `baseTransformer` for Instagram's bundle
Reviewed By: sam-swarr

Differential Revision: D3089888

fb-gh-sync-id: 61779538cd11cc0b62e851f7dd10a1d2ed4f07a3
fbshipit-source-id: 61779538cd11cc0b62e851f7dd10a1d2ed4f07a3
2016-03-25 07:56:26 -07:00
Marc Horowitz 18badf1c3e Move CREATE_CATALYST_INSTANCE_END marker inside JSCExecutor
Reviewed By: AaaChiuuu

Differential Revision: D3096157

fb-gh-sync-id: 6bcca134e5e7a426719816047ffc98a5178e9596
shipit-source-id: 6bcca134e5e7a426719816047ffc98a5178e9596
2016-03-24 19:42:28 -07:00
Satyajit Sahoo 6c22a2174e Fix fetching sourcemap in genymotion. Fixes #5338
Summary:Source maps are broken on Genymotion right now as they aren't being loaded from the correct URL. refer - https://github.com/facebook/react-native/issues/5338#issuecomment-188232402

**Test plan**

Build and install UIExplorer from master branch in genymotion and enable hot reload. When you change a file and save it, you'll see a Yellow box due to source map fetching failed, as per the referenced comment.

Doing the same for this branch doesn't produce any yellow boxes.
Closes https://github.com/facebook/react-native/pull/6594

Differential Revision: D3088218

Pulled By: martinbigio

fb-gh-sync-id: 0d1c19cc263de5c6c62061c399eef33fa4ac4a7b
shipit-source-id: 0d1c19cc263de5c6c62061c399eef33fa4ac4a7b
2016-03-24 12:06:45 -07:00
Konstantin Raev aec90bb46b Version release script
Summary:npm-publish.js is not cohesive enough: besides building and publishing it also modifies some files.

It is better to have a separate script that will bump versions, make a commit and tag it.

scripts/bump-oss-version.js does exactly that.

This simplifies release process and allows manual release to npm if CI is not available.
Closes https://github.com/facebook/react-native/pull/6625

Differential Revision: D3092849

fb-gh-sync-id: 92cf38bd3df31c8c9c433fc5f9e15c129855fe0e
shipit-source-id: 92cf38bd3df31c8c9c433fc5f9e15c129855fe0e
2016-03-24 08:41:24 -07:00
Dmitry Gladkov 393890e00f Don't strip NativeRunnable constructor. Fixes #6624
Summary:Fixes proguard in RN 0.22.+. Closes #6624
Closes https://github.com/facebook/react-native/pull/6626

Differential Revision: D3092892

fb-gh-sync-id: 3aaf97c6f1c7b5d575cb912196b43955d9ef10fb
shipit-source-id: 3aaf97c6f1c7b5d575cb912196b43955d9ef10fb
2016-03-24 08:17:21 -07:00
Krzysztof Magiera 65ccdffc8d Execute Animated.js declarative animation on UIThread on Android.
Summary:This is the first from the series of PRs I'm going to be sending shorty that would let Animated.js animations to run off the JS thread (for Android only).

This PR introduce a new native module that will be used for offloading animations - NativeAnimatedModule. It has a simple API that allows for animated nodes management via methods like: create/drop animated node, connect/disconnect nodes, start animation of a value node, attach/detach animated from a native view.

Similarly to how we handle UIManager view hierarchy updates we create a queue of animated graph operations that are then executed on the UI thread. This isolates us from problems that may be caused by concurrent updates of animated graph while UI thread is "executing" the animation.

The most important class NativeAnimatedNodesManager.java implements a management interface for animated nodes graph as well as implements a graph traversal algorithm that is run for each animation frame. For each animation frame we visit animated nodes th
Closes https://github.com/facebook/react-native/pull/6466

Differential Revision: D3092739

Pulled By: astreet

fb-gh-sync-id: 665b49900b7367c91a93b9d8864f78fb90bb36ba
shipit-source-id: 665b49900b7367c91a93b9d8864f78fb90bb36ba
2016-03-24 06:19:27 -07:00
Saurabh Aggarwal 3c488afb0f Remove stetho dependency in OSS react native's NetworkingModule
Reviewed By: astreet

Differential Revision: D3038280

fb-gh-sync-id: 169e21b9276f928b7144ebf2f3b8487b5e87c073
shipit-source-id: 169e21b9276f928b7144ebf2f3b8487b5e87c073
2016-03-23 12:41:24 -07:00
Dave Miller e8e31823b9 Fix the clip rect computation for removeClippedSubviews
Summary: The computation for calculateClippingRect didn't work if you had a horizontal scroll nested in a vertical scroll view.  The fix is to simplify the logic to first intersect the inner view within its parent and then apply transforms (translation by top/left and scroll offset).  That now provides the correct clipping rectangle for nested views.

Reviewed By: astreet

Differential Revision: D3087367

fb-gh-sync-id: efdd430e024c4599189ddb8dbb258fd2b118690f
shipit-source-id: efdd430e024c4599189ddb8dbb258fd2b118690f
2016-03-23 12:28:27 -07:00
Martin Konicek 85197a0326 Add Modal to the main Java package
Reviewed By: dmmiller

Differential Revision: D3087508

fb-gh-sync-id: 066b8c4102f9669ed58e6cda1b0013e74a3627f8
shipit-source-id: 066b8c4102f9669ed58e6cda1b0013e74a3627f8
2016-03-23 09:38:26 -07:00
David Aurelio 83fb122406 Add Random Access Module file names to stack traces
Summary: Adds support to generate stack traces that can be used with source maps that have a `x_facebook_offsets` field. If a file name of a stack frame contains only digits and ends with “.js”, it is included in the trace format generated by `ExceptionsManagerModule`

Reviewed By: martinbigio

Differential Revision: D3072953

fb-gh-sync-id: 69a57e3e2c758034939e5264008871f38f48a78f
shipit-source-id: 69a57e3e2c758034939e5264008871f38f48a78f
2016-03-22 15:22:23 -07:00
Spencer Ahrens 1f94a00785 Add JS Minify option to settings in Android
Summary: Useful for debugging minification issues and more representative perf testing.

Differential Revision: D3080489

fb-gh-sync-id: 315f696d3847a213eb95f247f409173a01864567
shipit-source-id: 315f696d3847a213eb95f247f409173a01864567
2016-03-21 21:12:23 -07:00
Fada Chen e3fe66acfc Backed out D3073724, revert changes in master only
Reviewed By: zjj010104

Differential Revision: D3076377

fb-gh-sync-id: da9ca730904c2d520c5c0619b68f3ebee2c74f02
shipit-source-id: da9ca730904c2d520c5c0619b68f3ebee2c74f02
2016-03-21 19:32:26 -07:00
DengYun 90aa7b951d Fix #5599: toast doesn't disappear after app exited.
Summary:Run `Toast.makeText` other than UI Thread will cause bug #5599 : toast doesn't disappear after app exited.

use `UiThreadUtil.runOnUiThread` to fix this.
Closes https://github.com/facebook/react-native/pull/6443

Differential Revision: D3047261

fb-gh-sync-id: 0096879f2a4b4d76bda996a32089f068ae68e3f3
shipit-source-id: 0096879f2a4b4d76bda996a32089f068ae68e3f3
2016-03-21 17:43:23 -07:00
Dave Miller dfce55a034 Fix Modal on Android
Summary: When I first did Modal on Android, I incorrectly set the styleWidth and styleHeight on the ModalHostShadowNode.  This corresponded to RCTModalHostView in Modal.js.  This node is actually really just a dummy node in the tree.  The proper node to set the width and height on is the inner <View/> that has top and left position set on it.  This updates the code to set the width and height on that inner node.

Reviewed By: mkonicek

Differential Revision: D3077415

fb-gh-sync-id: e9aee0a21333ed0b5bdde11f453381b0a13470c9
shipit-source-id: e9aee0a21333ed0b5bdde11f453381b0a13470c9
2016-03-21 14:35:27 -07:00
Fada Chen 4d39b1d6b5 Backed out D3073723, revert changes in master only
Reviewed By: kirwan

Differential Revision: D3076395

fb-gh-sync-id: 573462a5cb0898ca69824fd44b4e26ca15ddcbeb
shipit-source-id: 573462a5cb0898ca69824fd44b4e26ca15ddcbeb
2016-03-21 14:33:31 -07:00
Satyajit Sahoo 97a97b3c11 Tweak error message for HMR
Summary:The error messages are iOS specific right now. This PR improves them to include the Android bits also.

![screenshot_20160322-000431](https://cloud.githubusercontent.com/assets/1174278/13929839/2bccce5e-efc2-11e5-9db3-f72dcf486412.png)
Closes https://github.com/facebook/react-native/pull/6546

Differential Revision: D3077815

Pulled By: martinbigio

fb-gh-sync-id: 344430d350023e78bd5fdae923eb4b6ce2924be5
shipit-source-id: 344430d350023e78bd5fdae923eb4b6ce2924be5
2016-03-21 14:08:26 -07:00
Bruno Barbieri 2a2ba4bd6b color support for TextInput secureTextEntry={true}
Summary:Color property is ignored for TextInput with secureTextEntry={true} on Android.

This is coming  from #6540 and being split into 2 PRs by suggestion of dmmiller.
As he mentioned does almost the same  except it #6064 doesn't handle null case.

Working example:

![scn949wlce](https://cloud.githubusercontent.com/assets/1247834/13929873/b700d650-ef72-11e5-9d67-0a7e0385bc2a.gif)
Closes https://github.com/facebook/react-native/pull/6563

Differential Revision: D3077583

Pulled By: mkonicek

fb-gh-sync-id: f0761346b77060abf17f1d4573b375adebc5c607
shipit-source-id: f0761346b77060abf17f1d4573b375adebc5c607
2016-03-21 13:48:23 -07:00
Kevin McCray b7ae7d0b4e ReactNative: fix clang errors
Differential Revision: D3068705

fb-gh-sync-id: 83fcbf0105310f99a4f65f566df77a6014873686
shipit-source-id: 83fcbf0105310f99a4f65f566df77a6014873686
2016-03-21 09:47:27 -07:00
Brent Vatne 03619daf04 Align inline images to baseline by default on Android
Summary:Full discussion in FB group: https://www.facebook.com/groups/reactnativeoss/permalink/1532669803696315/

**Test plan**

In the following examples I use a different image than the one built in to UIExplorer because this one better demonstrates the alignment:

![before](https://cloud.githubusercontent.com/assets/90494/13887933/c183e60e-ecfb-11e5-98cb-9c6d0104bb23.png)

![after](https://cloud.githubusercontent.com/assets/90494/13887937/c896eb76-ecfb-11e5-88fa-979a1ba62714.png)

![ios](https://cloud.githubusercontent.com/assets/90494/13888029/40b1f3ee-ecfc-11e5-9d71-1cfdf8213ec8.png)

If you want to try this for yourself, you can copy this into the inline image example:

```javascript
<Text style={{fontSize: 20}}>
  This text contains an inline image, look at it! <Image source={{uri: 'https://d3fzfeknznuaac.cloudfront.net/images4/open_list_plus_grey@2x.png'}} style={{height: 15, width: 15}} />. Neat, huh?
</Text>
```
Closes https://github.com/facebook/react-native/pull/6528

Differential Revision: D3075801

Pulled By: foghina

fb-gh-sync-id: afbe5873d865cd1fa90f7713563539ad22633879
shipit-source-id: afbe5873d865cd1fa90f7713563539ad22633879
2016-03-21 06:27:23 -07:00
Janic Duplessis 61483aa15d Add support for elevation in DrawerLayoutAndroid
Summary:It didn't work for a few reason. First, the drawer view NEEDS to have a background color or no shadow will ever render. Second, we need to use the `setDrawerElevation` method instead of `setElevation` for DrawerLayout. Finally we need to actually pass the style value (maybe we could just pass elevation but I don't really think it can cause any issues) down to the native component as it is not the case at the moment.

I also added a default style to elevation of 16 which is the standard for material design according to https://www.google.com/design/spec/patterns/navigation-drawer.html#navigation-drawer-specs. I could also default it to 0 so it keeps the same appearance as before but I think it looks better this way.

Closes #6022
**Test plan**
Tested using the DrawerLayout in the UIExplorer app.

Before, elevation 0
<img width="420" alt="screen shot 2016-02-23 at 1 55 42 am" src="https://cloud.githubusercontent.com/assets/2677334/13244000/008afdb2-d9d1-11e5-95b8-9c345ea0ea8d.png">

After, elevation
Closes https://github.com/facebook/react-native/pull/6100

Reviewed By: bestander

Differential Revision: D3012242

Pulled By: lexs

fb-gh-sync-id: 4967d7ec920f0229d823032ba95c8a3cace329c6
shipit-source-id: 4967d7ec920f0229d823032ba95c8a3cace329c6
2016-03-21 06:24:33 -07:00
Petr Glotov a95d9dc0ad fixed webview events package path
Summary:This PR makes package paths consistent with file paths.
Closes https://github.com/facebook/react-native/pull/6516

Differential Revision: D3075201

Pulled By: mkonicek

fb-gh-sync-id: a23a20f27427f28ac8a7e4f36387feb8a7409067
shipit-source-id: a23a20f27427f28ac8a7e4f36387feb8a7409067
2016-03-20 17:52:20 -07:00
Fada Chen 1ab2d85a15 Backed out D3019076
Reviewed By: zjj010104

Differential Revision: D3073723

fb-gh-sync-id: 229946ca4cd98488f8fa4d908412baebbc41d549
shipit-source-id: 229946ca4cd98488f8fa4d908412baebbc41d549
2016-03-20 13:03:24 -07:00
Fada Chen 630c142d81 Backed out D3019087
Reviewed By: zjj010104

Differential Revision: D3073724

fb-gh-sync-id: cd97477c9405f1ec048ba3dcdfd4280f77b631d2
shipit-source-id: cd97477c9405f1ec048ba3dcdfd4280f77b631d2
2016-03-20 12:59:20 -07:00
Alon Schwarz fb8340d289 Add center ImageResizeMode option
Summary:Adds a `center` option to `Image`'s `resizeMode` prop, which doesn't enlarge images.
This is how it looks in UIExplorer:
{F60386921}

Reviewed By: dmmiller

Differential Revision: D3064284

fb-gh-sync-id: 79cd2da8f44c5b3da2e42d3bebf3131335f53c28
shipit-source-id: 79cd2da8f44c5b3da2e42d3bebf3131335f53c28
2016-03-19 11:25:24 -07:00
Konstantin Raev da5596c97d fixed flow error on Travis
Summary: Closes https://github.com/facebook/react-native/pull/6530

Differential Revision: D3071277

fb-gh-sync-id: e2cfd2d2a8cbf5a862dcdb79fe834b1fdbcba107
shipit-source-id: e2cfd2d2a8cbf5a862dcdb79fe834b1fdbcba107
2016-03-19 02:15:24 -07:00
Dan Caspi 22e55d4396 Adding Pre-PArsing cache & StringRef to iOS 8's JSC
Reviewed By: michalgr

Differential Revision: D3066370

fb-gh-sync-id: 2dabffbd41d4f4f9f2a9ddaca3224ba00498821e
shipit-source-id: 2dabffbd41d4f4f9f2a9ddaca3224ba00498821e
2016-03-18 12:21:33 -07:00
Marc Horowitz 0cb7d16ab4 Race condition fix in refactored bridge code
Differential Revision: D3065139

fb-gh-sync-id: 820c97f9d0200c2290727a1467837af0ca6ded41
shipit-source-id: 820c97f9d0200c2290727a1467837af0ca6ded41
2016-03-18 11:21:21 -07:00
Michael Lee e4eb84fa70 Upgrade folly dependency
Summary: Folly deprecated the brace initialization for dynamic::array, so point to a more recent tarball and fix it.

Reviewed By: bestander

Differential Revision: D3066402

fb-gh-sync-id: aaf70423886cb0cbc14aba7878a1d4e32bce82b1
shipit-source-id: aaf70423886cb0cbc14aba7878a1d4e32bce82b1
2016-03-18 10:34:26 -07:00
Dave Miller db7a154360 Open source Modal
Summary: This open sources an internal Modal View

Reviewed By: mkonicek

Differential Revision: D3065229

fb-gh-sync-id: 763996aef375883d94f70e617bfc7835a9cecb6f
shipit-source-id: 763996aef375883d94f70e617bfc7835a9cecb6f
2016-03-18 04:21:48 -07:00
Janic Duplessis c76523f1ad Fix text input scroll when status bar is translucent
Summary:Changed the implementation of `setTranslucent` because the old one used the view flag SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN which has the sad side effect of making the ScrollViews not adjust properly when the keyboard is opened. Instead I use `setOnApplyWindowInsetsListener` to hook in the insets calculation process and consume the top offset so the decor view doesn't add top padding for the status bar.

I also limited the translucent prop to API 21+ because `setOnApplyWindowInsetsListener` is not available before that and anyway the translucent prop is only useful with a semi-transparent status bar color which only works on API 21+.

**Test plan**
Reproduced the bug using this code in UIExplorer.
https://gist.github.com/janicduplessis/217b9994e35f960a1793

Tapping a text field that would be hidden by the soft keyboard should scroll the view so it is not hidden.

Also tested that setting the translucent prop on and off still works as before.

Fixes #6455
Closes https://github.com/facebook/react-native/pull/6481

Differential Revision: D3067199

Pulled By: mkonicek

fb-gh-sync-id: aa115f8688ac7e461e62c18ebb8ab77350d000f8
shipit-source-id: aa115f8688ac7e461e62c18ebb8ab77350d000f8
2016-03-17 17:00:29 -07:00
Janic Duplessis 18f38ecdc0 Add StatusBar height constant and improve implementation
Summary:This adds a `HEIGHT` constant on `StatusBar` on Android. I needed only this for now but I will work on a better status bar dimensions API later (see TODO).

It also improves the implementation to fix a bug that happened when multiple `StatusBar` components get updated in the same frame as well as remove useless calls to the `StatusBarModule` when values did not change.

Instead of calling the `StatusBarManager` immediately when the component gets updated and relying on the order of the calls that get dispatched to native we now wait at the end of the frame to send the calls to the `StatusBarManager` using `setImmediate`. To make this work properly we need to change the data structure of the props stack a little bit to store the desired transition/animation too for each value.

Finally this updates the example to only show the ones that work for the current platform.

**Test plan**
In the UIExplorer Example, in the 'StatusBar dimensions' section it should show 25 for the height of the status bar.
A
Closes https://github.com/facebook/react-native/pull/6195

Differential Revision: D3017559

fb-gh-sync-id: d6f4c6a72a2dfde83496ecc0f56dca4abaf3055e
shipit-source-id: d6f4c6a72a2dfde83496ecc0f56dca4abaf3055e
2016-03-17 16:54:26 -07:00
Alexander Blom d329570ac8 Get rid of jackson (mostly)
Reviewed By: astreet

Differential Revision: D3041362

fb-gh-sync-id: a7027a08a63730b98dc766b86921820fa3624953
shipit-source-id: a7027a08a63730b98dc766b86921820fa3624953
2016-03-17 11:55:28 -07:00
Thomas Beverley 0be6031bc6 Added mediaPlaybackRequiresUserAction to WebView
Summary:Just added a pass through to the `WebView` for `mediaPlaybackRequiresUserAction` and `setMediaPlaybackRequiresUserGesture` to allow auto-playing audio and video elements
Closes https://github.com/facebook/react-native/pull/5956

Differential Revision: D3053554

Pulled By: mkonicek

fb-gh-sync-id: a1f362c1551de1a0218f5d23c70668e4c8078993
shipit-source-id: a1f362c1551de1a0218f5d23c70668e4c8078993
2016-03-16 10:03:26 -07:00
Alexander Andersson 09820cbe36 GeoLocation timeout never called on android
Summary:Don't add systems current time to the `timeout` option. This is already correct on iOS.
Closes https://github.com/facebook/react-native/pull/6376

Differential Revision: D3053728

Pulled By: mkonicek

fb-gh-sync-id: 919068659d0d23906d8a6d85df7819296460b719
shipit-source-id: 919068659d0d23906d8a6d85df7819296460b719
2016-03-15 11:55:32 -07:00
Kevin Stumpf 3e760f48c5 Android support for perspective transform
Summary:- Motivation: ["Perspective" Transform](https://facebook.github.io/react-native/docs/transforms.html#proptypes) was so far supported only on iOS
- Closes #2915
- Test Plan: I built a [react-native-flip-view](https://github.com/DispatcherInc/react-native-flip-view) and ensured that the same perspective transform results in the same camera perspective on both iOS and Android:

![image](https://cloud.githubusercontent.com/assets/7293984/13342624/6556cfe0-dbf8-11e5-8fb2-05554a5081b7.png)

![image](https://cloud.githubusercontent.com/assets/7293984/13342677/daf90560-dbf8-11e5-9941-2ae0f9f9d99b.png)
Closes https://github.com/facebook/react-native/pull/6159

Differential Revision: D3053532

Pulled By: mkonicek

fb-gh-sync-id: a39a9fbafe0fc7c648fdafc2eb69f651fe58d9fb
shipit-source-id: a39a9fbafe0fc7c648fdafc2eb69f651fe58d9fb
2016-03-15 11:52:22 -07:00
Alexey Dodonov cc2068e201 Backed out changeset 183744d2415b
Reviewed By: nicklockwood

Differential Revision: D3053067

fb-gh-sync-id: de20718b5bf82eae433637847143e32b7a4bb216
shipit-source-id: de20718b5bf82eae433637847143e32b7a4bb216
2016-03-15 11:49:28 -07:00
David Aurelio d0cdabc73e Don't prepend the asset name string with "file://" for unbundles
Summary: D2922108 / PR #5814 broke the “Unbundle” loader by prepending the file path to the entry file with "file://". This converts it back.

Reviewed By: lexs

Differential Revision: D3052749

fb-gh-sync-id: 0b241c50e25f1a1c85265915bee01582d0ba7ac6
shipit-source-id: 0b241c50e25f1a1c85265915bee01582d0ba7ac6
2016-03-15 08:12:29 -07:00
Dave Miller 39fdce259d Refactor JS touch dispatch from ReactRootView
Reviewed By: andreicoman11

Differential Revision: D3035589

fb-gh-sync-id: a4af7b0be89e5ea13367481697ff4b3dda8536b1
shipit-source-id: a4af7b0be89e5ea13367481697ff4b3dda8536b1
2016-03-15 07:29:30 -07:00
Christopher Dro e674e45c2e Reverted commit D3040735
Summary:This is a follow up of 9b87e6c860.

- Allows custom headers on connection request
- Adds a default `origin` header to Android, just like iOS

**Introduces no breaking changes.**

I was working on something similar and would like to propose a few changes that make the API more consistent across both iOS and Android platforms and brings this closer to [spec](https://tools.ietf.org/html/rfc6455).

I believe aprock first implementation of adding custom `headers` was correct. It makes sense naming this argument `headers` since we have no other general options available, and the current `options` field is being used to pass in a header anyway.

My use case for custom headers was attaching a token to the `Authorization` header on the connection request. I have been testing this by passing a JWT inside the `Authorization` header and verifying it on the server before establishing a connection.
Closes https://github.com/facebook/react-native/pull/6016

Differential Revision: D3040735

fb-gh-sync-id: 183744d2415b895f9d9fd8ecf6023a546e18a546
shipit-source-id: 183744d2415b895f9d9fd8ecf6023a546e18a546
2016-03-15 07:20:26 -07:00
Christopher Dro 205b5d4732 Update options parameter to headers. Update to spec.
Summary:This is a follow up of 9b87e6c860.

- Allows custom headers on connection request
- Adds a default `origin` header to Android, just like iOS

**Introduces no breaking changes.**

I was working on something similar and would like to propose a few changes that make the API more consistent across both iOS and Android platforms and brings this closer to [spec](https://tools.ietf.org/html/rfc6455).

I believe aprock first implementation of adding custom `headers` was correct. It makes sense naming this argument `headers` since we have no other general options available, and the current `options` field is being used to pass in a header anyway.

My use case for custom headers was attaching a token to the `Authorization` header on the connection request. I have been testing this by passing a JWT inside the `Authorization` header and verifying it on the server before establishing a connection.
Closes https://github.com/facebook/react-native/pull/6016

Differential Revision: D3040735

Pulled By: nicklockwood

fb-gh-sync-id: f81bd14ccbdba36309b9d4b4850fb66fe4deae11
shipit-source-id: f81bd14ccbdba36309b9d4b4850fb66fe4deae11
2016-03-15 05:14:21 -07:00
Zen Xu e1e86a1174 Remove okhttp from release build for Instagram
Reviewed By: hendritan

Differential Revision: D3044625

fb-gh-sync-id: 0ae66187d9fe3d59b002f603fc73c0758640e287
shipit-source-id: 0ae66187d9fe3d59b002f603fc73c0758640e287
2016-03-14 16:14:25 -07:00
Chris Hopman 872b697730 Add support for multiple js contexts
Reviewed By: mhorowitz

Differential Revision: D3035333

fb-gh-sync-id: f829702992cd717acd1eb105b3dcc8abdbc6dc74
shipit-source-id: f829702992cd717acd1eb105b3dcc8abdbc6dc74
2016-03-14 11:38:57 -07:00
Aaron Chiu b006f79bf5 make Activity reference in ReactContext WeakReference
Reviewed By: andreicoman11

Differential Revision: D3040724

fb-gh-sync-id: fef5a84907d22d07ae1df82f5d1071c8fae45420
shipit-source-id: fef5a84907d22d07ae1df82f5d1071c8fae45420
2016-03-14 07:51:26 -07:00
Chris Hopman 9acf7417a8 Port some minor changes to the old bridge
Reviewed By: mhorowitz, astreet

Differential Revision: D3024252

fb-gh-sync-id: 3ea28f793d920d74caab9b8c1487957e89ea23b3
shipit-source-id: 3ea28f793d920d74caab9b8c1487957e89ea23b3
2016-03-11 09:30:23 -08:00
farwayer 8aa83a2d93 Fix setting android toolbar images after null them
Summary:fix #6374
Closes https://github.com/facebook/react-native/pull/6392

Differential Revision: D3041076

Pulled By: mkonicek

fb-gh-sync-id: 39efbc62c1cd352b54f062d8530a26f7630bf51f
shipit-source-id: 39efbc62c1cd352b54f062d8530a26f7630bf51f
2016-03-11 08:07:32 -08:00
Denis Koroskin c42fc61a2a Fix RCTText crashing when negative width is passed to measure
Reviewed By: sriramramani

Differential Revision: D3038767

fb-gh-sync-id: ad3fde7cf4b73aad786bdf1dc3cea24862d656b8
shipit-source-id: ad3fde7cf4b73aad786bdf1dc3cea24862d656b8
2016-03-10 17:19:22 -08:00
Dan Caspi c304364af4 Improvements to the preparsing cache
Reviewed By: michalgr

Differential Revision: D3005912

fb-gh-sync-id: 3ab1f804e6203807a5d9f35e5560e847a9830cd6
shipit-source-id: 3ab1f804e6203807a5d9f35e5560e847a9830cd6
2016-03-10 10:31:48 -08:00
Charles Dick 13c49e2006 Fix null deref in RN timer code
Reviewed By: astreet

Differential Revision: D3029772

fb-gh-sync-id: 0af13208659093b14013c0ee3c00b2438fadca9c
shipit-source-id: 0af13208659093b14013c0ee3c00b2438fadca9c
2016-03-10 07:22:26 -08:00
Chris Hopman e9c79f85ba Initialize glog in react native
Reviewed By: andreicoman11

Differential Revision: D3023912

fb-gh-sync-id: 0f240448f465fd0ad629c239f45a24f01af4dc1b
shipit-source-id: 0f240448f465fd0ad629c239f45a24f01af4dc1b
2016-03-10 06:02:21 -08:00
Alexander Andersson d20bde3f2e Add missing textAlignVertical support on android textview
Summary:Add missing implementation of `textAlignVertical` style prop for `Text`-component.
According to the [docs](https://facebook.github.io/react-native/docs/text.html#style) it should be implemented but was only added for `TextInput` in f453e14c8f.
Closes https://github.com/facebook/react-native/pull/6105

Differential Revision: D3029783

Pulled By: dmmiller

fb-gh-sync-id: 29bcd50a7280c890707f811bcfc7a3d5c5be5142
shipit-source-id: 29bcd50a7280c890707f811bcfc7a3d5c5be5142
2016-03-10 03:02:26 -08:00
Andrei Coman f5a349021d Fix event dispatcher timestamp sorting bug
Summary:Turns out even using nanoseconds as timestamps will not guarantee that events
won't happen at the same time. This fixes sorting for event comparison.

Differential Revision: D3030540

fb-gh-sync-id: 2630c50ea60a792ea07b1bf1c6cd46a6d9859268
shipit-source-id: 2630c50ea60a792ea07b1bf1c6cd46a6d9859268
2016-03-09 12:41:28 -08:00
Michael Lee ab4c73c30c Compensate for different versions of folly for open source build
Summary: ReactAndroid will need to use the deprecated version of folly::dynamic for the time being.

Reviewed By: bestander

Differential Revision: D3025433

fb-gh-sync-id: fee6beb65d5d0c449f1a08a0d3c593b788905001
shipit-source-id: fee6beb65d5d0c449f1a08a0d3c593b788905001
2016-03-08 13:17:21 -08:00
Corentin Smith 2070efa019 Convert Image resizeMode `contain` to FIT_CENTER
Summary:Convert from `CENTER_INSIDE` to `FIT_CENTER`.
The difference between those is that `CENTER_INSIDE` will not upscale if the image is too small.
See the Fresco docs: http://frescolib.org/javadoc/reference/com/facebook/drawee/drawable/ScalingUtils.ScaleType.html

Original issue: https://github.com/facebook/react-native/issues/4031
Closes https://github.com/facebook/react-native/pull/5738

Differential Revision: D2959473

Pulled By: mkonicek

fb-gh-sync-id: 8f76944e53b3d56fec0dc7303db339a71d0c389e
shipit-source-id: 8f76944e53b3d56fec0dc7303db339a71d0c389e
2016-03-08 12:12:34 -08:00
Michael Lee accccd8e55 Remove use of deprecated folly::dynamic initialization
Reviewed By: ot

Differential Revision: D3021659

fb-gh-sync-id: 1ba5e2fcc5b30ce4b6174fb911608236c1c3084b
shipit-source-id: 1ba5e2fcc5b30ce4b6174fb911608236c1c3084b
2016-03-08 10:44:33 -08:00
Michał Gregorczyk 6e3710f36b Make js perf API available to js
Reviewed By: tadeuzagallo

Differential Revision: D3011680

fb-gh-sync-id: 051864689af0b9041318cc314d339ae841fe35aa
shipit-source-id: 051864689af0b9041318cc314d339ae841fe35aa
2016-03-08 10:16:24 -08:00
Denis Koroskin aae521f57e Add ReactCompoundViewGroup interface that allows having both virtual and non-virtual (View) children
Summary: In React, ReactCompoundView is supposed to be implemented by a View, but there is no ViewGroup counterpart that allows mixing virual nodes and non-virtual ones (Views) in the same parent. This is needed because TouchTargetHelper always considers child Views when looking for touch target before falling back to View/ReactCompoundView. This works incorrectly for e.g. layout-only / flattened nodes. ReactCompoundViewGroup allow intercepting touch event before it is dispatched to its children. In that sense, ReactCompoundView.reactTagForTouch() is like View.onTouchEvent() whereas ReactCompoundViewGroup.interceptsTouchEvent() is like ViewGroup.onInterceptTouchEvent().

Differential Revision: D3018028

fb-gh-sync-id: d2c70a55afb9ce9823275e7483d72e0ebedf52e4
shipit-source-id: d2c70a55afb9ce9823275e7483d72e0ebedf52e4
2016-03-07 20:07:24 -08:00
Fada Chen 33e9e34648 Backed out changeset D3012925
Differential Revision: D3019076

fb-gh-sync-id: 201895cd5555845c8a7aa3c0b0f4d0a012912144
shipit-source-id: 201895cd5555845c8a7aa3c0b0f4d0a012912144
2016-03-07 12:26:25 -08:00
Fada Chen f885f5335c Backed out D3012969
Differential Revision: D3019087

fb-gh-sync-id: 8f137351d1fd89b71260b73b2f8daefb6f00127a
shipit-source-id: 8f137351d1fd89b71260b73b2f8daefb6f00127a
2016-03-07 11:28:21 -08:00
Fada Chen 4130f11b9d revert D2839551
Reviewed By: zjj010104

Differential Revision: D3012925

fb-gh-sync-id: b8db55a6ceaf7280ee6330776b80807565d83a09
shipit-source-id: b8db55a6ceaf7280ee6330776b80807565d83a09
2016-03-06 13:33:27 -08:00
Fada Chen fedca59bd0 revert D2971596
Reviewed By: zjj010104

Differential Revision: D3012969

fb-gh-sync-id: 8997a6167398715f8f78724a43a449da4079cc7e
shipit-source-id: 8997a6167398715f8f78724a43a449da4079cc7e
2016-03-06 13:31:24 -08:00
Martín Bigio cde58a61aa Rename dev menu option to Hot Reloading on boths ios and android
Reviewed By: sam-swarr

Differential Revision: D3013121

fb-gh-sync-id: 4fc5ff73425c1d896bc4fb0085d39b5eef7e0e94
shipit-source-id: 4fc5ff73425c1d896bc4fb0085d39b5eef7e0e94
2016-03-06 10:12:25 -08:00
Aaron Chiu ae11449516 in ReactContext, de-reference the Activity in onPause() instead of onHostDestroy()
Reviewed By: andreicoman11

Differential Revision: D3004340

fb-gh-sync-id: a408cb64565e18069a291b415b1ad9d429ba8f45
shipit-source-id: a408cb64565e18069a291b415b1ad9d429ba8f45
2016-03-05 20:31:22 -08:00
Kevin Stumpf a6a89fe4e0 Fix IllegalStateException crash in WebSocketModule.java
Summary:- Motivation: The WebSocket implementation on Android crashes the app when an attempt is made to write on a web socket that was closed due to a spotty connection. We found this issue by using Pusher, which is built on WebSockets. The following stack trace reveals that the WebSocketModule doesn't catch the case of a closed connection, when a consumer attempts to write:
```sh
Fatal Exception: java.lang.IllegalStateException: closed
       at com.squareup.okhttp.internal.ws.RealWebSocket.sendMessage(RealWebSocket.java:109)
       at com.facebook.react.modules.websocket.WebSocketModule.send(WebSocketModule.java:176)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:249)
       at com.facebook.react.bridge.NativeModuleRegistry$ModuleDefinition.call(NativeModuleRegistry.java:158)
       at com.facebook.react.bridge.NativeModuleRegistry.call(NativeModuleReg
Closes https://github.com/facebook/react-native/pull/6301

Differential Revision: D3016099

fb-gh-sync-id: 838dd9d2e5e5b7a4e2242fa6de5658dfdaf24f55
shipit-source-id: 838dd9d2e5e5b7a4e2242fa6de5658dfdaf24f55
2016-03-05 00:43:53 -08:00
Ahmed El-Helw 21b7bf4728 Fix commit order of operations in Nodes
Summary: Split dispatchViewUpdates into two methods, which enables subclasses to commit pending ui operations, even when no root node is present.

Differential Revision: D3011191

fb-gh-sync-id: a3491179441223aeffe21ff483dda582053768e7
shipit-source-id: a3491179441223aeffe21ff483dda582053768e7
2016-03-04 16:21:50 -08:00
Alexander Blom ea882b6f16 Immediate dispatch 0 time timers
Summary: Calling setTimeout(f, 0) will currently schedule f to be called the next frame instead of immediately (which is how it behaves on iOS). This immediately calls back to JS and invokes the function.

Reviewed By: astreet, tadeuzagallo

Differential Revision: D3006125

fb-gh-sync-id: 9fa109ed82836a718cbb2e8cb21da4943d96f5f6
shipit-source-id: 9fa109ed82836a718cbb2e8cb21da4943d96f5f6
2016-03-04 09:31:23 -08:00
Andy Street 9199c721de WebWorker: Allow worker script to be loaded from the network in debug builds
Summary:Making buck rebundle the worker script on every JS change is insanely slow. This allows the script to be downloaded for debug builds.

The plan is to couple this with an implementation of `require.resolve` which will automatically insert the correct packager network path in DEV builds and the correct local path in release builds.

e.g.

  var worker = new Worker(require.resolve('WebWorkerSample_getPrimesBetween.js'));

Reviewed By: lexs

Differential Revision: D2939279

fb-gh-sync-id: fbf64bbf1df1649b44e4b98ac504d095c10104a6
shipit-source-id: fbf64bbf1df1649b44e4b98ac504d095c10104a6
2016-03-04 07:34:26 -08:00
Andy Street e64987d780 Fix deadlock in bridge
Summary:There was a deadlock in the bridge if a native module tried to dispatch an event through EventDispatcher (that thread would hold the mTeardownLock and want the mEventStaging lock) at the same time the EventDispatcher callback was triggered and tried to dispatch a call through JS (that thread would hold the mEventStaging lock and want the mTeardownLock).

Now there are two locks (lol). In the scenario above, the native module would hold the mJSToJavaTeardownLock and want the mEventStaging lock, while the EventDispatcher callback would hold the mEventStaging lock and want the mJavaToJSTeardownLock.

Reviewed By: lexs

Differential Revision: D3011526

fb-gh-sync-id: c3ebd5c14a6370d73caebf6c99fcba18a86c6ac1
shipit-source-id: c3ebd5c14a6370d73caebf6c99fcba18a86c6ac1
2016-03-04 05:55:27 -08:00
Andy Street 1b4c23e001 WebWorkers: Update WebWorker sample to use networking/timers
Summary: Updates the sample to use native modules.

Differential Revision: D2932319

fb-gh-sync-id: 9dc12789839ec2d65e98205508d958d0c8c5b46e
shipit-source-id: 9dc12789839ec2d65e98205508d958d0c8c5b46e
2016-03-03 13:34:30 -08:00
Felix Oghina 2e4bb5364d destroy react instance on background critical memory pressure
Reviewed By: astreet

Differential Revision: D2989125

fb-gh-sync-id: 0e441409d6b0ea7d5ff6a037730cc1c36818a2da
shipit-source-id: 0e441409d6b0ea7d5ff6a037730cc1c36818a2da
2016-03-03 11:13:39 -08:00
Felix Oghina 4b52d185ac support simulating critical memory pressure, even when activity is destroyed
Reviewed By: lexs

Differential Revision: D2989094

fb-gh-sync-id: 17bbcac390ab1a3a745f1e85f7cb23d1dcf7043b
shipit-source-id: 17bbcac390ab1a3a745f1e85f7cb23d1dcf7043b
2016-03-03 11:13:34 -08:00
Felix Oghina c027f05ef4 add generic memory pressure listener interface
Reviewed By: lexs

Differential Revision: D2989071

fb-gh-sync-id: 375c7551bd4b281096850732432f016c2684add0
shipit-source-id: 375c7551bd4b281096850732432f016c2684add0
2016-03-03 11:13:28 -08:00
Andy Street 9a3f11d3e7 WebWorkers: Convert NetworkingModule to support web workers
Summary: Converts NetworkingModule to dispatch callbacks to the appropriate ExecutionContext.

Reviewed By: lexs

Differential Revision: D2932170

fb-gh-sync-id: ac77eec1a176ede4d2257bfd8ddb13153331c8a4
shipit-source-id: ac77eec1a176ede4d2257bfd8ddb13153331c8a4
2016-03-03 11:07:32 -08:00
Andy Street e4766b7979 WebWorkers: Update Timing module to support web workers
Summary: Example of a conversion to web worker support using the ExecutionContext API changes made in the last set of web worker diffs. WebWorkerSample now creates timers to show that we can dispatch timer calls to multiple JS contexts.

Reviewed By: lexs

Differential Revision: D2928657

fb-gh-sync-id: 17c5f8cd7c63624da43383da7c4160dc48482fe5
shipit-source-id: 17c5f8cd7c63624da43383da7c4160dc48482fe5
2016-03-03 08:51:33 -08:00
Andy Street 7fb33032f6 Copy weak reference to callback object when dispatching calls to Java
Summary: The bridge could be destructed, meaning we can't try to resolve member variables of PlatformBridgeCallback.

Reviewed By: lexs

Differential Revision: D3005994

fb-gh-sync-id: f83de432148ce62fd1060c6b84ec39ad2fa10a55
shipit-source-id: f83de432148ce62fd1060c6b84ec39ad2fa10a55
2016-03-03 07:52:30 -08:00
Konstantin Raev 32dd1fe35a fixed instrumentation tests crashes in emulator
Summary:Improving CircleCI stability running tests
Closes https://github.com/facebook/react-native/pull/6270

Differential Revision: D3005903

fb-gh-sync-id: 3421546a19b20db5485b3f816e2c6008e8121749
shipit-source-id: 3421546a19b20db5485b3f816e2c6008e8121749
2016-03-03 07:30:35 -08:00
Andy Street 6d5f9ddfff WebWorkers: Allow native modules to be notified when executors are unregistered
Summary: This will allow them to clean up resources when a web worker goes away.

Reviewed By: mhorowitz, lexs

Differential Revision: D2994721

fb-gh-sync-id: c7ca1afc7290e85038cf692a139f6478dba0ef61
shipit-source-id: c7ca1afc7290e85038cf692a139f6478dba0ef61
2016-03-03 04:10:39 -08:00
Sokovikov 1bab7c5182 vibration module
Summary:I will fix other notes from https://github.com/facebook/react-native/pull/2794 if I get positive feedback.
Closes https://github.com/facebook/react-native/pull/6061

Reviewed By: nicklockwood

Differential Revision: D2982173

Pulled By: dmmiller

fb-gh-sync-id: d1e9407798b0293b090897a10996085b0f0c1b3e
shipit-source-id: d1e9407798b0293b090897a10996085b0f0c1b3e
2016-03-03 04:08:31 -08:00
Dan Caspi d2d00e0fcd Adding GC Timer Sweeping to Android
Reviewed By: mhahnenberg

Differential Revision: D2972822

fb-gh-sync-id: b0ed28c26e3f1141c798d9d107d9e198611f9dce
shipit-source-id: b0ed28c26e3f1141c798d9d107d9e198611f9dce
2016-03-03 04:05:59 -08:00
Michał Gregorczyk 5a6a94b05a sync fbjni
Differential Revision: D2990551

fb-gh-sync-id: 587f2b5cd09295dc1829926c12e38f2880440a5e
shipit-source-id: 587f2b5cd09295dc1829926c12e38f2880440a5e
2016-03-02 07:24:40 -08:00
Michał Gregorczyk 5df3eeb723 Force 16 byte stack alignment on JNI method invocations on x86
Reviewed By: dcolascione

Differential Revision: D2989293

fb-gh-sync-id: 9140ced55ef0b8a73fdc03a6d307af87cd2335ef
shipit-source-id: 9140ced55ef0b8a73fdc03a6d307af87cd2335ef
2016-03-02 07:24:35 -08:00
AbilashK ab12189f87 Enable blurOnSubmit for text input in android
Summary:PR for https://github.com/facebook/react-native/issues/6098, Added tests to UIExplorer based on existing iOS example.

Before:
![blur_true](https://cloud.githubusercontent.com/assets/11550281/13401854/cd66117a-df33-11e5-875d-e1f132e2fc82.gif)

After:
![blur_false](https://cloud.githubusercontent.com/assets/11550281/13401874/de1dd1ce-df33-11e5-8210-e6bee80240fb.gif)
Closes https://github.com/facebook/react-native/pull/6215

Differential Revision: D3000042

Pulled By: mkonicek

fb-gh-sync-id: 7f01270580b198498505d92e38a456c0b3a01488
shipit-source-id: 7f01270580b198498505d92e38a456c0b3a01488
2016-03-02 07:07:32 -08:00
Konstantin Raev f827f7b79a instrumentation tests are executed with BUCK
Summary:Added ability to run instrumentation tests with BUCK.

This change uses BUCK to build and run instrumentation tests facebook style.
The gains are that we can execute the same tests internally at FB and in OSS.
Also running tests not via graddle:connect command is 1.5 minutes faster.

I'll keep keep an eye on stability Gradle and BUCK builds for a while.
Closes https://github.com/facebook/react-native/pull/6176

Differential Revision: D2999878

Pulled By: bestander

fb-gh-sync-id: d715ba231769e57100685a1256f2e530c589921c
shipit-source-id: d715ba231769e57100685a1256f2e530c589921c
2016-03-02 06:55:35 -08:00
Konstantin Raev 00178b7b36 Added prebuilt folder with BUCK files to support BUCK run of ReactAndroid in OSS
This is a manualt sync of a folder from fbsource that was previously in ignored list
2016-03-02 11:09:31 +00:00
Andy Street bd95b22844 WebWorkers: Add ExecutorToken to route native module calls to/from workers
Summary:To support native modules in web workers, native modules need to have an notion of the JS executor/thread that called into them in order to respond via Callback or JS module call to the right executor on the right thread.

ExecutorToken is an object that only serves as a token that can be used to identify an executor/message queue thread in the bridge. It doesn't expose any methods. Native modules Callback objects automatically have this ExecutionContext attached -- JSModule calls for modules that support workers will need to supply an appropriate ExecutorToken when retrieving the JSModule implementation from the ReactContext.

Reviewed By: mhorowitz

Differential Revision: D2965458

fb-gh-sync-id: 6e354d4df8536d40b12d02bd055f6d06b4ca595d
shipit-source-id: 6e354d4df8536d40b12d02bd055f6d06b4ca595d
2016-03-01 07:57:35 -08:00
Andy Street 58f86b2d91 Don't execute things that may throw in Bridge/JSCExecutor dtors
Summary:In testing, I've found that there's no good way to return stack traces to the server for exceptions that happen in dtor's. If the dtor is not marked nothrow(false), the exceptions are uncatchable (and bubble up as a std::abort without exception info) and if annotated properly, the program instead crashes trying to resume the stack, again a std::abort without exception info.

Instead, I created a separate destroy method that can be called (and protected via fbjni) to make the dtor's no longer execute code that may throw. Note that we don't really expect the code that was previously in ~JSCExecutor() to throw, but it was in production and we had absolutely no info to help debug it.

Reviewed By: mhorowitz

Differential Revision: D2989999

fb-gh-sync-id: 4cf9de5e0592fe6830a9903375363a78e1339a94
shipit-source-id: 4cf9de5e0592fe6830a9903375363a78e1339a94
2016-03-01 04:26:35 -08:00
Ahmed El-Helw 9be1216c7f Minor code improvements for RCTTextInput
Summary: Expose hasUnseenUpdates in ReactShadowNode. Various text input cleanup and fixes.

Differential Revision: D2975870

fb-gh-sync-id: 26c4c0d36e82aaa025b4760603cc48c47ebf46a3
shipit-source-id: 26c4c0d36e82aaa025b4760603cc48c47ebf46a3
2016-02-29 16:43:32 -08:00
Chris Hopman e55cefc476 Add log message to bridge init
Reviewed By: mhorowitz

Differential Revision: D2983352

fb-gh-sync-id: d87fcb7d7728115ae45cdb6f061fa094da7dfba8
shipit-source-id: d87fcb7d7728115ae45cdb6f061fa094da7dfba8
2016-02-29 12:49:01 -08:00
Andy Street f99579adaa Try/catch exceptions in JSCExecutor for debugging crash
Reviewed By: lexs

Differential Revision: D2982534

fb-gh-sync-id: 4eda4116cd60e2e46771ecddefc1d27eee761762
shipit-source-id: 4eda4116cd60e2e46771ecddefc1d27eee761762
2016-02-26 10:58:29 -08:00
Andy Street f420f811c5 Revert D2982150: Revert D2926896 WebWorkers: Move web worker impl to JSCExecutor
Reviewed By: lexs

Differential Revision: D2982364

fb-gh-sync-id: 25f099377acca75298768072d38d77dcb9c1bff3
shipit-source-id: 25f099377acca75298768072d38d77dcb9c1bff3
2016-02-26 08:43:36 -08:00
Dave Miller 9edfd945d1 Fix minor code nit from D2977441
Reviewed By: andreicoman11

Differential Revision: D2982182

fb-gh-sync-id: dba3c6ea0dfbd375e3c27d3ad2ba3481d05e06e8
shipit-source-id: dba3c6ea0dfbd375e3c27d3ad2ba3481d05e06e8
2016-02-26 06:46:35 -08:00
Felix Oghina 9baef48498 decouple textview from fresco
Reviewed By: andreicoman11

Differential Revision: D2960626

fb-gh-sync-id: c03aa7f16cdea795cefe39da2c5d660ae6278a37
shipit-source-id: c03aa7f16cdea795cefe39da2c5d660ae6278a37
2016-02-26 06:16:49 -08:00
Andy Street c32e5fd84f Revert D2926896 WebWorkers: Move web worker impl to JSCExecutor
Reviewed By: lexs

Differential Revision: D2982150

fb-gh-sync-id: c75d05988df50b9788608e7c1bf00c4952ccfce1
shipit-source-id: c75d05988df50b9788608e7c1bf00c4952ccfce1
2016-02-26 05:56:36 -08:00
Andrei Coman d032cc967d Pass jsc config to JSC
Reviewed By: astreet

Differential Revision: D2965497

fb-gh-sync-id: 1aef5a1f2d7ccb8de8ca403e51ebcf247bd6b034
shipit-source-id: 1aef5a1f2d7ccb8de8ca403e51ebcf247bd6b034
2016-02-26 03:24:36 -08:00
Dave Miller 542432fc3e Launch a new task if openURL is called with a url in a different package
Summary: Change the default handling of openURL to attach the NEW_TASK flag if the package we will be launching is different than the currently running package.

Reviewed By: foghina

Differential Revision: D2977441

fb-gh-sync-id: 01d1ac1d791345f815bfc9e8358bce6420c08c1b
shipit-source-id: 01d1ac1d791345f815bfc9e8358bce6420c08c1b
2016-02-26 03:12:32 -08:00
Matthew Denner b860897cd5 Restore canvas once group has been drawn
Summary:The implementation of ARTGroupShadowNode saved the canvas and then drew the child nodes but did not reset the canvas afterwards, unlike the behaviour of the other ART shadow nodes.  Because of this the matrix operations were compounded for sibling nodes in the surface.

As an example the following code should draw a green circle in the bottom right corner of the surface and a red circle in the top left, which it does on iOS; on Android you'll find that the red circle is drawn in the bottom right corner instead.

```
'use strict';
import React, {
  AppRegistry,
  Component,
  StyleSheet,
  View,
} from 'react-native';

const { Surface, Group, Shape } = React.ART;

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#808080',
  },
  surface: {
    backgroundColor: '#ffffff'
  },
});

class ARTGroupBug extends Component {
  render() {
    return (
      <View style={styles.container}>
        <
Closes https://github.com/facebook/react-native/pull/5619

Differential Revision: D2981865

Pulled By: spicyj

fb-gh-sync-id: 95ca701354fe728ed6ee78f8c02d1e1eb70c181e
shipit-source-id: 95ca701354fe728ed6ee78f8c02d1e1eb70c181e
2016-02-26 00:42:33 -08:00
AbilashK 8b88cae747 Fix android's image tintColor prop when used with alpha
Summary:Fixes https://github.com/facebook/react-native/issues/6075
UIExplorer example has been tested with 4 levels of opacity(100,75,50,25)

![selection_029](https://cloud.githubusercontent.com/assets/11550281/13228124/31c85dcc-d9c0-11e5-90e3-3938e155d5a2.png)
Closes https://github.com/facebook/react-native/pull/6090

Differential Revision: D2979913

Pulled By: mkonicek

fb-gh-sync-id: ff30dec853935a059979096d9b1da9088d146249
shipit-source-id: ff30dec853935a059979096d9b1da9088d146249
2016-02-25 17:16:02 -08:00
Konstantin Raev 5112a63953 Added ability to run Movies app with BUCK
Reviewed By: mkonicek

Differential Revision: D2874873

fb-gh-sync-id: 9feface8d9a18742e68206dbafb804de25f53ed8
shipit-source-id: 9feface8d9a18742e68206dbafb804de25f53ed8
2016-02-25 17:15:58 -08:00