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
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
Summary:WRAP_CONTENT is not a valid size for MeasureSpec. While 0 is
a valid value size to pass to makeMeasureSpec, it's slightly cheaper to just
pass in 0 instead since makeMeasureSpec(0, UNSPECIFIED) is 0 anyway.
Differential Revision: D2968322
fb-gh-sync-id: 2ca0e27b12c1a8263800d96fec32127a4b967497
shipit-source-id: 2ca0e27b12c1a8263800d96fec32127a4b967497
Summary:Previously images that have exif orientation data would be cropped and the exif data
would be lost leading to us displaying pictures rotated in error.
Reviewed By: foghina
Differential Revision: D2971596
fb-gh-sync-id: 40f92e27089455259a7d8b83c92d0cf36367e5df
shipit-source-id: 40f92e27089455259a7d8b83c92d0cf36367e5df
Summary: Instead of dispatching calls to the JS thread in Java, do it in the C++ bridge. This moves us closer to the cxx bridge and will allow us to dispatch to the correct web worker in C++ instead of in Java
Reviewed By: mhorowitz
Differential Revision: D2954115
fb-gh-sync-id: 7e7d4eff2c72601b8b4416f1ccd8d2985aebd755
shipit-source-id: 7e7d4eff2c72601b8b4416f1ccd8d2985aebd755
Summary:build-break
Proguard was renaming MessageQueueThread interface methods that we reference from c++.
Differential Revision: D2960332
fb-gh-sync-id: 572dcd8a64e774f65c5abfb8cdf891efcb2bd591
shipit-source-id: 572dcd8a64e774f65c5abfb8cdf891efcb2bd591
Summary:I changed the technique used to hide the status bar and now it works properly. Also changed the way flags are set on the decorView to make sure it doesn't cause issues with other flags already set and fix deprecated Promise.reject
**Test plan**
Test using the UIExplorer StatusBar example, change the `hidden` prop value and go in and out of the app making sure the status bar has the right visibility.
Fixes#5991
Closes https://github.com/facebook/react-native/pull/6051
Differential Revision: D2960060
Pulled By: nicklockwood
fb-gh-sync-id: ee1c541896f5771d27cfd3ff18537edb6c017284
shipit-source-id: ee1c541896f5771d27cfd3ff18537edb6c017284
Summary:shame to astreet and glory circle ci
Closes https://github.com/facebook/react-native/pull/6038
Differential Revision: D2954377
fb-gh-sync-id: cda4f1e4d46c5a477756131a4c65a9430cd3cd95
shipit-source-id: cda4f1e4d46c5a477756131a4c65a9430cd3cd95
Summary: Now that web workers are just JSCExecutors, we can move forward with adding native module support. The means we need to supply the worker with a correct __fbBatchedBridgeConfig global so it can appropriately set up its JS MessageQueue. Unfortunately, native modules can't support multiple JS execution contexts out-of-the-box, so we need to whitelist those modules that actually can be referenced from a webworker. In order to do that, we add the supportsWebWorkers call in NativeModule and the SupportsWebWorkers annotation for JS modules. These add metadata to __fbBatchedBridgeConfig which allows us to create a new config with only those modules that support web workers.
Reviewed By: lexs
Differential Revision: D2927091
fb-gh-sync-id: 9b47331253b277940b552e7d899198b5f0a3ed8c
shipit-source-id: 9b47331253b277940b552e7d899198b5f0a3ed8c
Summary: Part of the plan to make web workers able to call native modules. We will reuse the infrastructure already present in JSCExecutor to allow web workers to call native modules via the Bridge.
Reviewed By: mhorowitz
Differential Revision: D2926896
fb-gh-sync-id: 259b766c46f79bbb5df9d1c648237b81fc1cc1f9
shipit-source-id: 259b766c46f79bbb5df9d1c648237b81fc1cc1f9
Summary:PR for https://github.com/facebook/react-native/issues/5958. The viewport meta tags if present, are overridden from the page and it is rendered according to the screen size. An example has been added in the Web View section of UIExplorer demo app.
Closes https://github.com/facebook/react-native/pull/6013
Differential Revision: D2953940
Pulled By: nicklockwood
fb-gh-sync-id: 012769f3a2a3f7dc942b60de02a9d1b80a27236e
shipit-source-id: 012769f3a2a3f7dc942b60de02a9d1b80a27236e
Summary:- modify ReactViewBackgroundDrawable.java to make each border a trapezoid
- disable anti-alias to eliminate white spaces between borders
- add examples to BorderExample.js (see last one)
Closes https://github.com/facebook/react-native/pull/5911
Differential Revision: D2953734
Pulled By: dmmiller
fb-gh-sync-id: dd103d80dec53ad35c9539ab1ceb93ef857feeb9
shipit-source-id: dd103d80dec53ad35c9539ab1ceb93ef857feeb9
Summary:Turns out we had two guides for the same thing.
Closes#6007
Reviewed By: mkonicek
Differential Revision:D2949234
Ninja: oss-only
fb-gh-sync-id: eda3a904ce8d8e7213a39021eb60b52449b20a43
shipit-source-id: eda3a904ce8d8e7213a39021eb60b52449b20a43
Summary:public
This adds the capability to get a View in absolute position on the screen, not just relative to the RootView. This is the Android implementation
Reviewed By: andreicoman11
Differential Revision: D2939170
fb-gh-sync-id: 658f1ebe6a458088f657a7469389add1a12222cd
shipit-source-id: 658f1ebe6a458088f657a7469389add1a12222cd
Summary:public
== cause ==
The follow block is error-prone.
```
for (ReactInstanceEventListener listener : mReactInstanceEventListeners) {
listener.onReactContextInitialized(reactContext);
}
```
Because calling `listener.onReactContextInitialized` may have side-effect that
removes the `listener` from `mReactInstanceEventListeners`, thus break the
iteration with exception.
I've found at least one place that has such side-effect
diffusion/FA/browse/master/java/com/facebook/fbreact/autoupdater/AutoUpdaterScheduler.java;9c09e5bbd411e093fb2ad022ee5d0ea473e9ebfe$32
The right way to fix this is to be side-effect proof.
Reviewed By: zahanm
Differential Revision: D2943494
fb-gh-sync-id: ba848ea736c5d2d0b8ef0b5a899603d734781361
shipit-source-id: ba848ea736c5d2d0b8ef0b5a899603d734781361
Summary:New prop `hitSlop` allows extending the touch area of Touchable components. This makes it easier to touch small buttons without needing to change your styles.
It takes `top`, `bottom`, `left`, and `right` same as the `pressRetentionOffset` prop. When a touch is moved, `hitSlop` is combined with `pressRetentionOffset` to determine how far the touch can move off the button before deactivating the button.
On Android I had to add a new file `ids.xml` to generate a unique ID to use for the tag where I store the `hitSlop` state. The iOS side is more straightforward.
terribleben worked on the iOS and JS parts of this diff.
Fixes#110
Closes https://github.com/facebook/react-native/pull/5720
Differential Revision: D2941671
Pulled By: androidtrunkagent
fb-gh-sync-id: 07e3eb8b6a36eebf76968fdaac3c6ac335603194
shipit-source-id: 07e3eb8b6a36eebf76968fdaac3c6ac335603194