Commit Graph

3731 Commits

Author SHA1 Message Date
Valentin Shergin 5dbb3c586c Modern TextInput's render function for iOS
Reviewed By: sahrens

Differential Revision: D6690930

fbshipit-source-id: a6ce5f006b4e6d63feef0f9c0743fb19b0e546fa
2018-01-14 20:03:32 -08:00
Valentin Shergin a5af841d25 Prettier for View, Image and co.
Summary: Trivial beauty.

Reviewed By: sahrens

Differential Revision: D6715955

fbshipit-source-id: 3632750591f53d4673a2ce76309a0cc62946524d
2018-01-14 20:03:32 -08:00
Valentin Shergin bf9cabb03c Prettier for Text.js
Summary: Trivial.

Reviewed By: sahrens

Differential Revision: D6715229

fbshipit-source-id: 13ae84920c98e0d8e8f1b64aeadfa770b64ea3b4
2018-01-14 20:03:32 -08:00
Valentin Shergin e758cb7f39 Prettier for TextInput.js
Summary: Trivial.

Reviewed By: sahrens

Differential Revision: D6690929

fbshipit-source-id: 82906cd4a0eec320f998661ed48b9352b9b72670
2018-01-14 20:03:32 -08:00
Tim Yung 83ed9d170b RN: Create SyntheticEvent and ScrollEvent Types
Reviewed By: sahrens

Differential Revision: D6720478

fbshipit-source-id: b542bd50db7cd7085aecce8b986c6922bfb24a43
2018-01-14 10:46:20 -08:00
Semen Zhydenko d2c569795c Typos in comments and log messages
Summary:
No code changes, no testing required.

alligned -> aligned
allignment -> alignment
completly -> completely
conseptually -> conceptually
decendents -> descendants
indefinetly -> indefinitely
dimention -> dimension
doesnt -> doesn't
safegaurd -> safeguard
intialization -> initialization
hierachy -> hierarchy
happend -> happened
gaurd -> guard
programatically -> programmatically
initalized -> initialized
immidiately -> immediately
occured -> occurred
unkown -> unknown
neccessary -> necessary
neccesarily -> necessarily
occuring -> occurring
comoponent -> component
propogate -> propagate
recieved -> received
referece -> reference
perfomance -> performance
recieving -> receiving
subsquently -> subsequently
scoll -> scroll
suprisingly -> surprisingly
targetting -> targeting
tranform -> transform
symetrical -> symmetrical
wtih -> with
Closes https://github.com/facebook/react-native/pull/17578

Differential Revision: D6718791

Pulled By: shergin

fbshipit-source-id: 4ab79c1131ec5971d35a0c7199eba7ec0a0918ad
2018-01-12 22:18:45 -08:00
Spencer Ahrens cae7179c94 new feature to support smooth bi-directional content loading
Summary:
== Problem / Background ==

Most lists paginate in a single direction (standard infinite list), but some paginate in both directions. Most common example is a chat thread where new messages show up on the bottom, and old content can be loaded by scrolling up. Comment threads are another example.

Right now, adding content to the bottom of a scroll view is smooth - the content doesn't jump. But when adding to the top of the scrollview, the content gets pushed down, which is jarring (note this may appear reversed because of inverting the list which is common for chat applications).

== Approach ==

The basic idea is simple - we set a flag in JS, then for every uimanager transaction, we record which is the first eligible and visible view in the ScrollView, and compare it's new origin to the old one. If it has changed, we update the contentOffset of the ScrollView to compensate.

This is done by observing `willPerformMounting` directly (only from scrollviews that have this new property set), and then observing the prev state with prependUIBlock and making the update synchronously in addUIBlock to avoid any flicker.

There is also a way to skip views that we don't care about, like a spinner at the top of the view that we don't want to stay in place - we actually want it to get pushed up by the new content, replaced visually in the viewport.

== Notes ==

Most chat applications will probably want to do a scrollToTop when new content comes in and the user is already scrolled at or near the bottom.

This is glitchy if visible children are re-ordered, which could be fixed with additional logic, but it doesn't come up in the type of applications we're targetting here so punting on that.

== Test Plan ==

https://youtu.be/4GcqDGz9eOE

Reviewed By: shergin

Differential Revision: D6696921

fbshipit-source-id: 822e7dfcb207006cd1ba098356324ea81f619428
2018-01-12 19:16:00 -08:00
ngandhy 5c17db8352 re #17486 - set _locationManager if auth skipped
Summary:
This fixes #17486

make sure locationManager is being set before continuing.

Used if !locationManager vs else on previous statement as we should NEVER enter this code without _locationManager set. Also the else version might experience issues if someone touches the auth code and doesn't check this case, so seems more "long term stable".

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

This fixes #17486

1) Have a working geolocation demo
2) Add navigator.geolocation.setRNConfiguration({'skipPermissionRequests':true}); to your code. I added it to the constructor or componentWillMount for the app.
3) Observe that geolocation no longer works (times out)
4) Apply patch
5) Observe that geolocation works again

re #15096

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

[IOS] [BUGFIX] [GeoLocation] - Fix skipPermissionRequests by setting _locationManager
Closes https://github.com/facebook/react-native/pull/17487

Differential Revision: D6718389

Pulled By: hramos

fbshipit-source-id: 08c1c9306b4d87cc40acdaa1550bb6df8345db02
2018-01-12 19:00:36 -08:00
Sergei Dryganets 605a6e4031 CI for iOS fixed
Summary:
iOS TV CI is currently broken.

CI for both iOS and iOS TV successfully pass.
 [INTERNAL] Continous integration for iOS fixed.
Closes https://github.com/facebook/react-native/pull/17564

Differential Revision: D6711693

Pulled By: hramos

fbshipit-source-id: c36ffc2581dac69cb6e4f8670f21c2816496e9df
2018-01-12 07:46:17 -08:00
Hristo Hristov 2ae24361c5 iOS: Fix Crash when CameraRoll is getting assets from iCloud and no filename is provided. #13671
Summary:
RCTCameraRollManager.m crashes when there is no filename provided for the asset (usually from iCloud). #13671

Tested on real device with iCloud library using the library without and after my fix. It worked after my changes.

[IOS] [BUGFIX] [CameraRoll] - Changed the filename if nil to be empty when the asset is coming from iCloud.
Closes https://github.com/facebook/react-native/pull/17549

Differential Revision: D6710665

Pulled By: hramos

fbshipit-source-id: 319865b0a71728798c62ee380e7bee4af584b3e3
2018-01-12 00:16:07 -08:00
Valentin Shergin 2afe7d4765 Support for inherited events in view managers
Summary:
We currently support inherited view props but not event handlers,
this diff fixes it.
This change will allow to unify set of supported events for single- and multli-line <TextInput>s and avoid code duplication.

Reviewed By: sahrens

Differential Revision: D6690281

fbshipit-source-id: f142828bd7deae92fb306914b7cefd10da8b43f7
2018-01-11 19:04:14 -08:00
André Costa a580a44b0d Fix re-render case on SwipeableRow
Reviewed By: fred2028

Differential Revision: D6704625

fbshipit-source-id: 0305194a90f56d6fe5d37ebdddc5f7286c720378
2018-01-11 15:42:17 -08:00
Alexey Lang a9032a20ad Log query name for fetchRelayQuery
Reviewed By: yisun

Differential Revision: D6692869

fbshipit-source-id: 5484070be9995c5294197b0c2766690fd7accefa
2018-01-11 04:47:57 -08:00
ashoat a8f429d3a8 Add support for "thread-id" in PushNotificationIOS
Summary:
`thread-id` is an Apple-defined key. `PushNotificationIOS.getDeliveredNotifications()` includes it, but the notification object currently ignores it. Since it's in the `aps` key, it's impossible to access without this change, as `getData()` does not include it.
Closes https://github.com/facebook/react-native/pull/17499

Differential Revision: D6696577

Pulled By: shergin

fbshipit-source-id: e0f48efd640bf5addb24a8d4352f9bb23f42612a
2018-01-10 17:47:28 -08:00
Wenjing Wang 85bd98ecac Wrap textInput with KeyboardAvoidingView
Differential Revision: D6693570

fbshipit-source-id: f6946074d82cef2c68454bfc829c30013d19a151
2018-01-10 13:24:22 -08:00
Antonio Corrado ab972708a8 Add explicit componentControllerClass to CKComponent
Reviewed By: gkassabli

Differential Revision: D6675255

fbshipit-source-id: 761fea66bf8b5fb5e3d45792627afaaf2a407c97
2018-01-10 02:48:09 -08:00
Eli White 11a495cb32 Fixing eslint-comments warnings
Reviewed By: yungsters

Differential Revision: D6678252

fbshipit-source-id: ee93b7ee52520b750ca11fcc625cccf3cd82d075
2018-01-08 17:04:29 -08:00
Valentin Shergin 870bc4807a Yoga float vs. CoreGraphics float in RCTWrapper
Summary: See RCTYogaFloatFromCoreGraphicsFloat for more details.

Differential Revision: D6677092

fbshipit-source-id: ca1b2634c903277f529c57557055760a9bf48f28
2018-01-08 14:48:55 -08:00
Valentin Shergin c75612219e Proper implementation of [RCTWrapper sizeThatFits:]
Differential Revision: D6677097

fbshipit-source-id: 8ab3567cd6b0b23e89b8048d324b86700a01979b
2018-01-08 14:48:55 -08:00
Eli White 79902f99b8 Finish migration from jasmine to jest
Reviewed By: cpojer

Differential Revision: D6671373

fbshipit-source-id: e9570b9a9da6063576905719f7ffc5465cda737a
2018-01-08 14:17:55 -08:00
Eli White 183c316f4c Strengthen React Native eslint rules
Reviewed By: sahrens

Differential Revision: D6670469

fbshipit-source-id: f4f86fd0921eab3697c10caaba00934ba8adc2f6
2018-01-08 14:17:55 -08:00
glevi@fb.com 6b95c4fb14 @allow-large-files [Flow] Upgrade xplat/js to flow v0.63
Reviewed By: samwgoldman

Differential Revision: D6675320

fbshipit-source-id: 85575a6f30a50a3c40c6b46ba36f8cd33c091b1d
2018-01-08 12:49:53 -08:00
Valentin Shergin c491b22233 RCTBaseTextInputViewManager: new base class for TextInput view managers
Summary: Bunch or identical code was moved to superclass.

Reviewed By: mmmulani

Differential Revision: D6663772

fbshipit-source-id: 82321f56bbab0e9d17c0227c97dd86904cf5ab30
2018-01-07 18:31:20 -08:00
Tim Yung f71f4e7906 RN: Create TextProps (Flow for Text Props)
Reviewed By: sahrens

Differential Revision: D6669437

fbshipit-source-id: af8fb4534b4a6e0b76a34a6a7ef2087842056f3e
2018-01-05 23:30:22 -08:00
Tim Yung e3c6f38773 RNTester: Relax Bridge Release Check
Reviewed By: mmmulani

Differential Revision: D6665596

fbshipit-source-id: 2c59ea8add039d2bfc6b76701d16e82088fa8aad
2018-01-05 15:05:31 -08:00
Eli White 45e6fcdba0 Modernize ScrollResponder.js
Reviewed By: sahrens

Differential Revision: D6661084

fbshipit-source-id: 46cef96dc86842b379728d8465ce4feb408338c7
2018-01-05 12:46:40 -08:00
Michael S. Kazmier 33d710e8c5 adds --port option to `react-native run-ios` as well as patches port …
Summary:
The pull request adds the `--port` option to `run-ios` allowing a developer to build and launch a react-native app using a single command line like this:
```
react-native run-ios --port 8088
```

It defaults to the current port 8081.

This pull request fixes issue #9145 and issue #14113.

This patch also extends `run-android` to properly test and launch the packager with the specified port, extending the work done in PR:  ##15316

1. Create a new react-native app, or simply clone this branch and then update your version of react-native using `yarn add file:./path/to/this/fork/of/react-native`
2. run `react-native run-ios --port 8088`
3. watch the packager start on the desired port (8088 in this case) and watch your app in your simulator connect to the packager and launch the app.
Closes https://github.com/facebook/react-native/pull/16172

Differential Revision: D6612534

Pulled By: shergin

fbshipit-source-id: 50af449f5e4c32fb76ba95f4cb7bf179e35526d5
2018-01-04 20:11:10 -08:00
Josh Hargreaves c9ff0bc212 Implement onKeyPress Android
Summary:
This implements onKeyPress for Android on TextInputs and addresses https://github.com/facebook/react-native/issues/1882.
**N.B. that this PR has not yet addressed hardware keyboard inputs**, but doing will be fairly trivial. The main challenge was doing this for soft keyboard inputs.

I've tried to match the style as much as I could. Will happily make any suggested edits be they architectural or stylistic design (edit: and of course implementation), but hopefully this is a good first pass :).
I think important to test this on the most popular keyboard types; maybe different languages too.
I have not yet added tests to test implementation, but will be happy to do that also.

- Build & run RNTester project for Android and open TextInput.
- Enter keys into 'event handling' TextInput.
- Verify that keys you enter appear in onKeyPress below the text input
- Test with autocorrect off, on same input and validate that results are the same.

Below is a gif of PR in action.
![onkeypressandroid](https://user-images.githubusercontent.com/1807207/27512892-3f95c098-5949-11e7-9364-3ce9437f7bb9.gif)
Closes https://github.com/facebook/react-native/pull/14720

Differential Revision: D6661592

Pulled By: hramos

fbshipit-source-id: 5d53772dc2d127b002ea5fb84fa992934eb65a42
2018-01-04 12:51:38 -08:00
Jimmy Zhuang ddd65f1ba9 Support snapToInterval for horizontal scrollview on Android
Summary:
`snapToInterval` is available on iOS but on android yet. This PR is to add support for `snapToInterval` on android.

Example:

![android_snap](https://cloud.githubusercontent.com/assets/1699429/19086983/39d3ee1c-8a25-11e6-9c84-20f25a751f32.gif)

TO: lelandrichardson spikebrehm
Closes https://github.com/facebook/react-native/pull/10242

Differential Revision: D4168527

fbshipit-source-id: de3dd9ac5d9e0fddfce5e5bc0aa6a4f33f1e30b3
2018-01-03 10:33:07 -08:00
Matt Sessions a8391bde7d SectionList renderItem should be optional
Summary:
`renderItem` on `SectionList` is within the `OptionalProps` group of props but it is not actually marked as optional. Which means that doing things such as in the example where each section has its own `renderItem` and no `renderItem` prop is passed into `SectionList` will fail flow.

Create a `SectionList` where each section has it's own `renderItem` and do not pass in a `renderItem` into `SectionList`. Run flow, it should error.

[GENERAL] [MINOR] [SectionList] -Makes `renderItem` prop on `SectionList` optional for flow.
Closes https://github.com/facebook/react-native/pull/17262

Differential Revision: D6645672

Pulled By: hramos

fbshipit-source-id: 1096e8c4998c14003cf42f29ea559505082047c1
2017-12-29 14:26:08 -08:00
Jhen-Jie Hong fa574c6092 Set host of development server for setupDevtools
Summary:
Related to #15126, and this would be useful for use React DevTools on real device without modify `setupDevtools.js`.

In Android emulator, the host of `SourceCode.scriptURL` is same with `PlatformConstants.ServerHost` so we can just replace it.

* Tested on iOS device with [react-devtools](https://github.com/facebook/react-devtools/tree/master/packages/react-devtools) package.
* Tested on Android emulator, the `getDevServer` module got the correctly hostname so that don't need `adb reverse`.

[ENHANCEMENT] [setupDevtools] Set host of development server for setupDevtools
Closes https://github.com/facebook/react-native/pull/15547

Differential Revision: D6544980

Pulled By: javache

fbshipit-source-id: a286874bcef0501c5d2e0be2251d58c236a5534a
2017-12-29 07:55:41 -08:00
Mark Amery 52f350a9cb Add proptypes for scrollview drag start & end handlers
Summary:
`ScrollView` has a bunch of `onFoo` handlers for scrolling-related events, most of which have a proptype defined and are documented. However, `onScrollBeginDrag` and `onScrollEndDrag` do not currently have a proptype and are not currently documented (as noted at https://stackoverflow.com/a/41793747/1709587). It seems reasonable to bring consistency and to provide documentation of these otherwise hard-to-discover props.

I haven't added or run any tests, and don't plan to do so (beyond waiting and seeing that no existing checks fail in CircleCI).

I have also created a PR to update the documentation at https://github.com/facebook/react-native-website/pull/99

*(None needed; this isn't a functionality change.)*
Closes https://github.com/facebook/react-native/pull/17368

Differential Revision: D6642695

Pulled By: TheSavior

fbshipit-source-id: fa40ed2ae6d5947a161b816a47441d8f5d4d9c4d
2017-12-28 11:36:14 -08:00
Spencer Ahrens 4d33080f0f better Keyabord event utils
Reviewed By: shergin

Differential Revision: D6639418

fbshipit-source-id: ef973cfebb94325579525bdcd3990737fe576ef8
2017-12-28 09:05:51 -08:00
Logan Daniels 3559e42c55 Make sure VirtualizedList's windowSize is greater than 0
Summary:
Setting `windowSize = 0` doesn't make sense. Let's make sure we catch this problem in the constructor so that it doesn't cause inexplicable list behavior.

Also fixed an invariant in `VirtualizeUtils` that is meant to prohibit non-monotonically-increasing offset arrays. As written, the invariant condition can never actually be violated.

Reviewed By: sahrens

Differential Revision: D6625302

fbshipit-source-id: b2a983cbe7bb5fbe0aed7c5d59e69a8a00672993
2017-12-21 18:43:50 -08:00
Yujie Liu 489b98bf10 remove embeddedBundleURL
Reviewed By: fromcelticpark

Differential Revision: D6502049

fbshipit-source-id: 31a611cea4c017877c3ce2f7e9a3503723af4c2d
2017-12-21 12:02:32 -08:00
Valentin Shergin 19a9c5e41d The Great File Renaming in RCTText
Summary:
The previous file/class name convention seemed cool... but now it drives me BANANAS! It makes all this code really hard to maintain.
So, evething were renamed following common modern RN convention.

Reviewed By: mmmulani

Differential Revision: D6605090

fbshipit-source-id: 88ca13d793a5d2adaac2b7922ec6bd4654aacec5
2017-12-19 20:14:00 -08:00
Valentin Shergin 5c8481e836 Fixed black ARTSurfaceView
Summary:
If we draw using `drawRect:` with possible transparent pixels, we have to have `isOpaque = YES`.
https://developer.apple.com/documentation/uikit/uiview/1622622-isopaque

Differential Revision: D6609013

fbshipit-source-id: e483fd38b09c07e33b8b424d22c7a1adf81e6916
2017-12-19 19:46:06 -08:00
Logan Daniels a010a0cebd Fix virtualized cell keys for list headers and footers
Summary:
The change enabling virtualization in nested lists contained a hidden assumption that nested lists would only appear within the *cells* of a parent list.

If a list header or footer component contains a `VirtualizedList`, that child list won't be wrapped in a `CellRenderer` component and therefore won't have access to `virtualizedCellRenderer` through its context. This causes an error when the child list tries to access the `cellKey` property on an undefined object.

This change wraps the header/footer views in a `VirtualizedCellWrapper` component which supplies that context properly.

Reviewed By: sahrens

Differential Revision: D6603342

fbshipit-source-id: 4d2d82f04947048a16ec9968121d8ecc8c95655a
2017-12-19 13:46:49 -08:00
Pritesh Nandgaonkar f1055bcac8 Make YGNode as c++ struct with properties exposed through accessors
Reviewed By: emilsjolander

Differential Revision: D6592257

fbshipit-source-id: 641e8b9462ad00731a094511f9f5608b23a6bb21
2017-12-19 11:32:49 -08:00
Valentin Shergin 2679f3efb6 Demolishing of background color propagation infra
Summary: As it was mentioned in previous diffs, we are removing this because it overcomplicates rendering layer and provides (almost) no benefits (and cannot be implemented 100% accurate way).

Reviewed By: mmmulani

Differential Revision: D6582560

fbshipit-source-id: 0778db96a45dd8e2520268d5d00792677cb01a20
2017-12-19 09:11:49 -08:00
Spencer Ahrens 350377f57c Tweak FIGListItem layout
Reviewed By: yungsters

Differential Revision: D6586846

fbshipit-source-id: cf57c4e042868a053da2dfa959cd47c7b9241a24
2017-12-18 18:31:19 -08:00
Valentin Shergin dabb78b127 Removing <TextInput autoGrow={true}>
Summary:
`autoGrow` feature was/is totally awesome but... nowadays <TextInput> component is always autoexpandable (on both iOS and Android),
so we don't need JavaScript implementation of this anymore. Sometimes it is even harmfull (see T23403231).

I am sorry, sumkit. You are still awesome. :)

Reviewed By: sahrens

Differential Revision: D6553514

fbshipit-source-id: 1d24a2f2c046f514bd6b6318797a607b6e1841d0
2017-12-18 15:03:38 -08:00
Logan Daniels 2668dc8e1b Support virtualization and onViewableItemsChanged for nested, same-orientation VirtualizedLists
Reviewed By: sahrens

Differential Revision: D6330846

fbshipit-source-id: c555f4d449b75753befbd376dbf4e6fb4812fa75
2017-12-18 13:32:35 -08:00
Valentin Shergin c01a171ed8 Removing `inherited background color` optimization from ARTSurfaceView
Summary:
We are removing `reactSetInheritedBackgroundColor` feature because it overcomplicates RN rendering layer and provides very small benefits.
This is the last place where we are using `reactSetInheritedBackgroundColor`.

Reviewed By: mmmulani

Differential Revision: D6581599

fbshipit-source-id: 129997332a03daf927acdd174e5853bfd388332f
2017-12-18 11:47:26 -08:00
Spencer Ahrens 6ae0b344e5 Fix FIGTabs SST race
Reviewed By: TheSavior

Differential Revision: D6576053

fbshipit-source-id: d727811f7bfdb5cb9a0da010ee0c225029b18b26
2017-12-16 11:15:47 -08:00
Valentin Shergin 8c8944c10f Removing `inherited background color` optimization from RCTText
Summary:
This is a long story. Awhile ago awesome Nick Lockwood (Hey Nick!) introduced a special optimization for ReactNative rendering layer called "inherited background color".
He described this idea in D2811031:
>>>
Blending semitransparent pixels against their background is fairly a fairly expensive operation on mobile GPUs. To reduce blending, React Native has a system called "background color propagation", where the background color of parent views is automatically inherited by child views unless explicitly overridden. This means that translucent pixels can be blended directly against a known background color, avoiding the need to do this dynamically on the GPU.
In practice, this is only useful for views that do their own drawing, which is basically just <Image/> and <Text/> components, and for image components it only really matters when the image has an alpha component.
The automatic background propagation is a bit of a hack, and often does the wrong thing - for example if a view overflows its bounds, or if it overlaps a sibling, the background color will often be incorrect and need to be manually disabled. Because the only place that it provides a significant performance benefit is for text, this diff disables the behavior for everything except <Text/> nodes. It might still be useful for <Image/> nodes too, but looking through the examples in UIExplorer, the number of places where it does the wrong thing for images outnumbers the cases where it provides significant reduction in blending.

However. I think it is time to remove it. Why? There are several reasons:

* It drastically complicates rendering layer. DRASTICALLY. In many many unrelated places (try search for "backgroundColor"!);
* This mechanism is totally non-conceptual to RN and it prevents us to implement some new possible render optimization that we plan to do;
* This adopted only by two components now: Text and ART;
* This is not a significant performance drain anymore; from iOS 6 even UILabel has clear background color by default.
* I doubt that it even works now because `drawRect:` in Text component does not call super method.

So, this diff just turns this feature off for Text. If all performance metrics are neutral, I will delete this mechanism.
Peace.

Reviewed By: sahrens

Differential Revision: D6564199

fbshipit-source-id: 70524fdd955ca32bbf86d2d1ff5e73316b791219
2017-12-15 12:31:58 -08:00
Spencer Ahrens 5a1171ebfa Fix backgroundColor with TouchableHighlight
Reviewed By: blairvanderhoof

Differential Revision: D6575797

fbshipit-source-id: 913a5916def9719689917e83e917f44503b99a60
2017-12-14 21:20:17 -08:00
Sam Goldman 5f8d8e90c2 Switch to `declare module.exports` syntax
Reviewed By: gabelevi

Differential Revision: D6571796

fbshipit-source-id: 6a6d98b05953f40b825a260f44765689e91269a8
2017-12-14 16:31:14 -08:00
Yujie Liu 2fecbf6171 Add RCTLibraryPathForURL in RCTUtil
Reviewed By: fromcelticpark

Differential Revision: D6445626

fbshipit-source-id: aa37c87f019eea85d76365b6be919adfafc3c27a
2017-12-14 14:31:50 -08:00
Marc Horowitz ea2e2c54cb Make the __DEV__ argument check more robust
Summary: JSON.stringify will convert a function to null, but folly::dynamic in the native code can't represent a JS function. Props do sometimes have functions, but don't permit them everywhere.

Reviewed By: johnislarry

Differential Revision: D6541878

fbshipit-source-id: b2a9d3ba7899dfb98a6a2ada3aa91a26549fdd94
2017-12-14 11:17:39 -08:00