Commit Graph

1685 Commits

Author SHA1 Message Date
Eric Vicenti 9ca853d4d1 NavigationExperimental: Fix missed renaming of setTiming to applyAnimation
Summary:f2483eb1ee (diff-0d0be087e61cb933286a7cc733767cbeR106)

approve2ship

Reviewed By: hedgerwang

Differential Revision: D3034798

fb-gh-sync-id: 74d0688f935bc324791cf43b15c0106f3c4dd703
shipit-source-id: 74d0688f935bc324791cf43b15c0106f3c4dd703
2016-03-10 11:34:26 -08:00
Eric Vicenti 30166c52cb NavigationExperimental: Avoid double push on double-tap in UIExplorer
Reviewed By: javache

Differential Revision: D3033918

fb-gh-sync-id: 9085db138754f1aa557f0190456529e5e71ac27b
shipit-source-id: 9085db138754f1aa557f0190456529e5e71ac27b
2016-03-10 11:16:33 -08:00
Nick Lockwood 520ad05ba0 Removed unnecessary exportedConstants
Summary: The exportedConstants method incurrs a penalty at bridge startup time for every module that implements it. This diff removes exportedConstants from a few modules that don't really need to use it.

Reviewed By: majak

Differential Revision: D2982341

fb-gh-sync-id: be016187d7b731a073311daacfcf88a0402e1688
shipit-source-id: be016187d7b731a073311daacfcf88a0402e1688
2016-03-10 10:21:34 -08:00
Ken Wheeler ec9efb8a01 Updating AppState to support the inactive state.
Summary:**Motivation**

AppStateIOS never currently returns `inactive` as a possible state. I had a requirement that when inactive, certain portions of the app should be blacked out in accordance with compliance rules. This is not possible currently, due to `inactive` never being returned. This PR fixes that.

**Test plan**

All base tests are passing. Are there AppState specific tests in place at the moment that I'm missing?

**Demonstration**

![appstate](https://cloud.githubusercontent.com/assets/286616/13640546/1cb6eeb0-e5e3-11e5-8d64-332ea3383a54.gif)
Closes https://github.com/facebook/react-native/pull/6379

Differential Revision: D3035530

Pulled By: nicklockwood

fb-gh-sync-id: 93deccc8184816809926dca8a95f2bebd1434987
shipit-source-id: 93deccc8184816809926dca8a95f2bebd1434987
2016-03-10 08:30:24 -08:00
sunnylqm 20cd7ac339 add hyphen on drawerLockMode values
Summary: Closes https://github.com/facebook/react-native/pull/6396

Differential Revision: D3034612

Pulled By: nicklockwood

fb-gh-sync-id: cd20d405b7064e167b895411decedfae215f3b8b
shipit-source-id: cd20d405b7064e167b895411decedfae215f3b8b
2016-03-10 08:24:23 -08:00
Spencer Ahrens f21da3aa31 <Incremental> for incremental rendering
Summary:Everything wrapped in `<Incremental>` is rendered sequentially via `InteractionManager`.
The `onDone` callback is called when all descendent incremental components have
finished rendering, used by `<IncrementalPresenter>` to make the story visible all at once
instead of the parts popping in randomly.

This includes an example that demonstrates streaming rendering and the use of
`<IncrementalPresenter>`.  Pressing down pauses rendering and you can see the
`TouchableOpacity` animation runs smoothly.  Video:

https://youtu.be/4UNf4-8orQ4

Ideally this will be baked into React Core at some point, but according to jordwalke that's
going to require a major refactoring and take a long time, so going with this for now.

Reviewed By: ericvicenti

Differential Revision: D2506522

fb-gh-sync-id: 5969bf248de10d38b0ac22f34d7d49bf1b3ac4b6
shipit-source-id: 5969bf248de10d38b0ac22f34d7d49bf1b3ac4b6
2016-03-10 08:14:23 -08:00
Björn Pötzschke 1832d79bd1 TextStorage in RCTText is now only set when it differs from old value.
Summary:**Motivation**
Multiple instances of `Text` inside a `ListView` is a bad idea for the performance of the app.
When you create 1000 elements and you scroll through the list it is really slow and laggy because the `NSTextStorage`, which is the backbone of the `RCTText` element, will set more than 1,000 times and also the method `setNeedsDisplay` is called multiple times. This will causes huge memory problems and the app crashes.

With this commit I check in `RCTText` if the `NSTextStorage` differs from the old value. If yes then set it otherwise don't set the `NSTextStorage`. This will prevent to call `setNeedsDisplay` when not really needed.

Gist with sample app to show behavior can be found here: https://gist.github.com/bpoetzschke/28a17969c6aa54219e18
Closes https://github.com/facebook/react-native/pull/6341

Differential Revision: D3035485

Pulled By: nicklockwood

fb-gh-sync-id: 181f01b7f87f765dbb01a4ad3196fc40f9d50694
shipit-source-id: 181f01b7f87f765dbb01a4ad3196fc40f9d50694
2016-03-10 07:46:52 -08:00
Jeff Morrison 593d766ec5 Fix fbsource errors
Reviewed By: kassens

Differential Revision: D3032708

fb-gh-sync-id: e697a2433dcdcb70ddeafdee607f14e570cfb245
shipit-source-id: e697a2433dcdcb70ddeafdee607f14e570cfb245
2016-03-09 16:54:24 -08:00
Laurence Bortfeld 336dbe4c00 getCurrentConnectivity should resolve with object
Summary:`getCurrentConnectivity()` should resolve with object instead of array otherwise in `NetInfo.fetch().done(reach => console.log('Initial: ' + reach))` `reach` will be undefined (see https://github.com/l-urence/react-native/blob/master/Libraries/Network/NetInfo.js#L200).

cc satya164
Closes https://github.com/facebook/react-native/pull/6373

Differential Revision: D3032773

fb-gh-sync-id: edc545548d3c17387545b6c59894c27e4563cb18
shipit-source-id: edc545548d3c17387545b6c59894c27e4563cb18
2016-03-09 16:30:30 -08:00
Konstantin Raev 9213d0411d Backed out changeset ed509fc86e9d
Reviewed By: javache

Differential Revision: D3029704

fb-gh-sync-id: 87e6fe282c08d7128e1f5f00a956af0b6e341b30
shipit-source-id: 87e6fe282c08d7128e1f5f00a956af0b6e341b30
2016-03-09 08:25:25 -08:00
Richard Lai f2483eb1ee Rename setTiming to applyAnimation
Summary:Given that you can do all kinds of animations other than `Animated.timing`, it made no sense to have `setTiming`. In addition, you can't intuitively tell that this is the callback where you would do custom animations.

The discussion took place on Discord with ericvicenti: https://discordapp.com/channels/102860784329052160/154015578669973504
Closes https://github.com/facebook/react-native/pull/6235

Differential Revision: D2999121

Pulled By: hedgerwang

fb-gh-sync-id: f587b865de11ba5e8dc9c430720252ffb5d12794
shipit-source-id: f587b865de11ba5e8dc9c430720252ffb5d12794
2016-03-08 23:37:34 -08:00
Laurence Bortfeld 6470ff842b Reject promise if network request failed
Summary:This adds missing check and promise reject for failing network requests. Which was missing in the fetch.js update. Sorry for the trouble.

cc davidaurelio
Closes https://github.com/facebook/react-native/pull/6368

Differential Revision: D3026830

Pulled By: davidaurelio

fb-gh-sync-id: 028037678e148bb9b0a6a098d29ec7d82f64b607
shipit-source-id: 028037678e148bb9b0a6a098d29ec7d82f64b607
2016-03-08 16:37:24 -08:00
Hedger Wang fa5783e3ee Initial implementation of the Navigator with NavigationExperimental.
Summary:This is the initial implementation of the Navigator done with the NavigationExperimental library.
There will be following diffs to support more features that are currently available from the Navigator.

Reviewed By: ericvicenti

Differential Revision: D3016084

fb-gh-sync-id: ed509fc86e9dc67b5334be9e60b582494fd52844
shipit-source-id: ed509fc86e9dc67b5334be9e60b582494fd52844
2016-03-08 16:26:24 -08:00
Martín Bigio 179ac1e359 Remove HMRClient out of the bundle
Reviewed By: elynde

Differential Revision: D3024020

fb-gh-sync-id: 26e8be8a1b2c1986e4ca7b510aac263f1a2ced1c
shipit-source-id: 26e8be8a1b2c1986e4ca7b510aac263f1a2ced1c
2016-03-08 13:27:32 -08:00
Jeff Morrison b473d496c4 Update FBSource to use Flow 0.22
Reviewed By: gabelevi

Differential Revision: D3021265

fb-gh-sync-id: f4c857505c1a7b6b813bcdccd629e595ef7a81af
shipit-source-id: f4c857505c1a7b6b813bcdccd629e595ef7a81af
2016-03-08 12:39:29 -08:00
mangogogos 06a41c3785 Forward touchable events to TouchableNativeFeedback
Summary:Fixes #6256
Closes https://github.com/facebook/react-native/pull/6344

Differential Revision: D3021478

Pulled By: mkonicek

fb-gh-sync-id: 350cf72ad73d06d97cc1663e0d69c0c97977689e
shipit-source-id: 350cf72ad73d06d97cc1663e0d69c0c97977689e
2016-03-08 12:12:39 -08:00
Hedger Wang b5ae8a8ece Clean up NavigationAnimatedView
Summary:- Add flow type checks.
- Fix code styles.
- Improve the logics to update `this.state.scenes`.
- Improve the logics to pass the layout.

Reviewed By: ericvicenti

Differential Revision: D3022107

fb-gh-sync-id: 23f4ed22db797f68bde0ba4f3cdd123701934fc3
shipit-source-id: 23f4ed22db797f68bde0ba4f3cdd123701934fc3
2016-03-08 10:57:22 -08:00
Laurence Bortfeld 87c26885a3 Update fetch to latest https://github.com/github/fetch
Summary:This fixes https://github.com/facebook/react-native/issues/6326 with updating https://github.com/facebook/react-native/blob/master/Libraries/Fetch/fetch.js to latest from  https://github.com/github/fetch.

cc skevy steveluscher
Closes https://github.com/facebook/react-native/pull/6347

Differential Revision: D3024308

Pulled By: davidaurelio

fb-gh-sync-id: da87827b94d683aeb66be345e255bd771fdba1be
shipit-source-id: da87827b94d683aeb66be345e255bd771fdba1be
2016-03-08 09:48:29 -08:00
realaboo 49b2805da2 Geolocation Accuracy and Cached Location Bug
Summary:There are two issues:

1. When calling startObserving or getCurrentPosition for the first time, _locationManager is not initialized and the accuracy value set in options is lost.

2. When using the cached location _lastLocationEvent, current timestamp retrieved by CFAbsoluteTimeGetCurrent() is from 2001, but the timestamp of the location is from 1970. In addition, the comparison between _lastLocationEvent[@"coords"][@"accuracy"] and options.accuracy is incorrect. Less value indicates more accurate location.
Closes https://github.com/facebook/react-native/pull/6198

Differential Revision: D3023786

Pulled By: nicklockwood

fb-gh-sync-id: 869c0e34252470275bf99cf0e5861747247f1158
shipit-source-id: 869c0e34252470275bf99cf0e5861747247f1158
2016-03-08 05:17:21 -08:00
Tim Yung d0a26a75fb RN: Fix Exponential WebSocket Growth from DevTools
Summary:025281230de2e316f2770a2db71f8bec6fe43a07 changed `WebSocket` to fire both `onerror` and `onclose`.

However, `setupDevtools` assumed that only one of the two handlers would ever be invoked. When the handler is invoked, it re-invokes itself to keep a socket open. But since both handelrs are invoked, a series of closed or failed sockets can cause an exponential increase in sockets opened.

Symptoms of this bug include eventually reaching the maximum number of file descriptors allowed by the operating system, or a non-responsive system. Within React Native applications, symptoms include a failure to load resources from the React Native server or application crashes.

Reviewed By: frantic

Differential Revision: D3022697

fb-gh-sync-id: 8131ecbd6d8ba30281253340d30370ff511a5efd
shipit-source-id: 8131ecbd6d8ba30281253340d30370ff511a5efd
2016-03-07 19:20:25 -08:00
David Aurelio fd3a0ba781 Play nice with `fetch` after the newest changes that add support for `XMLHttpRequest.response`
Summary:After adding support for `XMLHttpRequest#response`, the `fetch` polyfill detects buffer support when debugging in Chrome and sets `responseType` to `'blob'`.
In that case, the response was always empty.

This change will construct a blob if `responseType` has been set to `'blob'` in order to avoid that problem

Reviewed By: steveluscher

Differential Revision: D3018884

fb-gh-sync-id: 4ade0413de67242c3565d95c2880d4a981ba2342
shipit-source-id: 4ade0413de67242c3565d95c2880d4a981ba2342
2016-03-07 13:30:41 -08:00
Zack 025281230d WebSocket: call onclose before closing in event of error
Summary:Motivation: Developer expects `onclose` to be called before/during close of the websocket. The `websocketFailed` event triggers a close but does not invoke onclose.

Testplan: Connect to a websocket server from android, terminate the server, observe that onerror is called, the websocket is closed, but onclose is not called.

Note: the observed bug is in android only because in iOS the underlying websocket implementation fires the `websocketClosed` rather than `websocketFailed` event when the server terminates. Nevertheless, the justification for this change stands that regardless of the cause of the close, if `this.close` is called it is expected this.onclose should be called as well.
Closes https://github.com/facebook/react-native/pull/6307

Differential Revision: D3017458

fb-gh-sync-id: c9e2dfefa597b4e99ee85eaa991667c347f86d83
shipit-source-id: c9e2dfefa597b4e99ee85eaa991667c347f86d83
2016-03-06 15:02:27 -08:00
Zahan Malkani 87245b2d40 Support the scriptURLs observed on Android for asset source resolver
Reviewed By: frantic

Differential Revision: D3005791

fb-gh-sync-id: 99acb350c8c80ebe22687294a0069891686885fc
shipit-source-id: 99acb350c8c80ebe22687294a0069891686885fc
2016-03-05 22:43:25 -08:00
Richard Lai ebf5842fe6 Fix listener name in NavigationAnimatedView
Summary:Should be self-explanatory.

__Edit__: oh turns out I fixed a memory leak too because of a typo of the typo on teardown.

cc ericvicenti
Closes https://github.com/facebook/react-native/pull/6309

Differential Revision: D3016576

fb-gh-sync-id: 608a39ad293154e47480003bc9b450b521cddbb1
shipit-source-id: 608a39ad293154e47480003bc9b450b521cddbb1
2016-03-05 15:48:26 -08:00
Hedger Wang 71e59761c9 Clean up APIs.
Reviewed By: ericvicenti

Differential Revision: D3010136

fb-gh-sync-id: 310864450bfc86ebc2d696f8ef4876b14fa3a57f
shipit-source-id: 310864450bfc86ebc2d696f8ef4876b14fa3a57f
2016-03-04 14:57:31 -08:00
Frank Yan d815d1df9a Move cssVar out of react-native-github
Reviewed By: jingc

Differential Revision: D3008870

fb-gh-sync-id: 2c3d9a13ba6952540369cb68d96d375cb8cf757a
shipit-source-id: 2c3d9a13ba6952540369cb68d96d375cb8cf757a
2016-03-04 13:22:03 -08:00
Varun Vachhar d6ded2f807 Display a warning when using src property for an Image rather than source.
Summary:When using the `Image` component with a `src` property instead of `source` the component fails silently. vjeux suggested to add a warning (https://twitter.com/Vjeux/status/704509214937317378).

Tested with the UIExplorer example on iOS and Android simulators.
Closes https://github.com/facebook/react-native/pull/6221

Differential Revision: D3011659

Pulled By: mkonicek

fb-gh-sync-id: c9bae6c802c173ef85d9c4552747db994c58906e
shipit-source-id: c9bae6c802c173ef85d9c4552747db994c58906e
2016-03-04 07:32:22 -08:00
Hedger Wang 1caebf175a Add data structure to manage the stack for the legacy navigator.
Reviewed By: ericvicenti

Differential Revision: D3002015

fb-gh-sync-id: 27519a1b67fe514bd6d9102031ea482f76fae16b
shipit-source-id: 27519a1b67fe514bd6d9102031ea482f76fae16b
2016-03-03 22:52:51 -08:00
Wenjing Wang 8a1629166e nested emit call in a queue should be handled in FIFO
Summary: I think we should dispose events in FIFO order

Reviewed By: fkgozali

Differential Revision: D2987425

fb-gh-sync-id: a4ad256512725d0bed0086b642e10fe7e7715070
shipit-source-id: a4ad256512725d0bed0086b642e10fe7e7715070
2016-03-03 18:57:52 -08:00
Eric Lo 8c25181c44 Add onShow callback for RCTModalHostView
Summary: Added ability to include a callback to the modal. The callback is invoked when the modal is shown.

Reviewed By: javache

Differential Revision: D3005212

fb-gh-sync-id: 12648e17bd1cf831daf65529b87ae8cfdb901c65
shipit-source-id: 12648e17bd1cf831daf65529b87ae8cfdb901c65
2016-03-03 12:43:36 -08:00
Konstantin Raev 5ffeb9764c Back out of D3000972
Reviewed By: dmmiller

Differential Revision: D3003211

fb-gh-sync-id: e64f1f17dcbf19a32066de91d6e839d59cd5d27c
shipit-source-id: e64f1f17dcbf19a32066de91d6e839d59cd5d27c
2016-03-03 04:21:36 -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
Nick Lockwood dc13115445 Dispatch module setup asynchronously to avoid blocking main thread when bridge starts
Summary:Initializing native modules can block the main thread for tens of milliseconds when it starts up, making it difficult to instantiate the bridge on demand without causing a performance blip.

This diff splits up the initialization of modules so that - although they still happen on the main thread - they don't block the thread continuously.

Reviewed By: javache

Differential Revision: D2965438

fb-gh-sync-id: 38c9c9d281e4672b5874d68b57d4c60d1d268344
shipit-source-id: 38c9c9d281e4672b5874d68b57d4c60d1d268344
2016-03-03 02:21:36 -08:00
Frank Yan 8f3e5b1e93 Update usage names of React Native color palette
Reviewed By: weicool

Differential Revision: D2978557

fb-gh-sync-id: ef6b6b24e7db7faf3aecee0a9755565e1b41be58
shipit-source-id: ef6b6b24e7db7faf3aecee0a9755565e1b41be58
2016-03-03 00:51:31 -08:00
Martin Konicek 8717b2d19c Rework the NavigationHeader
Reviewed By: dmmiller, ericvicenti

Differential Revision: D3000972

fb-gh-sync-id: fcd4e63b72a70440e611289f03ed4757e230dc5b
shipit-source-id: fcd4e63b72a70440e611289f03ed4757e230dc5b
2016-03-02 12:21:36 -08:00
David Aurelio eb531943aa Fix the last imports of `'invariant'`
Summary:This changes the last two imports of `'invariant'` that I could find to `'fbjs/lib/invariant'`.
Closes https://github.com/facebook/react-native/pull/6248

Differential Revision: D3000440

fb-gh-sync-id: 15ebd08bb749d1d82b12902dd3dec00914fc1ed5
shipit-source-id: 15ebd08bb749d1d82b12902dd3dec00914fc1ed5
2016-03-02 10:14:59 -08:00
David Aurelio c331d113dc Fix breakages caused by switch to fbjs
Summary: This fixes a couple of breakages introduced by the switch to fbjs

Reviewed By: bestander

Differential Revision: D3000078

fb-gh-sync-id: 2971d049030f754d5001f6729716373a64078ddf
shipit-source-id: 2971d049030f754d5001f6729716373a64078ddf
2016-03-02 08:26:33 -08:00
David Aurelio d3f2081d90 Fix unit tests in open source environment
Summary:**Test plan**

run `npm test`, see all tests pass
Closes https://github.com/facebook/react-native/pull/6243

Differential Revision: D2999993

Pulled By: davidaurelio

fb-gh-sync-id: 54f2d5f9d28a31d132783694133df78370660421
shipit-source-id: 54f2d5f9d28a31d132783694133df78370660421
2016-03-02 07:07:38 -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
Martin Konicek 4654b34c97 Revert Remove invariant hack for jest
Summary: This reverts D2988899 as it consistently broke the Invariant test on Travis: https://travis-ci.org/facebook/react-native

Reviewed By: bestander

Differential Revision: D2999915

fb-gh-sync-id: 781ab5f6fc8e3b97bc4d215af855823f4b5014dd
shipit-source-id: 781ab5f6fc8e3b97bc4d215af855823f4b5014dd
2016-03-02 05:46:33 -08:00
David Aurelio ad8a335864 Remove knowledge of fbjs from the packager
Summary:Follow-up to https://github.com/facebook/react-native/pull/5084

This…
- changes all requires within RN to `require('fbjs/lib/…')`
- updates `.flowconfig`
- updates `packager/blacklist.js`
- adapts tests
- removes things from `Libraries/vendor/{core,emitter}` that are also in fbjs
- removes knowledge of `fbjs` from the packager

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

Reviewed By: bestander

Differential Revision: D2926835

fb-gh-sync-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
shipit-source-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
2016-03-02 04:28:38 -08:00
Nick Lockwood ca67648f03 Revert ArrayBuffer support
Summary:The ArrayBuffer support added in https://github.com/facebook/react-native/pull/6156 crashed on iOS7 as Uint8Array is unavailable.

This diff removes that feature. We can revisit it again once we drop support for iOS 7.

Reviewed By: javache

Differential Revision: D2999762

fb-gh-sync-id: b497eac92ca5a0865b308d2a08c9409fcce97156
shipit-source-id: b497eac92ca5a0865b308d2a08c9409fcce97156
2016-03-02 04:07:32 -08:00
Hedger Wang caac520952 Add gesture handling for the card stack.
Reviewed By: ericvicenti

Differential Revision: D2995958

fb-gh-sync-id: f66759440b03072b650a572f011cadd06a0180d2
shipit-source-id: f66759440b03072b650a572f011cadd06a0180d2
2016-03-01 18:45:37 -08:00
Spencer Ahrens 85801ef874 Remove invariant hack for jest
Reviewed By: vjeux, cpojer

Differential Revision: D2988899

fb-gh-sync-id: e1b2a32a3f665b8f8a246e73e8dd620ff8506ea7
shipit-source-id: e1b2a32a3f665b8f8a246e73e8dd620ff8506ea7
2016-03-01 13:42:59 -08:00
Hedger Wang 0db22f184d NavigationCardStack - Add card stack item.
Summary: Add card stack item that moves from the right or the bottom.

Reviewed By: ericvicenti

Differential Revision: D2975659

fb-gh-sync-id: a04724943375ba0a9931eafb2aa82d6d8c31acfe
shipit-source-id: a04724943375ba0a9931eafb2aa82d6d8c31acfe
2016-03-01 09:44:31 -08:00
Sreejumon cbc0e21926 Support for XHR responseType and response attributes
Summary:Currently the XMLHttpRequest don't support any response types other than text. This PR will add responseType attribute as well response attribute.

This PR will partially solve the issue https://github.com/facebook/react-native/issues/6017
Closes https://github.com/facebook/react-native/pull/6156

Differential Revision: D2994267

Pulled By: nicklockwood

fb-gh-sync-id: 24642c48655930c8350112bac38e6ed4a42bd40d
shipit-source-id: 24642c48655930c8350112bac38e6ed4a42bd40d
2016-03-01 09:36:33 -08:00
Pieter De Baets f67fa82008 Add UIManager.measureInWindow to get window coordinates
Summary: When embedding in a hybrid app, we sometimes present new modal views or windows that have a different frame from the original root view. This API allows us to get coordinates in the application's window frame, which should be valid in any fullscreen view.

Reviewed By: majak

Differential Revision: D2939827

fb-gh-sync-id: 06b93cc2cb3519a25819c6efa445c779314dd673
shipit-source-id: 06b93cc2cb3519a25819c6efa445c779314dd673
2016-03-01 06:51:33 -08:00
Rui Chen 7e3266d7de Fix attributes checking for Image.android.js
Reviewed By: sahrens

Differential Revision: D2975018

fb-gh-sync-id: 226f2d3d3dcb538f0c3967346a9b226960c1d15c
shipit-source-id: 226f2d3d3dcb538f0c3967346a9b226960c1d15c
2016-02-29 18:02:35 -08:00
Hedger Wang 73bdef4089 Unify scene rederer params that are used render the scene / header.
Reviewed By: fkgozali

Differential Revision: D2981045

fb-gh-sync-id: 21688d92e31d882c5a31dd83ca064c2a01837164
shipit-source-id: 21688d92e31d882c5a31dd83ca064c2a01837164
2016-02-29 13:22:57 -08:00
Janic Duplessis 44fcf22074 Fix crash when passing null to clearImmediate
Summary:Passing `undefined` or `null` to `clearImmediate` caused apps to crash. It it caused because we try to find the index of the null/undefined timer when we should just do nothing when passed these values.

It is already handled properly in the other Timer functions.

**Test plan**
Calling `clearImmediate` with `undefined` or `null` should do nothing.
Closes https://github.com/facebook/react-native/pull/6192

Differential Revision: D2987778

Pulled By: vjeux

fb-gh-sync-id: 6fd38cfa3c10012caa2afb27cbdab95df696a769
shipit-source-id: 6fd38cfa3c10012caa2afb27cbdab95df696a769
2016-02-28 11:41:33 -08:00