Summary:
This PR will bump NDK APP_PLATFORM to android-16. Below is the excerpt from NDK documentation
> This variable contains the minimum Android platform version you want to support. For example, a value of android-15 specifies that your library uses APIs that are not available below Android 4.0.3 (API level 15) and can't be used on devices running a lower platform version. For a complete list of platform names and corresponding Android system images, see Android NDK Native APIs.
Closes https://github.com/facebook/react-native/pull/19830
Differential Revision: D8620017
Pulled By: hramos
fbshipit-source-id: 0b5578f130938e3ddae03fb855784193183243cf
Summary:
This will bump android build tools to 26.0.3, and will remove warning about newer version of build tools in Android Studio, thus improve developer experience.
Closes https://github.com/facebook/react-native/pull/19831
Differential Revision: D8620094
Pulled By: hramos
fbshipit-source-id: fa1c6739bb7556736c1b323acea88fe87e82f4d7
Summary:
Skylark parser will not allow access to file system other
than through `glob` and environment variables. The logic was also
making assumption about `buck-out` layout structure which is not
specified and as such is subject to change at any time without any
announcement.
Differential Revision: D8604721
fbshipit-source-id: 90826b4d5709580aad3092d0331d0e84e493c3b8
Summary:
Conditional `load`s are not allowed in Skylark. The logic
that belongs to different environments has to be part of environment
specific build defs and include as part of cell resolution or CI
configuration.
More context: https://buckbuild.com/concept/skylark.html
Differential Revision: D8604673
fbshipit-source-id: 385f2e155c4d80219e6ed3a2e0a82c909ebabb13
Summary: This is basic impl of <PerformanceLoggerFlag> component without any layout/mounting computation, just TTI.
Reviewed By: shergin, mdvacca
Differential Revision: D8598983
fbshipit-source-id: b938753d6396088735cbbeab26d69c9aaa45608e
Summary:
@public
It fixes a problem when some Views got disaper after they have non-zero opacity.
Reviewed By: mdvacca
Differential Revision: D8601600
fbshipit-source-id: 3da3ee591d4a685a8d7a56b15519d4d5cae4a031
Summary: This diff optimizes the delivery of onLayout event and re-lauout of views when ReactShadow nodes are updated. This only affects Fabric rendering.
Reviewed By: shergin
Differential Revision: D8601659
fbshipit-source-id: 3e33521e53170320ea952003fada5297a7605934
Summary:
@public
The current Fabric architecture, in general, does not support "subscribing" for events, so all kinds of events are always delivered no matter have JavaScript components `on`-handlers for them or not.
At this point, we are not sure should it be this way or not. But we are sure that for some extremely noisy events (like onLayout) we have to make an exception right now (otherwise overall performance will suffer).
So, this diff implements that for `onLayout`.
Reviewed By: fkgozali
Differential Revision: D8597408
fbshipit-source-id: 6933b7cb96e24f0660bd7850b625ff27e3146a2b
Summary:
@public
We have found that because of some bugs Mounting Manager can request creation of views with same tag several times (which should not happen).
Now, we can fail earlier in such cases.
Reviewed By: fkgozali
Differential Revision: D8585164
fbshipit-source-id: 63c6391de5adfe711552918a20a18396f54ec201
Summary:
@public
We do preventing cloning in UIManager especially to add a layer to Shadow Node source chain,
so apparently there is no point illuminate that by calling `shallowSourceNode`.
Reviewed By: fkgozali
Differential Revision: D8585163
fbshipit-source-id: 3743edc30bf2183c420fd79ce1e59d68ceaa278b
Summary:
@public
We need this to enable measuring, responder-chain management and another features powered by UIManager commands.
As soon we have Fabric specifc command-delivery pipeline this must be reverted.
Reviewed By: fkgozali
Differential Revision: D8552360
fbshipit-source-id: d56e12d38c32d8ad98cb230671bac1f35e87e647
Summary:
@public
We need this temporary for testing until we support them all.
Reviewed By: mdvacca
Differential Revision: D8552361
fbshipit-source-id: 25f48cebcf5a665a24b92803dd7738f947ca74b2
Summary:
@public
For now we only support trivial uniformed (all sides are equal) border rendering (which can be direclty mapped to CALayer features).
Support of the more complex and fancy borders is comming soon.
Reviewed By: mdvacca
Differential Revision: D8528923
fbshipit-source-id: 0883cdc2b855fc63d399e1a93010f259f0628f48
Summary:
@public
Another small but important piece of Accessibility Support.
Reviewed By: mdvacca
Differential Revision: D8528921
fbshipit-source-id: d4ba87bab702d76a90e9ddb751999193243cdc74
Summary:
@public
Trivial. It's also nice this we have a default encoding now.
Reviewed By: fkgozali
Differential Revision: D8528919
fbshipit-source-id: 0853eca828f22ead1a337fea3d7a2fc9a48e84c8
Summary: This diff checks if ReactShadowNode is sealed before updaing it.
Reviewed By: fkgozali
Differential Revision: D8584768
fbshipit-source-id: 64163d4bf124263d92153f68914c617f007fd90d
Summary: This diff introduces the concept of "Seal" ReactShadowNodes. This new field will be used to guarantee immutability of commited ReactShodow Nodes.
Reviewed By: fkgozali
Differential Revision: D8552709
fbshipit-source-id: dfd95730f10341af0dd762f8a8aa186563cf33e9
Summary: This diff cleans up the parent / owner references for children of ReactShadowNode / YogaNode during cloning. The reason of this behavior is to avoid retaining every generation of trees during cloning. This fixes a memory leak detected when running the ProgressBarExample.android.js in catalyst app
Reviewed By: fkgozali
Differential Revision: D8019894
fbshipit-source-id: b0d38f0c836ffec534f64fa1adbd7511ecf3473d
Summary:
This diff tries to fix an issue that started appearing in RN master when the latest metro version is used (more info here: c5ce762697 (commitcomment-29443117)).
The problem is that RN is still reading `projectRoots` from the Metro config and trying to call `concat()` on them. Latest Metro sets the default `projectRoots` to null, so this fails.
Also, a couple other things have been done:
* Make sure that the `projectRoot` and `watchFolder` objects from args are passed to Metro (so they contain the overrides from the CLI arguments).
* Add a `--projectRoot` CLI arg, replacing the `--root` one (this is not actually needed, since it does the same as `--watchFolders`
Differential Revision: D8567229
fbshipit-source-id: 3b76fd8e23d201a4097e9dfba3a512d64f348cb0
Summary:
@public
If some prop has `std::vector` type, it possible that on JS side we want to pass just one element of the array.
And in this case we sometimes drop array initialization (`[]`) part, so instead of passing `[{x:1, y:1}]` we pass `{x:1, y:1}`.
This diff adds support for that.
Reviewed By: mdvacca
Differential Revision: D8526572
fbshipit-source-id: 33d4369ac48cac3eb1c534f477d8259e76e0c547
Summary:
@public
This is iOS-specific implementation of <Image> view.
Not all props and features are supported yet.
Known issues:
- Animated GIFs;
- CA transitions during image appearance.
Reviewed By: mdvacca
Differential Revision: D8526570
fbshipit-source-id: a4b1dca583b139b8a09431565a79f051fae67a36
Summary:
@public
This diff implements basics of cross-platform part of <Image> component.
Known issues:
- Events does not work yet.
- Some quite specific image source parameters (like custom http headers) are not supported yet.
Reviewed By: fkgozali
Differential Revision: D8526575
fbshipit-source-id: ecc97d9fda2b2e65bb1b079af057f8e176a161e5
Summary:
@public
ImageManager coordinates all work related to loading image bitmaps for <Image> component.
The particular iOS implementation uses RCTImageLoader from RCTImage module under the hood.
Reviewed By: fkgozali
Differential Revision: D8526571
fbshipit-source-id: a0d927972d30113eed6e0cd169fceee17610181d
Summary:
@public
After reading about move-semantic and rvalue refs I realized that we (I) definitely overuse `auto &&` (aka universal reference) construction. Even if this is harmless, does not look good and idiomatic.
Whenever I used that from a semantical point of view I always meant "I need an alias for this" which is actually "read-only reference" which is `const auto &`.
This is also fit good to our policy where "everything is const (immutable) by default".
Hence I change that to how it should be.
Reviewed By: fkgozali
Differential Revision: D8475637
fbshipit-source-id: 0a691ededa0e798db8ffa053bff0f400913ab7b8
Summary:
@public
`ContextContainer` is general purpose DI container for Fabric.
We need this to communicate some enviroment-specific and/or platform-specific modules down to cross-platform C++ code.
The first one will be ImageManager. Soon.
Reviewed By: fkgozali
Differential Revision: D8475636
fbshipit-source-id: 0afc65063f818d0bab736cd2c55c6fdd21b629ac
Summary:
@public
This diff changes how we store and manage Yoga Config in layoutable shadow nodes.
Previously we have `shared_ptr` to single shared yoga config (one to many relationships); now we initiate and store yoga config with yoga node (one to one relationship).
Cons:
- Less memory efficient.
Pros:
- Much more flexible model. Configuration can be tweaked on a per-node basis.
- More performant. Dealing with `shared_ptr` is expensive because of atomic ref-counter. (This is not really applicable for the previous approach but would be applicable for any alternate approach where we want to have more granular control of the configuration.) Data locality is also great in the new model which should positively impact performance.
- Simplicity. Any alternate approach where we manage sets of nodes which share the same configuration is going to be quite complex.
Reviewed By: fkgozali
Differential Revision: D8475638
fbshipit-source-id: 5d73116718ced8e4b2d31d857bb9aac69eb69f2b
Summary:
@public
... and we initalize this in Surface.
We need this for requesting images with proper size/pixel-density, setup proper parameters for rasterizing CALayer's and rounding layout metric values.
Then we have to figure out how to wire this up with YGConfig.
Reviewed By: fkgozali
Differential Revision: D8475639
fbshipit-source-id: cec7af581b94efb4595dcf3f232252ce87a1fde3
Summary:
Added Smart Inversion Compatibility to Marketplace on iOS so that photos don't appear inverted
Added Property to View for Ignoring Color Inversion
Applied Property to Images on marketplace.
**Note: Android doesn't support smart inversion
Reviewed By: PeteTheHeat
Differential Revision: D8528543
fbshipit-source-id: 63caf592bc71e6fe9db7e70c72b56d32873be048
Summary:
@public
Added a property `accessibilityIgnoresInvertColors (boolean)` to Views which allows the Apple API `accessibilityIgnoresInvertColors` to be used in React Native.
Now, when a user has Display: Smart Invert enabled, you can set the property to be true, and things like photos and views with the property set to true will no longer be inverted when Smart Invert is enabled.
This property can also be applied to the Image Component.
Example Use Case:
```
<Image accessibilityIgnoresInvertColors={true} />
```
```
<View accessibilityIgnoresInvertColors={true} />
```
| Before | After |
| ------ | ----- |
| ![original](https://user-images.githubusercontent.com/165856/41738737-b62c6ebc-7547-11e8-8ea3-f82239998071.jpg) | ![feeditem](https://user-images.githubusercontent.com/165856/41738749-beef6de2-7547-11e8-9771-b44e513de0fd.jpg)
Reviewed By: PeteTheHeat
Differential Revision: D8549084
fbshipit-source-id: 82a3bc73c9e6d75d6b50ba013b88127f07692641
Summary:
@public
There are some race conditions between VM objects getting deallocated and the instanceHandle held by the eventEmitter can point to deallocated memory space, causing undefined behavior like a crash.
For now, keep a strong ref to the eventTarget inside EventEmitter to avoid that scenario. This is a temporary workaround.
Reviewed By: shergin
Differential Revision: D8576785
fbshipit-source-id: 87ef36f716270ceca906b32bb86e0046ceaca19e
Summary: This brings Image a bit more inline with the .ios.js counterpart.
Reviewed By: yungsters
Differential Revision: D8557495
fbshipit-source-id: 263da529d1a2541b0168745c0141c3fc622a1883
Summary: Need to test a potential issue with Animated.Image on Android. Adding a RNTester example to exercise it.
Reviewed By: yungsters
Differential Revision: D8559440
fbshipit-source-id: 4319d958de146c177cb0bd4b84679b773ce50833
Summary:
@public
This new version of metro replaces the `getProjectRoots()` config param by `getProjectRoot()` (which is used as the main folder for calculating relative paths of files, etc) and `getWatchFolders()` (which is used to know which files/folder to crawl when starting metro).
More info: 3bdf386d14
[skip-ci]
Reviewed By: yungsters, mmmulani
Differential Revision: D8538986
fbshipit-source-id: 2afc33950334a278364debb39f34ef0fe0535894