Commit Graph

2277 Commits

Author SHA1 Message Date
Valentin Shergin 1bd66d9aa9 RCTSurface: Calling `start` is now required to start the Surface
Summary:
So, it does not start itself automatically right after instantiation.
(Classic RCTSurface still kinda start itself automatically but only because start/stop concept is not implemented for this yet.)

Reviewed By: sahrens

Differential Revision: D13461294

fbshipit-source-id: 05430688f69a0d9bf75d03e6d25f02ccd5d3176a
2018-12-18 12:57:38 -08:00
David Aurelio ac94e54f5a Switch storage in `YGStyle` to `CompactValue`
Summary:
@public

Switches the storage in `facebook::yoga::detail::Values` from `YGValue` to `facebook::yoga::detail::CompactValue`.
This cuts heap size for arrays of values in half.

Reviewed By: SidharthGuglani

Differential Revision: D13465586

fbshipit-source-id: 49a4d6d29a73bdd44843b1f3c57bf746050c94d6
2018-12-18 08:15:09 -08:00
Kevin Gozali 54a6e1ad38 Surface: fixed up surface stage value check
Summary: Some logic to check for surface stage should've done bitwise `&` operation instead of equality check, because we do bitwise `|` whenever we "set stage".

Reviewed By: shergin

Differential Revision: D13459156

fbshipit-source-id: 94e2f5279fb1a31060beb7d6195953b25ce603c9
2018-12-13 16:52:30 -08:00
David Aurelio a56b67fa9b Inline `YGFloatOptional` completely
Summary:
@public
`YGFLoatOptional` only contains trivial functionality. Make it header-only.

Reviewed By: SidharthGuglani

Differential Revision: D13439609

fbshipit-source-id: 3f3c6c3a15e05ac55da2af30eb629f786ecb90a9
2018-12-13 07:16:45 -08:00
David Aurelio b5c66a3fbe Move out `YGValue`
Summary:
@public

Creates a single header file for `YGValue`. This is in preparation of a more compact representation of `YGValue` within `YGStyle`.

Also fixes the incorrect definition of NAN.

Reviewed By: SidharthGuglani

Differential Revision: D13439602

fbshipit-source-id: 68eef2c391b6c9810f3c995b86fff7204ebe6511
2018-12-13 07:16:45 -08:00
Birkir Rafn Guðjónsson ba9c208cdf Support additional UIBarStyle's in RCTConvert (#20102)
Summary:
Adds two additional UIBarStyles to RCTConvert

- [x] UIBarStyleBlackOpaque
- [x] UIBarStyleBlackTranslucent

Does not affect any tests or current usage of this conversion.
Pull Request resolved: https://github.com/facebook/react-native/pull/20102

Differential Revision: D13421942

Pulled By: hramos

fbshipit-source-id: 1e609eca0fdea2b56b9f6ac87e759c661bdee12b
2018-12-11 17:43:24 -08:00
Kevin Gozali 2918679479 iOS: ignore extra modules during bridge start up if it's marked for TurboModule
Summary: Currently, bridge delegate can provide extra modules during bridge start up path. For TurboModules, we don't need this mechanism (if we need eager init, it will be done in a different way). So, let's ignore modules marked as RCTTurboModule if they are supplied as "extra native modules".

Reviewed By: axe-fb

Differential Revision: D13383710

fbshipit-source-id: c88d32739be9f66e0daf07ef5465ea6457f8d1c6
2018-12-11 00:00:56 -08:00
David Aurelio 90f582ffb9 Back out Stack D13119110..D13236159
Summary: backout, causes failures

Reviewed By: adityasharat

Differential Revision: D13376210

fbshipit-source-id: 1fa8823f2dce601c47738f34ddb2674288197e79
2018-12-07 13:01:28 -08:00
Zack Sheppard 2831d9ef61 Extend reason message for `RCTFatalException` (#22532)
Summary:
Fixes #22530

As described in the issue, the previous behavior for the `RCTFatal` macro was to truncate the `reason` on the resulting `NSException` to 75 characters. This would ensure the reason would fit on a single line, but resulted in issues debugging errors that occurred in the wild, as many crash logging tools (like Sentry) discard the `name` value of the exception and use the `reason` as their primary identifier. At 75 characters, useful information like the location of the error would usually be truncated.

- [x] This extends the truncation threshold to 175 characters, which should be short enough to prevent full-screen-takeover length errors, but long enough to provide useful context to the error.
- [x] This adds a `userInfo` value to the resulting `NSException`. It copies over the `userInfo` from the `NSError` passed to the macro, and adds an "untruncated message" value that contains the untruncated version of the `NSException`'s reason.

[iOS] [Changed] - RCTFatalExceptions now include more information in their reason and a userInfo.

<!--

  CATEGORY may be:

  - [General]
  - [iOS]
  - [Android]

  TYPE may be:

  - [Added] for new features.
  - [Changed] for changes in existing functionality.
  - [Deprecated] for soon-to-be removed features.
  - [Removed] for now removed features.
  - [Fixed] for any bug fixes.
  - [Security] in case of vulnerabilities.

  For more detail, see https://keepachangelog.com/en/1.0.0/#how

  MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

  EXAMPLES:

  [General] [Added] - Add snapToOffsets prop to ScrollView component
  [General] [Fixed] - Fix various issues in snapToInterval on ScrollView component
  [iOS] [Fixed] - Fix crash in RCTImagePicker

-->
Pull Request resolved: https://github.com/facebook/react-native/pull/22532

Differential Revision: D13373469

Pulled By: cpojer

fbshipit-source-id: ac140d14ce76e1664869437c2c178bdd65ab6e0e
2018-12-06 20:22:25 -08:00
Doug Russell ee7c702308 Accessibility Escape
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/22047

Differential Revision: D13146179

Pulled By: cpojer

fbshipit-source-id: b8a089114a5deafee47dd482e484d413c8c39137
2018-12-06 19:44:21 -08:00
David Aurelio ceb6602422 Inline `YGFloatOptional` completely
Summary:
@public
`YGFLoatOptional` only contains trivial functionality. Make it header-only.

Reviewed By: SidharthGuglani

Differential Revision: D13209151

fbshipit-source-id: 3ecca015fa0ac6644ae694b44bc53d840fbc5635
2018-12-06 07:38:43 -08:00
David Aurelio c37826a933 Move out `YGValue`
Summary:
@public

Creates a single header file for `YGValue`. This is in preparation of a more compact representation of `YGValue` within `YGStyle`.

Also fixes the incorrect definition of NAN.

Reviewed By: SidharthGuglani

Differential Revision: D13172444

fbshipit-source-id: 4250dbcf8fe15ec3ecdee3913360a73bab633ce3
2018-12-06 07:38:43 -08:00
Kevin Gozali 3b6f229eb9 xplat: added ReactNativeConfig to access runtime specific config values
Summary: Each app may provide different impl for its runtime specific behaviors, then Fabric and other new infra can share the same config instance to configure stuffs.

Reviewed By: sahrens

Differential Revision: D13290319

fbshipit-source-id: 30e3eeedc6ff6ef250ed233b27e38cb7c1062b55
2018-12-05 15:03:27 -08:00
ifsnow c45d290b07 Fixed for supporting mediaPlaybackRequiresUserAction under iOS 10. (#22208)
Summary:
There is a problem that the `mediaPlaybackRequiresUserAction` property does not work in WKWebView(`useWebKit`) under iOS 10.

I fully know you are currently working to migrate the core's WebView to the standalone `react-native-webview` project. This has already been submitted to PR in `react-native-webview` and will be merged soon. I hope this fix applies to `react-native` before your migration is done.
Pull Request resolved: https://github.com/facebook/react-native/pull/22208

Differential Revision: D13334868

Pulled By: cpojer

fbshipit-source-id: f2a811a477054155ed5fe62ab31e4d63f70e7848
2018-12-04 20:46:42 -08:00
Marc Horowitz 99c370959a Don't create the JSCRuntime until createJSExecutor() is called.
Summary:
This avoids an intermittent reentrancy bug in JSC on iOS 11
(https://bugs.webkit.org/show_bug.cgi?id=186827).  It also makes the
code more consistent with android.

Reviewed By: amnn

Differential Revision: D13313265

fbshipit-source-id: f42476b2f660e127ecfc9c72584554817eea1010
2018-12-04 12:01:59 -08:00
David Aurelio dac29e8392 fixup xcode project
Summary:
@public

Add YGMarker files to XCode project

Reviewed By: SidharthGuglani

Differential Revision: D13255283

fbshipit-source-id: 2035111cca6f0e5265a4ebe99eee701af4eff51e
2018-11-29 11:14:05 -08:00
Valentin Shergin 585f7b916d Summary:
Calling -[UIScrollView setContentOffset] with NaN values can cause a crash. That's not clear why exactly the computation returns NaN sometime, but the implemented sanitizing should help to detect this problem during development (and this also prevents the app from crashing).

See attached task for more details.

Reviewed By: fkgozali

Differential Revision: D13242729

fbshipit-source-id: 747bf1b42e02597e9f1300eee24547563ab29b27
2018-11-28 17:29:30 -08:00
Valentin Shergin 62173a1569 Introducing `fabric/mounting` module
Summary:
ShadowView, ShadowViewMutation, and Differentiator were decoupled to separate module.
That enables us to use ShadowView more widely without facing a circular dependency problem.

Reviewed By: mdvacca

Differential Revision: D13205229

fbshipit-source-id: 7373864bf153a7813c2f97edb263a41454ce0b88
2018-11-27 18:34:14 -08:00
Peter Argany 18f3de9dce Allow init of Native Module before bridge is initialized [2/N]
Summary:
This may be controversial.

Right now, RelayPrefetcher is initialized [here](https://fburl.com/p01iunr1), after bridge is initialized. I want to create a FBRelayPrefetcherModule instance eagerly (diff 3 in stack), and then pass that into the bridge module registry. This way, native side gets to use RelayPrefetcher before bridge is init, and JS still accesses the same instance of FBRelayPrefetcherModule.

The only other option is drastically change bridge init, to allow passing in some eagerly initialized instances.

Reviewed By: shergin

Differential Revision: D13164277

fbshipit-source-id: b45111cd68d78820e61e4fca7e54a7e8df32a3f0
2018-11-26 17:28:11 -08:00
Valentin Shergin e61a14e71d Fabric: RCTWeakEventEmitterWrapper, NSAttributedString and co.
Summary:
Previously, we stored a pointer to ShadowNode inside NSAttributedString's attributes to make possible retrieving an EventEmitter associated with some text fragment.
That worked fine besides only one caveat: the internal implementation of NSAttributedString is quite strange and that causes a memory leak. Because of some reason, NSAttributedString does not release stored attributes after own destruction (maybe OS uses some kind of caching).
So, now, instead of storing a strong pointer to ShadowNode inside NSAttributedString, we store a weak pointer to EventEmitter. Storing a weak pointer is okay because a desired lifetime of EventEmitter is guaranteed by LocalData stored inside a View. Storing a weak EventEmitter instead of weak ShadowNode will also help us with migration to ShadowView (we cannot store ShadowView weakly because it's a stack allocated object).

Reviewed By: sahrens

Differential Revision: D13196886

fbshipit-source-id: f8714e4b3709765629d6456edf0c635bf5f7c53b
2018-11-26 13:51:19 -08:00
Valentin Shergin 215a0f0f21 Fabric: Proper implementation -[RCTParagraphComponentView prepareForRecycle]`
Summary: Over-retaining a LocalData object inside the View can cause a crash during tearing down JS VM because LocalData can indirectly retain EventEmitter objects which were not properly "disabled".

Reviewed By: sahrens

Differential Revision: D13196887

fbshipit-source-id: 001d9fadf775c89f750c84fe8da9b84d4636631c
2018-11-26 13:51:19 -08:00
Valentin Shergin ffd2409172 Fabric: Proper implementation of -[RCTViewComponentView prepareForRecycle]
Summary: RCTViewComponentView retains an EventEmitter, so we have to clear this up after we recyled the view.

Reviewed By: sahrens

Differential Revision: D13196884

fbshipit-source-id: e9f2e2400be864c5c6177227255012101ed8c4d1
2018-11-26 13:51:19 -08:00
Radek Czemerys 287934dba9 Fix Xcode 10 builds (broken by folly upgrade) (#22394)
Summary:
[Folly upgrade](a70625abd7) introduced changes that have to be applied to `Install Third Party` script in order to use `New build system` from Xcode 10. Unfortunately, this might happen again if someone changes folly. Also removes non-existent files from folly podspec.
Pull Request resolved: https://github.com/facebook/react-native/pull/22394

Differential Revision: D13192463

Pulled By: hramos

fbshipit-source-id: ea0eeb6e1e7f6d7dfcdb6d1dee28b1a640ee7097
2018-11-26 01:41:15 -08:00
Valentin Shergin c68e69cb67 Fabric: Proper handling of memory pressure event in RCTComponentViewRegistry
Summary: View recycling can be pretty aggressive and memory intensive, so we can properly react on system memory-pressure notification.

Reviewed By: mdvacca

Differential Revision: D13176278

fbshipit-source-id: 38ea1b27da988aeaaa5db6ac0b94389a0bd2799e
2018-11-25 22:17:30 -08:00
Valentin Shergin cd5f0bd95c Fabric: Stopping creating ShadowView instances for non-View ShadowNodes
Summary:
Apparently, the previous behavior brings more problems than some *possible-in-the-future* features and flexibility.
The new model allows us to easily implement "nested text" feature.

(We temporary hope the old behavious for Android only for compatibility reasons.)

Reviewed By: mdvacca

Differential Revision: D13176277

fbshipit-source-id: 01f7bfb3c2e70cc89d76ecb78add016ee91cbd63
2018-11-25 22:17:30 -08:00
Valentin Shergin e581977b51 Introducing RCTComponentViewFactory
Summary:
The whole mounting iOS infra now uses `ComponentHandle` instead of `std::string` as a reference to particular `ComponentView` implementation. All changes are pretty straightforward, we use a different thing/type to refer to the particular class; no changes in the logic besides a new `RCTComponentViewFactory` that serves the same role of classes registry as Objective-C runtime served previously.
That has several benefits:
* It should be slightly faster, mostly because we don't need to convert `char *` strings to `std::string` and then to `NSString *`.
* We don't need string-based component-name maps anymore (at least on this layer). We can call classes as we want and it will work because of classes are now explicit about which ShadowNodes they are compatible with.
* Most importantly, it's explicit now! That means that no runtime magic is involved anymore and we can rely on static linting tool now and not be afraid of improper code stripping/overoptimization.

Reviewed By: mdvacca

Differential Revision: D13130760

fbshipit-source-id: aadf70525a1335b96992443abae4da359efdc829
2018-11-25 22:17:30 -08:00
Valentin Shergin eef3df86fb Fabric: Introducing `-[RCTComponentViewProtocol componentHandle]`
Summary: The new method in the protocol enforces view component classes to expose a component handle of the component that the view component represents. That will allow us to wire up those classes with shadow views in runtime explicitly and in a much more performant way than it is now.

Reviewed By: mdvacca

Differential Revision: D13114663

fbshipit-source-id: 853187d978aab200f85719d9c1d9fea2e3ad4e55
2018-11-25 22:17:30 -08:00
Lee Howes 1f32b5d1da then to thenValue changes to allow deletion of value-taking continuation form of then
Summary: Future::then taking a value-taking function is deprecated and being deleted. This cleans up a few more callsites.

Reviewed By: yfeldblum, shergin

Differential Revision: D13163277

fbshipit-source-id: 98d1f78c5b34ca34603cc24d79157a4718573576
2018-11-21 17:12:19 -08:00
Kevin Gozali aad83cc238 iOS TM: RCTEnableJSINativeModule => RCTEnableTurboModule
Summary: Leftover name change from previous codemod.

Reviewed By: shergin

Differential Revision: D13117615

fbshipit-source-id: 2584a2a90d3db6ed9a9e9cb8727c51da34f0927c
2018-11-20 01:20:59 -08:00
Adam Comella 70826dbafc iOS: Support inline view truncation (#21456)
Summary:
If text is truncated and an inline view appears after the truncation point, the user should not see the inline view. Instead, we have a bug such that the inline view is always visible at the end of the visible text.

This commit fixes this by marking the inline view as hidden if it appears after the truncation point.

This appears to be a regression. React Native used to have logic similar to what this commit is adding: 1e2a924ba6/Libraries/Text/RCTShadowText.m (L186-L192)

**Before fix**

Inline view (blue square) is visible even though it appears after the truncation point:

![image](https://user-images.githubusercontent.com/199935/46382038-d3a71200-c65d-11e8-8179-2ce4aad8d010.png)

The full text being rendered was:

```
<Text numberOfLines={1}>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
  sed do eiusmod tempor incididunt ut labore et dolore magna
  <View style={{width: 50, height: 50, backgroundColor: 'steelblue'}} />
</Text>
```

**After fix**

Inline view is properly truncated:

![image](https://user-images.githubusercontent.com/199935/46382067-fdf8cf80-c65d-11e8-84ea-e2b71c229dae.png)

**Test Plan**

Tested that the inline view is hidden if it appears after the truncation point when `numberOfLines` is 1 and 2. Similarly, verified that the inline view is visible if it appears before the truncation point.

**Release Notes**

[IOS] [BUGFIX] [Text] - Fix case where inline view is visible even though it should have been truncated

Adam Comella
Microsoft Corp.
Pull Request resolved: https://github.com/facebook/react-native/pull/21456

Differential Revision: D10182991

Pulled By: shergin

fbshipit-source-id: a5bddddb1bb8672b61d4feaa04013a92c8224155
2018-11-20 00:11:56 -08:00
Karan Thakkar 1fa56a0ac4 Rename requiresMainThreadSetup -> requiresMainQueueSetup in code comment (#22328)
Summary:
Update reference to property in code comment in `RCTBridgeModule`. There is no such thing as `requiresMainThreadSetup` in the codebase. Its called `requiresMainQueueSetup` now.
Pull Request resolved: https://github.com/facebook/react-native/pull/22328

Differential Revision: D13115352

Pulled By: shergin

fbshipit-source-id: 511d627388b51029821c4b1ddf4caac30e573040
2018-11-17 21:43:07 -08:00
Valentin Shergin 346c9d5f2c Surface: Using screen size as a default maximum size of Fabric Surface
Summary: That's a temporary change that useful only while we don't have deeper/proper intergration with UIKit's navigation infra.

Reviewed By: mdvacca

Differential Revision: D13104172

fbshipit-source-id: 024e71e04470d56d2c5e9b3f6c3392555ce50b63
2018-11-17 11:43:25 -08:00
Valentin Shergin 560652cfe8 Fabric: Proper implementation `-[RCTSurfaceTouchHandler reset]`
Summary:
Apparently, if a gesture recognizer got 'reset', OS does not call `touchesCancelled:` method, so we have to do it manually.
To implement this we have to split `_dispatchTouches:eventType:` into two methods: the first converts Objective-C touches to C++ touches, the second consumes that. We have to do this because during reset we don't have a collection of UIKit touches.

Reviewed By: mdvacca

Differential Revision: D13072807

fbshipit-source-id: 677e2febf9f96dcdfaadfadf5b9ab3893f93e796
2018-11-16 18:44:36 -08:00
Valentin Shergin 868406dbec Fabric: Using non-mutating `at` instead of `[]` for `-[RCTSurfaceTouchHandler _activeTouches]`
Summary: Every C++ engineer (except me several months ago) knows that `operator []` can mutate the collection (Yeah! Don't ask), so this is especially dangerous if your hash function is broken (see the previous diff).

Reviewed By: mdvacca

Differential Revision: D13072805

fbshipit-source-id: 4436a8ff12fb27a57bfb6ee0ff986d7a9a825549
2018-11-16 18:44:35 -08:00
Valentin Shergin 1de79e12e1 Fabric: Fixed bug in RCTSurfaceTouchHandler::PointerHasher
Summary:
Without this fix the PointerHasher hashed not a pointer, but an address where the pointer is stored, which is obviously incorrect.
The incorrect hash function compromised the whole `_activeTouches` caused many issues with logically invalid invariants (e.g. removing element from the collection silently didn't work).

Reviewed By: mdvacca

Differential Revision: D13072804

fbshipit-source-id: d68289e940fe21e2df08a31439619b7e2fe0fa13
2018-11-16 18:44:35 -08:00
Jason Hu 8911353c47 create api to allow clients to present a client credential for authentication (#22316)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/22316

Pull Request resolved: https://github.com/facebook/react-native/pull/22315

In order for TLS Mutual Auth to work for webviews, the caller must present a credential. Expose a setter that can be called to set a credential.

Reviewed By: RSNara

Differential Revision: D13095969

fbshipit-source-id: d136556a0030f799651d574b6e47ce38295b108e
2018-11-16 18:44:35 -08:00
Valentin Shergin 271ace9e91 Defining explicit clang-format for Objective-C part of React Native
Summary:
Now, Objective-C part of RN is in `xplat` directory, so global Objective-C clang-format does not affect that.
Explicit clang-format is also useful for external contributors who don't have access to the rest of monorepo.
The actual rules are copy-paste from ReactCommon folder with small changes (like 120 characters max line length) that conform to regular Facebook code style and which make sense only for Objective-C.

Reviewed By: fkgozali

Differential Revision: D13093150

fbshipit-source-id: 79d64b4fba6eeb94e9b8d87ef9c3f86b3a5ed94e
2018-11-15 20:28:14 -08:00
Kevin Gozali 39b8fa95a3 iOS TM: Rename RCTJSINativeModule => RCTTurboModule
Summary: Simple codemod to rename RCTJSINativeModule => RCTTurboModule (the protocol) for less confusion.

Reviewed By: PeteTheHeat

Differential Revision: D13054206

fbshipit-source-id: 4829dc69838c623336475ea8ee11be815d79711c
2018-11-14 10:42:04 -08:00
Kevin Gozali d7a0c44590 iOS: add moduleForNameForcedLoad: to lookup modules by name and force load them
Summary:
Some module classes may not be loaded yet, so looking up via classes may not always give the correct instance. This diff added a new lookup method that delegate to the bridge delegate to force load the modules as needed.

The existing moduleForName: method was left untouched because it's solely used by RCTUIManager at the moment.

Reviewed By: dshahidehpour

Differential Revision: D13033876

fbshipit-source-id: 4082fcd68498004f678b4b95adc82b5b134fefdf
2018-11-13 20:11:47 -08:00
David Vacca 33b966139e Avoid pre-allocating views for non-layoutable shadow nodes
Summary: This diff changes the behavior of the Scheduler.schedulerDidRequestPreliminaryViewAllocation to avoid pre-allocating views that are non-layoutables

Reviewed By: shergin

Differential Revision: D12962008

fbshipit-source-id: cb2670beafdcbd2116fbdaf2dc5d1b4726330ec2
2018-11-11 15:21:49 -08:00
Valentin Shergin 94d49e544d Fabric: Codemod: All `<fabric/...` includes were renamed to `<react/...`
Summary: We are moving to more stable APIs removing all mentiones of the effort name from the codebase.

Reviewed By: mdvacca

Differential Revision: D12912894

fbshipit-source-id: 4a0c6b9e7454b8b14e62d419e9e9311dc0c56e7a
2018-11-10 14:22:15 -08:00
Peter Argany 188cbb04ad Reset module registry flag when resetting React Instance
Summary:
D12911108 fixed a UBN race condition by adding a flag for module registry.

This flag was never reset if react instance gets reset, causing an assert to fire in IG.

Reviewed By: fkgozali

Differential Revision: D13010651

fbshipit-source-id: e20453f3c546d759a58fd7fb93553f774410905f
2018-11-09 17:14:02 -08:00
Kevin Gozali 80f92adf1f iOS: ignore double registration of lazy modules with chrome attached
Summary: Depending on when Chrome debugger is attached, modules may get double registered. Simply ignore it for this case. The redbox was not a fatal error, which can be dismissed.

Reviewed By: shergin

Differential Revision: D12996107

fbshipit-source-id: 292f63102337077848842ca46b3daed08b1cae12
2018-11-09 11:39:06 -08:00
Mehdi Mulani d7865ebde8 Add another guard to lazilyLoadView
Summary:
it's possible that moduleForName won't return anything, so we should return.

Created from Diffusion's 'Open in Editor' feature.

Reviewed By: spredolac

Differential Revision: D12963342

fbshipit-source-id: c059595a68bfcaa38221e05fb62d70cc29887ca7
2018-11-09 11:25:13 -08:00
Valentin Shergin d6236796b2 `Removing UIManager.measureViewsInRect()`
Summary:
It does not supported on Android and nobody uses it.
I could find only one use cases: Very old versin of `SectionList` library (4 years ago).

Reviewed By: sahrens

Differential Revision: D12972361

fbshipit-source-id: a5dfef5e877e996adec2d4941417b4a2e727cfb7
2018-11-08 22:22:46 -08:00
David Vacca 2b01da073c Expose rootTag / surfaceId as part of schedulerDidRequestPreliminaryViewAllocation method
Summary: This diff exposes rootTag as part of SchedulerDelegate.schedulerDidRequestPreliminaryViewAllocation(). This will be necessary to be able to pool views per Surface in Android

Reviewed By: shergin

Differential Revision: D12875656

fbshipit-source-id: d2a8c1f9bcc6b14c17b34bf59085da44ae3c3416
2018-11-08 16:57:46 -08:00
Dustin Shahidehpour 81b74ec1ed Give eagerly loaded modules precedent over lazily loaded one.
Summary: Before lazily-loading code existed, modules that were already loaded into memory took precedent over modules that were additionally registered. With lazily loading modules, instead of giving eagerly loaded modules precdence, it throws a redbox. This diff fixes that behavior.

Reviewed By: PeteTheHeat

Differential Revision: D12983805

fbshipit-source-id: fe4fcf35d5c2ca6f9f4e3f0d1d8c2ca35468fb1b
2018-11-08 13:57:06 -08:00
Kevin Gozali 1f394fa673 iOS: Attempt to load lazy modules when asked from native
Summary:
Previously, asking for an instance of NativeModule from the native side gave `nil` if the lazy modules have not been loaded, which is not consistent with the access from JS. This at least attempts to force load the lazy modules when asked from native.

p.s. one asks for a module by doing `[bridge moduleForClass:[FooBar class]]`.

Reviewed By: spredolac

Differential Revision: D12931640

fbshipit-source-id: 15d2dc574067d3386ef921512ce4bc837749dabd
2018-11-07 07:33:39 -08:00
Valentin Shergin ee5061886e Fabric: Some helper classes and functions were moved to uimanager/primitives
Summary: Trivial.

Reviewed By: mdvacca

Differential Revision: D12876747

fbshipit-source-id: a2e72ecb69ffc3787f0d8b432f06b9c9715ac5b1
2018-11-06 11:03:50 -08:00
Valentin Shergin e88db99465 Fabric: Removing deprecated leftovers from RCTScheduler and RCTSurfacePresenter
Summary: Trivial. We don't use it anymore.

Reviewed By: mdvacca

Differential Revision: D12876743

fbshipit-source-id: dc979aaea1fef443b8caf2e58d44b0c7aad90246
2018-11-06 11:03:50 -08:00