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

3981 Коммитов

Автор SHA1 Сообщение Дата
Christopher Dro cfd9f65cfe Add space after url. Fixes #4292
Summary: Closes https://github.com/facebook/react-native/pull/4297

Reviewed By: svcscm

Differential Revision: D2686725

Pulled By: foghina

fb-gh-sync-id: 3679c7e8d9b3e4c12ef42628e348c6a6d5cc32d7
2015-11-23 12:31:30 -08:00
Christopher Chedeau 5f226cf4c5 Update breaking-changes.md 2015-11-23 11:10:36 -08:00
Martin Konicek b9580511a6 Codemod IntentAndroid.{openURI -> openURL}
Reviewed By: olegbl

Differential Revision: D2680128

fb-gh-sync-id: d9786b6c20d4d6f62cc79fb21ab6861afe30bb54
2015-11-23 11:04:29 -08:00
Peter Lai 56a56f33d1 add method to determine if current activity is null
Reviewed By: andreicoman11

Differential Revision: D2680281

fb-gh-sync-id: ac158fb55dd60d05b7e3444d68e06a010e04eef4
2015-11-23 10:49:34 -08:00
dmmiller 90de853cc1 Update GestureResponderSystem.md
Update to reflect the reality of what pageX and pageY are on both platforms.
2015-11-23 18:19:58 +00:00
Alexander Kotliarskyi 0f3ed2cdb7 Merge pull request #4299 from andrewsardone/bundle-dev-clarification
[Docs] Clarify --dev flag for react-native-bundle
2015-11-23 10:14:25 -08:00
Tadeu Zagallo 659cc005ad Restore VSYNC markers on RCTProfile
Summary: public

The VSYNC markers got lost at some point when refactoring RCTBatchedBridge, restore it, but keep it in RCTProfile.

Reviewed By: jspahrsummers

Differential Revision: D2685805

fb-gh-sync-id: 1acad330de7baf004a83b41f90ba4b6532605de6
2015-11-23 09:50:30 -08:00
Martin Konicek 3afa8b6c5f Update breaking-changes.md 2015-11-23 17:32:59 +00:00
Dave Miller 0c2ee5d480 Update Android Touch events
Summary: public

This moves Android touch events to parity with iOS.  The locationX,Y value passed to js now is view relative to the view that is handling the touch.
The pageX,Y is now relative to the root view.

Reviewed By: andreicoman11

Differential Revision: D2670028

fb-gh-sync-id: 5438640d6c78633629b9a308a59cc306bb07815e
2015-11-23 09:30:37 -08:00
Hedger Wang e0d53e1c48 Fix move gesture handling.
Summary: public

The gesture that moves scene around should only be attached when the
move starts at the moment that the first move is granted.

No move would ever be granted if the move event is prevented by the
decendent children (e.g. a slider component).

For now, the move gesture is attached at `onPanResponderGrant`
instead of `onPanResponderMove` thus we'd create "ghost-move-gesture"
when no actual moves is received my the navigator.

Reviewed By: fkgozali

Differential Revision: D2683802

fb-gh-sync-id: 50ae877787167511df48378304bd2ad665c73300
2015-11-23 09:20:28 -08:00
Milen Dzhumerov e4dca7a1fa Add JSON methods to systrace
Summary: public Add JSON methods to systraces

Reviewed By: jspahrsummers

Differential Revision: D2679719

fb-gh-sync-id: d8bbdc9577264b1de01d7bb52656f4f1a86a5982
2015-11-23 07:03:39 -08:00
Milen Dzhumerov 02b67d9d40 BridgeProfiling measure methods
Summary: public Add measure() family of methods which allow to easily swizzle methods for profiling

Reviewed By: tadeuzagallo

Differential Revision: D2679904

fb-gh-sync-id: 3724440e1bdaca9e854f4d4124a897a204966dc7
2015-11-23 07:03:32 -08:00
David Aurelio 6b3a6e5958 Unbreak open source release due to import of internal module
Reviewed By: majak

Differential Revision: D2685592

fb-gh-sync-id: eb5e9baf15d08ff1ec2c29e0ca1fe94df079d79e
2015-11-23 06:37:29 -08:00
Andrew Sardone d92b3b3e9b Clarify --dev flag for react-native-bundle
Given some [confusion around `react-native bundle`'s `--dev` flag][1],
this hopes to clear somet things up int he docs by…

- Removing mentions of the `__DEV__` environment variable
    - I think it confuses the user on how to work with the command-line
      flag, and frankly it seems like an internal implementation detail
      from the perspective of react-native-cli. We should focus on what
      the `--dev` flag does (e.g., toggles dev warnings, performance
      optimizations).
- Adding a minimal note about native-land's build configurations and how
  that should be checked for production builds

[1]: https://github.com/facebook/react-native/issues/4181
2015-11-23 08:21:45 -05:00
Nick Lockwood f827a513a1 Fixed double-callback for cached images
Summary: public

A missing return statement in RCTImageLoader meant that cached images would be loaded twice - once from cache and again from the source.

This was mostly innocuous, causing only a slight perf regression due to the image cache being effectively disabled, however in some cases (such as RCTImageEditingManager.cropImage) it caused the success callback to fire twice, resulting in a crash.

Reviewed By: fkgozali

Differential Revision: D2684956

fb-gh-sync-id: 7580a6fbfe00a30807951803e04bfcdbee3bb80a
2015-11-23 04:20:28 -08:00
Alexander Blom 274c5c78c4 Support cookies on Android
Summary: This adds a persistent cookie store that shares cookies with WebView.

Add a `ForwardingCookieHandler` to OkHttp that uses the underlying Android webkit `CookieManager`.
Use a `LazyCookieHandler` to defer initialization of `CookieManager` as this will in turn trigger initialization of the Chromium stack in KitKat+ which takes some time. This was we will incur this cost on a background network thread instead of during startup.
Also add a `clearCookies()` method to the network module.

Add a cookies example to the XHR example. This example should also work for iOS (except for the clear cookies part). They are for now just scoped to Android.

Closes #2792.

public

Reviewed By: andreicoman11

Differential Revision: D2615550

fb-gh-sync-id: ff726a35f0fc3c7124d2f755448fe24c9d1caf21
2015-11-23 03:21:31 -08:00
Alexander Blom f57c2a9140 Add GuardedResultAsyncTask
Reviewed By: andreicoman11

Differential Revision: D2679459

fb-gh-sync-id: 8a9ec170ce76bbc3340c9e8872e19b78ae5a5c2d
2015-11-23 03:21:25 -08:00
panjianjun 54470021ca remove prepare_command in podspec file
Summary: since 0.13.2 , prepare_command in podspec would download the dependencies of react-native again when you install react-native via cocoapods with local path.
Closes https://github.com/facebook/react-native/pull/4291

Reviewed By: svcscm

Differential Revision: D2685452

Pulled By: nicklockwood

fb-gh-sync-id: b1c1a0f45897d3eb45be99db3633c899c35feb8e
2015-11-23 01:20:29 -08:00
James Ide a97dbe0394 Merge pull request #4278 from darkrishabh/showcase
Adding DareU to the Showcase
2015-11-22 00:49:01 -08:00
Rishabh Mehan 156b5ad79e Adding DareU to the Showcase 2015-11-22 00:14:20 -08:00
Tadeu Zagallo 16dd5d664b Add systrace markers to module require
Summary: public

Show modules' dependencies and time to load.

Reviewed By: davidaurelio

Differential Revision: D2603245

fb-gh-sync-id: a1d5067a8522b908b87fdfdd51ff4c4fdbc2edfc
2015-11-21 11:11:26 -08:00
Sebastian Markbage 43f18ffd08 Add infra for Prepack build option
Summary: This adds a build option for using Prepack (an experimental packager) to
build a bundle. It doesn't actually take on the npm package dependency
because it's not published/open source (yet).

This will be used while we experiment and should be maintained as the
build system changes so that we can continue getting fresh builds.

I found that saveBundleAndMap and processBundle were over abstracted and
got in my way so I inlined it and removed the unit tests because the unit
test was testing trivial code that is likely to change interface.

I went with a separate build phase and a separate Bundle class even though
there are a lot of commonalities. I imagine that the requirements for
Prepack will continue to diverge. Especially for source maps but a larger
refactor could try to unify these a bit more. The fact that modules are
wrapped before the write phase seems to be an unfortunate architecture
that makes this difficult.
Closes https://github.com/facebook/react-native/pull/4226

Reviewed By: amasad

Differential Revision: D2673760

Pulled By: sebmarkbage

fb-gh-sync-id: 299ccc42e4be1d9dee19ade443ea3388db2e39a8
2015-11-20 20:19:25 -08:00
James Ide aa399f0fd9 Merge pull request #4258 from mikefowler/master
Update Animations.md
2015-11-20 15:58:10 -08:00
Tim Yung 8ab51828ff RN: Revamp YellowBox for Warnings
Reviewed By: vjeux

Differential Revision: D2667624

fb-gh-sync-id: f3c6ed63f3138edd13e7fe283cf877d598018813
2015-11-20 13:09:16 -08:00
James Ide b641d3de37 Merge pull request #4262 from rreusser/note-on-geolocation-docs
[Docs] Note that Android geolocation not yet open sourced
2015-11-20 12:57:34 -08:00
Ricky Reusser 945a1c72db Note in docs that Android geolocation not yet open sourced 2015-11-20 15:43:07 -05:00
Marc Horowitz 9a61628f13 Clean up the interface to the bridge
Summary: Change the following classes into interfaces, with a separate
Impl file:  CatalystInstance, ReactInstanceManager,
CatalystQueueConfiguration, MessageQueueThread.  This is done to help
isolate the interface between React Native and applications which use it.
This will also help some intrusive development work on a branch
such as porting parts of the bridge to common C++ code, without affecting
app reliability while this work is ongoing.
public

Reviewed By: astreet

Differential Revision: D2651277

fb-gh-sync-id: f04dc04a6e68df7acbc2bbf8b2529287d7b5b2ae
2015-11-20 12:30:30 -08:00
Marc Horowitz facf8a56d2 minor build cleanups
Summary: make DevSupportManager PUBLIC visibility, instead of adding
to it more; put private parts of OnLoad into an anonymous namespace,
and move NativeRunnable into it; don't make NativeArray depend on
MethodCall which it does not use.
public

Reviewed By: astreet

Differential Revision: D2651270

fb-gh-sync-id: d5262da79cbd60c4eb490d43d13cc625fa163cdf
2015-11-20 12:29:33 -08:00
Marc Horowitz c8f3b43984 Don't use the Bridge from CatalystInstance.
Summary: getBridge() is annotated VisibleForTesting, but still used
in DevSupportManager.  Instead, add the necessary methods to the
CatalystInstance interface.
public

Reviewed By: astreet

Differential Revision: D2651265

fb-gh-sync-id: 395893a961c32843871de4451eeccb33135b7ede
2015-11-20 12:29:27 -08:00
Marc Horowitz 5b6b5a64d1 Split JavaSJExecutor and ProxyExecutorException into their own file
Summary: This makes the exception a nested class of the interface,
which eliminates the dependency of DevSupportManager on
ProxyJavaScriptExecutor.
public

Reviewed By: astreet

Differential Revision: D2651252

fb-gh-sync-id: 99de1c308b9bce717ab749c4e239d2773a920e1f
2015-11-20 12:29:20 -08:00
Mike Fowler 60b67a447d Update Animations.md
Add a better explanation of the extrapolation options.
2015-11-20 11:38:04 -08:00
Marc Horowitz 67209e6396 If fbsystrace is running when catalyst starts, it asserts
Summary: registering with systrace checks if the bridge is
initialized, which it's not yet in the ctor.  Defer registration until
after the bridge is created, and only unregister in that case.
public

Reviewed By: astreet, dreiss

Differential Revision: D2651244

fb-gh-sync-id: 8da1108e9d15fddde48d06f4ed61ee0f787016ad
2015-11-20 10:10:29 -08:00
Milen Dzhumerov 7febd13676 Attach to all RelayProfiler events
Summary: public

Dynamically profile events from RelayProfiler if available. This will expose time spent in Relay in the systraces.

Reviewed By: tadeuzagallo

Differential Revision: D2674215

fb-gh-sync-id: d5f9d529b86d267a80b0cda2223f6a28a08ac385
2015-11-20 10:06:28 -08:00
Martin Konicek 155a609781 Unbreak tests
Summary: The recent commits for RecyclerViewBackedScrollView introduced a bunch of Flow errors.

Disable Flow for now in `ReactNativeViewPool` as it looks like that file doesn't use Flow :)

public

Reviewed By: gabelevi

Differential Revision: D2679974

fb-gh-sync-id: 71512f403e3fa271f6c0fa1a64e877ca1750f675
2015-11-20 09:53:28 -08:00
Saurabh Aggarwal a7c4ed106b Adds stetho interceptor to the OSS react native networking module
Reviewed By: mkonicek

Differential Revision: D2669416

fb-gh-sync-id: d061711a412348b16ffb877e0178a05460fd95f2
2015-11-20 09:44:27 -08:00
Krzysztof Magiera 205a35ad37 View recycling in JS.
Summary: public
Native view recycling implementation based on limited pools of views.

In this diff I introduced new UIManager method: dropViews. Instead of removing views from tag->view maps when they are detached we keep them there until we get a call to dropViews with the appropriate tag. JS may keep a pool of object and selectively decide not to enqueue drop for certain views. Then instead of removing those views it may decide to reuse tag that has been previously allocated for a view that is no longer in use.

Special handling is required for layout-only nodes as they only can transition from layout-only to non-layout-only (reverse transition hasn't been implemented). Because of that we'd loose benefits of view flattening if we decide to recycle existing non-layout-only view as a layout-only one.

This diff provides only a simple and manual method for configuring pools by calling `ReactNativeViewPool.configure` with a dict from native view name to the view count. Note that we may not want recycle all the views (e.g. when we render mapview we don't want to keep it in memory after it's detached)

Reviewed By: davidaurelio

Differential Revision: D2677289

fb-gh-sync-id: 29f44ce5b01db3ec353522af051b6a50924614a2
2015-11-20 08:11:36 -08:00
Krzysztof Magiera 0c8850f3a7 Only send layout update operation to nativehierarchymanager when layout actually changes.
Reviewed By: andreicoman11

Differential Revision: D2679408

fb-gh-sync-id: 7f0a972e9e12f70402e2d285edef458a61ca1c39
2015-11-20 08:04:29 -08:00
Sebastian McKenzie 06e514076b Ensure correct Babel plugin locations in packager transform
Summary: Manually resolve all default Babel plugins. `babel.transform` will attempt to resolve all base plugins relative to the file it's compiling. This makes sure that we're using the plugins installed in the react-native package.

**NOTE:** Haven't tested this. Please don't merge until Travis has done CI.
Closes https://github.com/facebook/react-native/pull/4248

Reviewed By: svcscm

Differential Revision: D2679651

Pulled By: davidaurelio

fb-gh-sync-id: 0cdef1e738ba28c09c811432a71047f80540ed7b
2015-11-20 07:54:29 -08:00
Krzysztof Magiera 1195f9c8e8 Further improvements in RecyclerViewBackedScrollView.
Summary: public
Changed ListView to use onLayout and onContentSizeChange (new) events instead of measure. Updated ScrollView implementation to support contentSizeChange event with an implementation based on onLayout attached to the content view. For RecyclerViewBackedScrollView we need to generate that event directly as it doesn't have a concept of content view.
This greatly improves performance of ListView that uses RecyclerViewBackedScrollView

Reviewed By: mkonicek

Differential Revision: D2679460

fb-gh-sync-id: ba26462d9d3b071965cbe46314f89f0dcfd9db9f
2015-11-20 07:44:31 -08:00
Martin Konicek 848a151ff8 Add a bookmarklet to comment on questions
For higher accuraccy (and less clowniness) it might be better
to have the question bot only label issues that are potentially
questions and then have people quickly go through those issues
and use this bookmarklet to comment on them.
2015-11-20 14:26:59 +00:00
Nick Lockwood 0fe074acbd Removed all calls to [UIImage imageWithData:] on a background thread
Summary: public

I had previously assumed (based on past experience and common wisdom) that `[UIImage imageWithData:]` was safe to call concurrently and/or off the main thread, but it seems that may not be the case (see https://github.com/AFNetworking/AFNetworking/pull/2815).

This diff replaces `[UIImage imageWithData:]` with ImageIO-based decoding wherever possible, and ensures that it is called on the main thread wherever that's not possible/convenient.

I've also serialized access to the `NSURLCache` inside `RCTImageLoader`, which was causing a separate-but-similar crash when loading images.

Reviewed By: fkgozali

Differential Revision: D2678369

fb-gh-sync-id: 74d033dafcf6c412556e4c96f5ac5d3432298b18
2015-11-20 05:17:33 -08:00
Pieter De Baets 1a1c3f76a2 Port CatalystLoggingTestCase to iOS
Reviewed By: nicklockwood

Differential Revision: D2658485

fb-gh-sync-id: e6803aefee69ee058651fc4c8c202619543f0cd2
2015-11-20 04:41:24 -08:00
Krzysztof Magiera 7cd7591f04 Use requireNativeComponent in View.js.
Summary: public
In a previous diff I've removed a need for using View attributes in requireNativeComponent. Thanks to that we can now use requireNativeComponent in View module. In a follow up diff I'll be getting rid of ReactNativeViewAttributes.

Reviewed By: sahrens

Differential Revision: D2676088

fb-gh-sync-id: d5d6e50f4629bd7982b90f3496e1fd22078e96a8
2015-11-20 02:09:38 -08:00
Pawel Sienkowski 0d17d6a8c0 RCTRootView integration tests
Reviewed By: javache

Differential Revision: D2631527

fb-gh-sync-id: 377471d9e8546d7c05a045286a6ef7c5277ded16
2015-11-19 13:34:31 -08:00
EwanThomas 2faf8632d3 UIRefreshControl added to scroll view
Summary: **What:**

adds `onRefreshStart` property to `ScrollView.js` for displaying and activating pull to refresh.

**Why:**

Javascript implementations seemed a little flakey and inconsistent.  As you can see in the issues below:

https://github.com/facebook/react-native/issues/2356
https://github.com/facebook/react-native/issues/745

So this is an attempt a completely native implementation.

What do you think?

![Image of dog](http://i.imgur.com/HcTQnzJ.gif)
Closes https://github.com/facebook/react-native/pull/4205

Reviewed By: svcscm

Differential Revision: D2674945

Pulled By: nicklockwood

fb-gh-sync-id: 65113a5db9785df5a95c68323c2cdf19f3b217b1
2015-11-19 11:15:48 -08:00
Martin Konicek 5950f8cf15 Update KnownIssues.md 2015-11-19 18:10:40 +00:00
dajomu 0bf7928ebe Added Subject to ActionSheetIOS share options and updated example
Summary: I've added a subject property to the ActionSheetIOS.showShareActionSheetWithOptions options object. This will allow users to set a subject for things like emails when they are sharing to them through the ActionSheetIOS.
Options are now as follows:
```
{
   url: 'https://code.facebook.com',
   message: 'message to go with the shared url',
   subject: 'a subject to go in the email heading',
}
```
Closes https://github.com/facebook/react-native/pull/4238

Reviewed By: svcscm

Differential Revision: D2674536

Pulled By: nicklockwood

fb-gh-sync-id: 3dfad39f94f19999233bf777253ef71b6e692a6d
2015-11-19 08:42:31 -08:00
Mike Armstrong 3e7db56445 Fix multiple calls to createReactContextInBackground
Reviewed By: astreet

Differential Revision: D2674440

fb-gh-sync-id: f842826516d2b03291ad0c4bf5c8dcbf8ec0f3a9
2015-11-19 08:20:26 -08:00
Quentin Valmori 7da42e3950 add allowsInlineMediaPlayback prop to play inline html5 video
Summary: Allow an html5 video to be played inline. (see #3112)
Closes https://github.com/facebook/react-native/pull/3137

Reviewed By: svcscm

Differential Revision: D2674318

Pulled By: nicklockwood

fb-gh-sync-id: cf71e4039c7027f1468370ae3ddef6eb3e2d2d4f
2015-11-19 07:11:29 -08:00
Mike Armstrong 2a9a5fc9e8 css layout systrace markers
Reviewed By: astreet

Differential Revision: D2668741

fb-gh-sync-id: 043ff740f8cc7c687a79c50c933db99ed67b60e4
2015-11-19 06:52:27 -08:00