Commit Graph

2190 Commits

Author SHA1 Message Date
Tao Huang 7e0b7ef8d0 Fix wrong error code when location service is turned off on Android device
Reviewed By: achen1

Differential Revision: D6106890

fbshipit-source-id: ab6ccdc2625745e4bbcdb0d7fe284de504d09641
2017-10-19 19:52:57 -07:00
Ramanpreet Nara 99d294bf3d Consider negative border radii and widths invalid
Reviewed By: achen1

Differential Revision: D5998369

fbshipit-source-id: d54302777f4eeb13f4521800130c17ac07f1b354
2017-10-19 18:08:25 -07:00
Ramanpreet Nara 00c9c1ad74 Implement direction-aware border clipping
Reviewed By: achen1

Differential Revision: D6015812

fbshipit-source-id: 406ddb12884a1c490cee784c6ef42322bd497b24
2017-10-18 19:33:33 -07:00
Ramanpreet Nara 875f273dba Implement border(Start|End)Color for rounded borders
Reviewed By: achen1

Differential Revision: D6014637

fbshipit-source-id: 33c10ec1f84075e0bb1c1f529aa7231497028380
2017-10-18 19:33:33 -07:00
Ramanpreet Nara 38c2c26d90 Implement rounded border(Start|End)Width
Reviewed By: achen1

Differential Revision: D6013412

fbshipit-source-id: e7aa7a3cd9e3ed72b25664efee59e42792098fbd
2017-10-18 19:33:33 -07:00
Ramanpreet Nara 1a7abcf526 Android: Implement border(Top|Bottom)(Start|End)Radius for RN
Reviewed By: achen1

Differential Revision: D5924734

fbshipit-source-id: 24759326064c11d2cd8948c7a710376ca9f41c63
2017-10-18 19:33:32 -07:00
Ramanpreet Nara 0f467a25ed Android: Implement border(Start|End)Color for RN non-rounded borders
Reviewed By: achen1

Differential Revision: D5921865

fbshipit-source-id: ed964291cba0c701de677c24c54f885cda78e7cc
2017-10-18 19:33:32 -07:00
Ramanpreet Nara 7ed7593b2b Android: Implement border(Start|End)Width for non-rounded borders
Reviewed By: achen1

Differential Revision: D5917755

fbshipit-source-id: 3ec0ab1a1e191f5f6fd956691995e95937a513cc
2017-10-18 19:33:32 -07:00
Ramanpreet Nara 04a8c62313 Android: Implement margin(Start|End) styles for RN
Reviewed By: achen1

Differential Revision: D5907651

fbshipit-source-id: 4df7583483e6f10b5433b9fa9d9345e00ccedd20
2017-10-18 19:33:32 -07:00
Ramanpreet Nara 1ed08d3c01 Android: Implement padding(Start|End) styles for RN
Reviewed By: AaaChiuuu

Differential Revision: D5907207

fbshipit-source-id: c9bb322f94d701463be35fb1ca92aab80f47d8ab
2017-10-18 19:33:31 -07:00
Ramanpreet Nara dc92e69867 Android: Forward RN start/end styles to Yoga
Reviewed By: AaaChiuuu

Differential Revision: D5906097

fbshipit-source-id: 79bd43ea54572eb612e781628551bccf5a4f948d
2017-10-18 19:33:31 -07:00
Ramanpreet Nara 98547d4bcf Implement gating support for direction-aware API changes
Reviewed By: achen1

Differential Revision: D6045083

fbshipit-source-id: 857a43029ad88d2324ec77145a1e30d92b5e8fae
2017-10-18 19:33:31 -07:00
Ramanpreet Nara f7888310d4 Implement border(Left|Right|Top|Bottom)Color for rounded borders
Reviewed By: achen1

Differential Revision: D6009609

fbshipit-source-id: 6a247a14aa48ac2edc637bf064216407a3a9a81f
2017-10-18 19:33:30 -07:00
Ramanpreet Nara 4994d6a389 Implement partial rounded borders
Reviewed By: achen1

Differential Revision: D5982241

fbshipit-source-id: 2f694daca7e1b16b5ff65f07c7d15dd558a4b7e8
2017-10-18 19:33:30 -07:00
Ramanpreet Nara de313f6fdd Fix border clipping
Reviewed By: achen1

Differential Revision: D5992045

fbshipit-source-id: fccd864dbc24592c3cd4df7300aca5096537e1d8
2017-10-18 19:33:30 -07:00
Alexey Lang 52a67db629 Fix Systrace section for Lazy View Managers
Differential Revision: D6088310

fbshipit-source-id: cf14c9cc91068cfabf4e7c1bbae5df7f25e0ced3
2017-10-18 12:18:12 -07:00
Andrew Chen (Eng) 91372e8f9a Add callback for UIImplementation layout updates
Differential Revision: D6063839

fbshipit-source-id: ae08fd2fc6c6365813b8077efe14990a0355a5c7
2017-10-17 07:47:12 -07:00
Andrew Chen (Eng) dc16150bae Expose ReactInstanceManager from ReactRootView
Reviewed By: AaaChiuuu

Differential Revision: D6051991

fbshipit-source-id: f175fc273895d7e9fedec73428d61395ae00649f
2017-10-17 04:31:03 -07:00
Max Sherman f3b117abd0 Un-revert logMarker for hermes diff
Reviewed By: mhorowitz

Differential Revision: D6051880

fbshipit-source-id: 0ce4bbed9ba8579033ee5397ff6c0975b6886fb1
2017-10-13 14:01:43 -07:00
Max Sherman e60a2d0a53 Revert D5939688: [hermes][rn] Share logPerfMarker with hermes
Differential Revision: D5939688

fbshipit-source-id: 37daeeaa01144472c26383106c88dd49bb99a37b
2017-10-12 19:21:42 -07:00
Max Sherman fe62da34a6 Share logPerfMarker with hermes
Reviewed By: mhorowitz

Differential Revision: D5939688

fbshipit-source-id: ab6a86eb66a3d9501b9b5a55b562b277b5ab0620
2017-10-12 15:33:04 -07:00
Janic Duplessis 2b4ff6ea19 Native Animated - Restore default values when removing props on Android
Summary:
Rebased version of #12842 that was reverted because of failing fb internal tests.
Closes https://github.com/facebook/react-native/pull/15919

Differential Revision: D5823956

Pulled By: hramos

fbshipit-source-id: 4ece19a403f5ebbe4829c4c26696ea0575ab1d0e
2017-10-12 13:11:00 -07:00
Valentin Shergin f2c6877b91 Fixed crash on attempt to update local data of deallocated shadow node
Summary:
Trivial.
That's okay that sometimes shadowNodes and views hierarchies have lack of synchonization.

Reviewed By: sahrens

Differential Revision: D6040022

fbshipit-source-id: 6b49a82317b620b66a87441719fddcafb1f27934
2017-10-12 09:46:29 -07:00
Michael Lee 7997a2b749 Fix platform flags to also check for linux
Reviewed By: danzimm

Differential Revision: D6036995

fbshipit-source-id: 98d7f19eb80b72090b26252864a6bd41a3295462
2017-10-12 09:16:40 -07:00
Peter Ruibal 752b68857c Add `visible-password` for TextInput.keyboardType on Android
Summary:
`visible-password` represents a very basic keyboard, typically only
letters and numbers.  Backed by InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD,
it is useful for things like password and code entry fields. It can also be more
effective than autoCorrect={false} for disabling autocompletion on some keyboards
(like Gboard).

Note `secureTextEntry` also affects `TYPE_TEXT_VARIATION_*` flags internally, so there
may be some undefined behavior when combining `secureTextEntry` with
`keyboardType="visible-password"`

Also, while here, improve the documentation on TextInput to explicitly enumerate
which keyboardType applies to Android vs. iOS (since this is the first android-specific)

Reviewed By: shergin

Differential Revision: D6005353

fbshipit-source-id: 13af90c96353f714c0e106dd0fde90184a476533
2017-10-10 18:18:34 -07:00
Dmitry Zakharov ca834f96af Fix scrolling events for RN.
Reviewed By: bvaughn

Differential Revision: D6020664

fbshipit-source-id: c9fb9069e9dcde298901ba2c03bacc8b646844d0
2017-10-10 11:08:40 -07:00
Nivetha Singara Vadivelu 9424cd7e8f Handling exceptions in video player
Reviewed By: furdei

Differential Revision: D5958119

fbshipit-source-id: 79b431a8422d60134890d44e99c358a07a5adc5b
2017-10-09 22:45:48 -07:00
Janis Peisenieks 7a7bdeec3e Omit all line terminators for ImageStore.getBase64ForTag
Summary:
FIX #11142

This fixes #11142 and supersedes #11155 as I was unsure how to add/change commits in that PR.

Wrote up a bunch of unit tests for the ImageStore module. The added tests showed that there was indeed a problem with the flags used for the Base64OutputStream, and they also show that that has been fixed now.
Closes https://github.com/facebook/react-native/pull/13856

Differential Revision: D6017764

Pulled By: shergin

fbshipit-source-id: adf667dc722ddfe31449afd8cd20a0a192eacff6
2017-10-09 22:16:20 -07:00
Janic Duplessis 0cd69e8a02 Run eslint --fix
Summary:
CI is currently failing because of a lint issue, this fixes it and a bunch of other warnings that are auto-fixable.

**Test plan**
Quick manual test, cosmetic changes only.
Closes https://github.com/facebook/react-native/pull/16229

Differential Revision: D6009748

Pulled By: TheSavior

fbshipit-source-id: cabd44fed99dd90bd0b35626492719c139c89f34
2017-10-09 17:46:44 -07:00
Yann Pringault 1c24440644 Add TimePicker modes
Summary:
In the spirit of #10932, I added the `mode` option to the `TimePicker` Android API.
There is only one mode available for **Android < 5**, the `spinner` one.
If we are on **Android >= 5** we can choose between `spinner` or `clock`. If we specify `default` it will use the default of the current Android version.

On **Android < 5**, whatever we choose it will be this:
![screen shot 2017-02-14 at 17 05 44](https://cloud.githubusercontent.com/assets/5436545/22937805/024ec67e-f2da-11e6-8b32-a680d9bc2247.png)

On **Android >= 5**, with the `spinner` mode:
![screen shot 2017-02-14 at 16 51 17](https://cloud.githubusercontent.com/assets/5436545/22937803/024e0bbc-f2da-11e6-9f4b-26102ff2eeac.png)

And with the `clock` mode, the default:
![screen shot 2017-02-14 at 16 51 02](https://cloud.githubusercontent.com/assets/5436545/22937804/024e64e0-f2da-11e6-9911-4135049f4726.png)
Closes https://github.com/facebook/react-native/pull/12384

Differential Revision: D6006689

Pulled By: hramos

fbshipit-source-id: fcd37c867c4061b9982b1687f2c10211e54df7cf
2017-10-08 12:38:45 -07:00
Max Sherman 790eabcdff Replace getInt with asInt in native collections
Reviewed By: mhorowitz

Differential Revision: D5904751

fbshipit-source-id: 995412196fd76ea60a65253719e49852322be6e6
2017-10-05 10:07:24 -07:00
Alex Dvornikov 9e01d72103 Unify supplimentary bundle path creation logic between Android and iOS
Differential Revision: D5941546

fbshipit-source-id: c9b8fab887f480faa373c26a1d5ba310e8acde78
2017-10-04 15:16:27 -07:00
Alexey Lang adde2ed5e9 Fix the debug logging regression
Reviewed By: AaaChiuuu

Differential Revision: D5975880

fbshipit-source-id: 39c632ddf84e57c814b54fac465651120e4127da
2017-10-04 15:04:53 -07:00
Ram N 0c234c90a2 Add error customizer for React Native Android
Reviewed By: achen1

Differential Revision: D5954205

fbshipit-source-id: 8b92bf1484a037b333a6f0f4aeddd39ffee25361
2017-10-04 14:06:35 -07:00
Andrew Chen (Eng) 7677af1d10 Litho UIImplementation
Reviewed By: marco-cova

Differential Revision: D5880274

fbshipit-source-id: e6741579d3de6090dea8d26cd07241d57adba84d
2017-10-04 08:31:04 -07:00
Paco Estevez Garcia ef2e29f54c Move URL escaping to Inspector layer
Reviewed By: Hypuk

Differential Revision: D5967544

fbshipit-source-id: d741e6324aff7583778cb13c862505b61ca02a3d
2017-10-04 03:51:33 -07:00
Karl Tarvas 59d9f8ca5e Fix Android 4.1-4.3 WebView source baseUrl bug
Summary:
Resolves https://github.com/facebook/react-native/issues/11753 and https://github.com/facebook/react-native/issues/9835.

Android versions 4.1-4.3 don't understand the MIME type `text/html; charset=utf-8` and default to `text/plain` instead, rendering the content as an unparsed HTML string. Since the encoding is already set and passed separately, removing it from the MIME type has no negative effects.

The same fix has already been discussed, successfully tested and incorporated in https://github.com/NativeScript/NativeScript/issues/1038.
Closes https://github.com/facebook/react-native/pull/13789

Differential Revision: D5971910

Pulled By: shergin

fbshipit-source-id: 07795bdf0f13ddb1e8eec779d1cad59244f3687e
2017-10-03 18:51:57 -07:00
Valentin Shergin cdea3c574b Fixed crash in ReactTextInputLocalData
Summary:
Motivation:

(SUDDENLY) There is a thing on Android called SpanWather, and their purpose is to notify "the watcher" about span-related changes in SpannableString. The idea is: some special kind of span can have some logic to prevent or tweak interleaving with some another kind of spans. To do so, it has to implement SpanWather interface.
So, EditText uses this to control internal spannable object (!) and SUDDENLY (#><) calls internal "layout" method as a reaction to adding new spans. So, when we are cloning SpannableString, we are (re)applying same span objects to a new spannable instance, and it causes notifying other spans in the string, and they notify EditText, and the EditText does relayout and... BOOM!
So, the solution is, easy, we should use SpannableStringBuilder instead of SpannableString because it does not notify SpanWather during cloning.

See:
https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/text/SpannableStringBuilder.java#101
(the first argument is `false`).
https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/text/SpannableStringBuilder.java#678
Compare with:
https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/text/SpannableStringInternal.java#43

Why? I believe because SpannableStringBuilder objects are "unfinished" by design, and documentation said: "it is the caller's responsibility to restore invariants [among spans]". As we do an exact clone of the string, that's perfectly okay to assume that all invariants were already satisfied for original string.

Reviewed By: achen1

Differential Revision: D5970940

fbshipit-source-id: 590ca0e3aede4470b809c7db527c5d55ddf5edb4
2017-10-03 17:37:45 -07:00
Aaron Chiu bbcfcdb8ed bring back box-none as layout only prop
Differential Revision: D5965540

fbshipit-source-id: a4a7b32a563674cf5f94e88390483763cf49d6da
2017-10-03 11:30:57 -07:00
Aaron Chiu 13d8375323 fix spelling in ReactInstanceManager
Reviewed By: kathryngray

Differential Revision: D5959860

fbshipit-source-id: 3d5358349fd6c0f9b8e57261914c945488684a96
2017-10-03 10:31:47 -07:00
Paco Estevez Garcia e7765a32f7 Fix DeviceIdentity on RN for Android
Reviewed By: Hypuk

Differential Revision: D5963912

fbshipit-source-id: 3959e5ab6af66512f0035efea7919572554e10b4
2017-10-03 08:07:41 -07:00
Paco Estevez Garcia da14fad829 Add AppIdentity and DeviceIdentity to Inspector
Reviewed By: Hypuk

Differential Revision: D5924011

fbshipit-source-id: a81d420dbe1a5ede203d2fa313548e19664b9587
2017-10-03 06:03:23 -07:00
Dmitry Zakharov 346af557c3 Fix regression in Java->C++->JS ViewManagers interaction.
Reviewed By: bvaughn

Differential Revision: D5953937

fbshipit-source-id: 8bc5dd8a483054ab9830ab653f2a3b41cad6c791
2017-10-03 05:30:42 -07:00
Aaron Chiu 6ba9ad8ece redo D5917111
Reviewed By: fkgozali

Differential Revision: D5962566

fbshipit-source-id: 5f92890a08b6e900b8d54f35c48e783166ce5897
2017-10-03 00:22:53 -07:00
Wenting Hu f368287347 reverting D5917111
Reviewed By: zjj010104

Differential Revision: D5961716

fbshipit-source-id: 0efaf38380b0b2e9440375ce0a7623a543f3fbd0
2017-10-02 20:03:37 -07:00
Valentin Shergin c550f27a4e Intrinsic content size for ReactTextInput (aka autoexpandable <TextInput> on Android)
Summary:
After this diff the intrinsic content size of <TextInput> reflects the size of text inside EditText,
it means that if there is no additional style constraints, <TextInput> will grow with containing text.
If you want to constraint minimum or maximum height, just do it via Yoga styling.

Reviewed By: achen1

Differential Revision: D5828366

fbshipit-source-id: eccd0cb4ccf724c7096c947332a64a0a1e402673
2017-10-02 16:31:18 -07:00
Valentin Shergin d0790fea39 Introducting `UIManager.setLocalData()`, the way to provide environmental data to ShadowNode
Summary:
In some cases we need a way to provide some peice of data to shadow node
to improve layout (or do something similar), `setLocalData` allows to do this.

Reviewed By: AaaChiuuu

Differential Revision: D5828368

fbshipit-source-id: bf6a04f460dc7695a16269426d365b78909bc8eb
2017-10-02 16:31:18 -07:00
David Vacca a5d1d25f56 BREAKING: Add interface for ReactShadowNode
Reviewed By: AaaChiuuu

Differential Revision: D5943137

fbshipit-source-id: 00950190e0256303d423ae86c6c18facf173ad6a
2017-10-02 09:08:28 -07:00
Aaron Chiu 30044fd531 fix overflow hidden
Reviewed By: shergin

Differential Revision: D5917111

fbshipit-source-id: e3d97f26b6aada199f700ec6659ace0d7dffd4c5
2017-09-29 18:19:54 -07:00
Aaron Chiu e7af72b29a make view hierarchy optimizer smarter
Reviewed By: shergin

Differential Revision: D5744725

fbshipit-source-id: 4042310494a2bbd3d3472485ad8496d592eb28ac
2017-09-29 18:19:54 -07:00