Граф коммитов

16198 Коммитов

Автор SHA1 Сообщение Дата
empyrical 50d095ce32 Fabric: Remove designated initializer in LayoutMetrics.h (#23758)
Summary:
This pull request removes the designated initializer in `LayoutMetrics.h`. This will help improve the portability of this file.

[General] [Changed] - Fabric: Remove designated initializer in LayoutMetrics.h
Pull Request resolved: https://github.com/facebook/react-native/pull/23758

Differential Revision: D14320526

Pulled By: shergin

fbshipit-source-id: 076ad389d0985d5213b521a2ffaca4ca7ae31599
2019-03-05 05:34:02 -08:00
Sunny Luo d2153fc58d Text: Implement textAlign justify for android O+ (#22477)
Summary:
Add textAlign justify for android O+(api level >=26)
Resolves https://github.com/facebook/react-native/issues/22475

<img src="https://user-images.githubusercontent.com/615282/49341207-35e3b980-f685-11e8-91ab-dbc19c1ee4d0.gif" width="400" />

Changelog:
----------
[Android] [Added] - Implement textAlign justify for android O+
Pull Request resolved: https://github.com/facebook/react-native/pull/22477

Differential Revision: D13512004

Pulled By: cpojer

fbshipit-source-id: e20f4976bfd957a5faeae0bbed2ff27c03023bb1
2019-03-05 00:35:08 -08:00
zhongwuzw af52693e9c Keep placeholder paragraph style same with single line text input (#23765)
Summary:
Keep placeholder paragraph style same with text input.

[iOS] [Fixed] - Keep placeholder paragraph style same with single line text input
Pull Request resolved: https://github.com/facebook/react-native/pull/23765

Differential Revision: D14321255

Pulled By: cpojer

fbshipit-source-id: 2b8cbb7f2c7ceb40a9a2b142065dd6f5eb3d62eb
2019-03-05 00:10:44 -08:00
zhongwuzw debd4462e0 Keep placeholder paragraph style same with text input (#23763)
Summary:
Keep placeholder paragraph style same with text input.

[iOS] [Fixed] - Keep placeholder paragraph style same with text input
Pull Request resolved: https://github.com/facebook/react-native/pull/23763

Differential Revision: D14320996

Pulled By: cpojer

fbshipit-source-id: 07c20722809395a74a48300fbb7cadebb8707b03
2019-03-04 23:09:55 -08:00
zhongwuzw 8491cc36dd Remove class check and make data constraint to NSData (#22633)
Summary:
We always use `NSData` to send, for the `NSString` support, we already transform to `NSData` before call `_sendFrameWithOpcode` method. So we can remove these class check.

Changelog:
----------
[iOS] [Changed] [RCTSRWebSocket] - Remove class check and make data parameter of `_sendFrameWithOpcode` constraint to `NSData`
Pull Request resolved: https://github.com/facebook/react-native/pull/22633

Differential Revision: D14320451

Pulled By: cpojer

fbshipit-source-id: 63ac194d08965d7518a8ac38eea77fd5b43b6147
2019-03-04 22:35:08 -08:00
Sharon Gong 1889b797d3 Create a cross-platform accessibility example module (#23722)
Summary:
This PR divides the accessibility tests into two activities-- a cross-platform activity for accessibility features which are expected to work on all platforms, and platform specific tests for Android and iOS.

We believe that most, if not all, accessibility features should be cross-platform, with fallback implementations where the underlying concept doesn't exist on a particular platform.

This division of the tests makes it clearer for developers which features are expected to work on all supported platforms, and which are platform-specific.

[CATEGORY] general, Android, iOS
[TYPE] change

Message

Refactor the RNTester accessibility activities to better represent where the features are expected to work. Moves all cross-platform tests to AccessibilityExample.js,  Android-specific tests to AccessibilityAndroidExample.android.js, and iOS-specific tests to AccessibilityIOsExample.ios.js.
Pull Request resolved: https://github.com/facebook/react-native/pull/23722

Differential Revision: D14320696

Pulled By: cpojer

fbshipit-source-id: b5ab7a82a90f06d55a24262e86bd69fbdc890427
2019-03-04 22:08:09 -08:00
zhongwuzw ba6f818d7d Fixed singleline text input placeholder size (#23745)
Summary:
After #23738 , we can add more text attributes to placeholder, so now, let's update the calculation of placeholder size based on placeholder attributes.

[iOS] [Fixed] - Fixed singleline text input placeholder size
Pull Request resolved: https://github.com/facebook/react-native/pull/23745

Differential Revision: D14320630

Pulled By: cpojer

fbshipit-source-id: 2d9e8b59ba70228202add762cfc9c6cbc77e5e95
2019-03-04 21:56:53 -08:00
zhongwuzw fd954cda55 Add lineHeight support of placeholder for multiline text input (#23760)
Summary:
After some refactor of text input attributes, we can now add style attributes  the same as text input's attributes, from https://github.com/facebook/react-native/issues/19002#issuecomment-467171589, user wants placeholder to support line-height , I think we can add it now for multiline text input.

[iOS] [Added] - Added lineHeight support of placeholder for multiline text input
Pull Request resolved: https://github.com/facebook/react-native/pull/23760

Differential Revision: D14320600

Pulled By: cpojer

fbshipit-source-id: ededeaa11560af089ca15ffc188e2e70db2ad7d4
2019-03-04 21:50:09 -08:00
zhongwuzw aa3b0d99f4 Fixed multiline text input placeholder size (#23742)
Summary:
After #23738 , we can add more text attributes to placeholder, so now, let's update the calculation of placeholder size based on placeholder attributes.

[iOS] [Fixed] - Fixed multiline text input placeholder size
Pull Request resolved: https://github.com/facebook/react-native/pull/23742

Differential Revision: D14320489

Pulled By: cpojer

fbshipit-source-id: 6b0f07fe7406d5c99c7280d584f8b8e51fc84c00
2019-03-04 21:30:05 -08:00
A C SREEDHAR REDDY cd18527e77 Fix breaking of PickerAndroid when child is null. (#23748)
Summary:
when conditional rendering is used then picker breaks when the child is null.

This conditional rendering inside Picker fails when a is 1, because child will be null in PickerAndroid.android.js.
```
{
   this.state.a === 2 && <Picker.Item label="value" value="value" />
}
```

[ANDROID] [FIXED] - When child is null it returns.
Pull Request resolved: https://github.com/facebook/react-native/pull/23748

Differential Revision: D14319140

Pulled By: cpojer

fbshipit-source-id: 07d48cd054a131e6984cfe3bdce7538ffbc50622
2019-03-04 18:44:30 -08:00
Héctor Ramos 8721ef0916 Kill Switch tests (#23753)
Summary:
This component is being extracted.

These are flaky and constantly fail on Circle.

[General] [Removed] - Removed Detox e2e Switch tests
Pull Request resolved: https://github.com/facebook/react-native/pull/23753

Differential Revision: D14319130

Pulled By: cpojer

fbshipit-source-id: d0ea276440e034afbb11aa31762922532ad06402
2019-03-04 18:38:50 -08:00
aleclarson dc893756b8 Properly validate JS->native method calls (#23658)
Summary:
Between invalidating a bridge and suspending its JS thread, native modules may have their methods called.

Only warn when a native module has been invalidated, which happens right before its JS thread is suspended.

Avoid initializing a native module's instance if its bridge is invalidated.

/cc fkgozali f945212447 (commitcomment-32467567)

[iOS] [Fixed] - Properly validate JS->native method calls
Pull Request resolved: https://github.com/facebook/react-native/pull/23658

Differential Revision: D14287594

Pulled By: fkgozali

fbshipit-source-id: 89dd1906a0c55f3f48ba4ff220aac0cddf2eb822
2019-03-04 17:39:53 -08:00
empyrical ddd5b25768 Fabric: Remove null coalescing operators in ShadowNode (#23438)
Summary:
This pull request removes the use of the GCC extension null coalescing operators (`?:`) and replaces them with ternary operators. This improves the portability of `ShadowNode.cpp` (and enables MSVC to build it)

[General] [Fixed] - Fabric: Removed null coalescing operators in `ShadowNode`
Pull Request resolved: https://github.com/facebook/react-native/pull/23438

Differential Revision: D14304958

Pulled By: shergin

fbshipit-source-id: 7d8e6778a72dabf09b1d99bc091a7578598b79c3
2019-03-04 14:47:28 -08:00
empyrical b30b10326e Fabric: Remove designated initializers in RootShadowNode (#23715)
Summary:
This pull request removes the designated initializers in `RootShadowNode.cpp`. This will help improve the portability of this file.

[General] [Fixed] - Removed designated initializers in `RootShadowNode`
Pull Request resolved: https://github.com/facebook/react-native/pull/23715

Differential Revision: D14305167

Pulled By: shergin

fbshipit-source-id: e394580f103fdb59cf078828b5d2ee6df6cc534d
2019-03-04 14:41:30 -08:00
empyrical 2ca8c94559 Fabric: Remove designated initializers in '/uimanager/' (#23717)
Summary:
This pull request removes the designated initializers under the `fabric/uimanager/` folder. This will help improve the portability of these files.

[General] [Fixed] - Removed designated initializers under the `fabric/uimanager/` folder
Pull Request resolved: https://github.com/facebook/react-native/pull/23717

Differential Revision: D14305203

Pulled By: shergin

fbshipit-source-id: 370911682e22cbb20c4bfd7382ed4da0ce1a598d
2019-03-04 12:58:59 -08:00
Amir Sharif d4300cb59b Update typing for YellowBox patterns
Summary: To satisfy Flow, we want to account for RegExp as a valid ignore pattern.

Reviewed By: TheSavior

Differential Revision: D14303072

fbshipit-source-id: 4988fff5c6c6a12da99027e47216cedcf5a4db5a
2019-03-04 12:18:38 -08:00
empyrical 2c0125995d Fabric: Remove designated initializers in ShadowNodeTest (#23714)
Summary:
This pull request removes the designated initializers in `ShadowNodeTest.cpp`. This will help improve the portability of this file.

[General] [Fixed] - Removed designated initializers in `ShadowNodeTest`
Pull Request resolved: https://github.com/facebook/react-native/pull/23714

Differential Revision: D14305162

Pulled By: shergin

fbshipit-source-id: 81803652ece734a9b223d7a8b462a8b62cde7d1d
2019-03-04 11:28:02 -08:00
empyrical 74870d71a6 Fabric: Remove designated initializers in ComponentDescriptorTest (#23713)
Summary:
This pull request removes the designated initializers in `ComponentDescriptorTest.cpp`. This will help improve the portability of this file.

[General] [Fixed] - Removed designated initializers in `ComponentDescriptorTest`
Pull Request resolved: https://github.com/facebook/react-native/pull/23713

Differential Revision: D14305123

Pulled By: shergin

fbshipit-source-id: 64cfc76dd7eaf74b4b4395bac18a9fc370a3b322
2019-03-04 11:13:37 -08:00
Valentin Shergin 56501dcc47 Fabric: Changing the shape of ShadowViewNodePair class
Summary:
I am not sure why it compiled before, it clearly should not, IMO. The `const` types (and references!) are not allowed inside `std::vector` because they are not assignable.
Some experiments that I did caused compilation errors here, so I am changing that to be actually correct.

Reviewed By: JoshuaGross

Differential Revision: D14249199

fbshipit-source-id: 07a22ef13f5de9dfc7ab307493419e6006994bc2
2019-03-04 10:00:01 -08:00
David Aurelio b9a7880434 Fix problems with GCC < v8
Summary:
@public

GCC up until v7 flags our way of reading edges in `YGNodeSetStyleInputs` as unused variables. I managed to work around that by rearranging the casts a bit.

Reviewed By: SidharthGuglani

Differential Revision: D14299439

fbshipit-source-id: eec0266185504d1b790b9ef574bd4a83c0059d3a
2019-03-04 02:37:34 -08:00
David Aurelio fb329fbf86 Encapsulate all used java classes
Summary:
@public

Moves all Java classes used from C++ to their own header + implementation file. In `YGJNI.cpp`, we only call methods on these objects deriving from `jni::JavaClass`.

This is only a bit of cleanup, no functional change.

Reviewed By: SidharthGuglani

Differential Revision: D14261043

fbshipit-source-id: 2db1d81cb7f56a4cdc24b182b2166e1d7e24ba3c
2019-03-04 01:30:49 -08:00
empyrical 9e3a1f0e70 Fabric: Remove designated initializers in View (#23440)
Summary:
This pull request removes the designated initializers in `react/components/view/**` to improve portability.

[General] [Changed] - Fabric: Remove designated initializers in View
Pull Request resolved: https://github.com/facebook/react-native/pull/23440

Differential Revision: D14298887

Pulled By: shergin

fbshipit-source-id: 074a038cdacd448911b39441d84e341a56b666cf
2019-03-03 22:43:11 -08:00
empyrical 4936a663ae Fabric: Remove designated initializers in Image (#23439)
Summary:
This pull request removes the designated initializers in `react/components/image/**` to improve portability.

[General] [Changed] - Fabric: Remove designated initializers in Image
Pull Request resolved: https://github.com/facebook/react-native/pull/23439

Differential Revision: D14298888

Pulled By: shergin

fbshipit-source-id: 9b6ad5fdcec4d3b19b8d69afac80ce18d37f31e6
2019-03-03 22:38:11 -08:00
empyrical cf2a289372 Fabric: Remove designated initializers in Events and Mounting (#23441)
Summary:
This pull request removes the designated initializers in `react/mounting/**` and `react/events/**` to improve portability.

A destructor was also defined for `ShadowView` to fix this error:

```
ShadowViewMutation.cpp:14: error: undefined reference to 'facebook::react::ShadowView::~ShadowView()'
ShadowViewMutation.cpp:24: error: undefined reference to 'facebook::react::ShadowView::~ShadowView()'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
```

[General] [Changed] - Fabric: Remove designated initializers in Events and Mounting
Pull Request resolved: https://github.com/facebook/react-native/pull/23441

Differential Revision: D14298890

Pulled By: shergin

fbshipit-source-id: f5d8fc6e1f5968b94e8bb3ca0c3f0e81cf892f83
2019-03-03 22:32:37 -08:00
Bartol Karuza a2f11cb01f Add warning that CameraRoll has been moved to RNC (#23733)
Summary:
Adds a moved warning to the CameraRoll import directing people to the react-native-community/cameraroll package.

[Lean Core] [Warning] add warning that CameraRoll has been moved to RNC
Pull Request resolved: https://github.com/facebook/react-native/pull/23733

Differential Revision: D14298485

Pulled By: cpojer

fbshipit-source-id: cf03660c604a7337f234da107d7069c0ccf99f36
2019-03-03 21:07:20 -08:00
zhongwuzw 17ae61e14c Fixed method invoke when both nullable and __unused exist (#23726)
Summary:
We have parse code to try to support exported method parameter annotated `__unused` and `nullable`, but actually, seems we don't support it entirely, for example, we parse `__unused` firstly, then we parse `nullable`, actually, this case not exist, because `nullable` macro must appear right after `(`, before `__unused`, so we can't parse success, leads to error signature and crash.

[iOS] [Fixed] - Fixed method invoke when both nullable and __unused exist
Pull Request resolved: https://github.com/facebook/react-native/pull/23726

Differential Revision: D14298563

Pulled By: cpojer

fbshipit-source-id: 934e1d384a5d67b7bbf117fd2dec51f50979c979
2019-03-03 20:45:06 -08:00
michalchudziak 1ed2b82693 Rename eslint config to 'eslint-config-react-native-community' (#23718)
Summary:
Renamed `eslint-config-react-native` to `eslint-config-react-native-community`, due to the fact, that initial name is already taken on `npm`. Additionally, I added very simple `README.md` file, to prepare the package to be published.

[General] [Changed] - Changed `eslint-config-react-native` name to `eslint-config-react-native-community`
Pull Request resolved: https://github.com/facebook/react-native/pull/23718

Differential Revision: D14298553

Pulled By: cpojer

fbshipit-source-id: bad5a42502ccdebf5f95d8217187be23bbf8f26c
2019-03-03 20:39:43 -08:00
Vojtech Novak 929908f287 make sure to check array bounds in VirtualizedSectionList (#23710)
Summary:
SectionList accesses items outside of the array bounds.

This was discovered when using mobx, which warns you: `[mobx.array] Attempt to read an array index (${index}) that is out of bounds`. This is because `section.data[itemIndex + 1]` goes beyond array length.

This PR adds an array length check and simplifies the code a bit to avoid repetitive `this.props.`
Pull Request resolved: https://github.com/facebook/react-native/pull/23710

Differential Revision: D14298557

Pulled By: cpojer

fbshipit-source-id: fee3422ad5b053d91a097c5842f46e78a149c3d5
2019-03-03 20:34:37 -08:00
zhongwuzw 7025cce3f4 Fixed crash if event doesn't have body parameter (#23711)
Summary:
We need to check `body[@"target"]` wether equal to `nil`, if it is, return to prevent crash.

[iOS] [Fixed] - Fixed crash if event doesn't have body parameter
Pull Request resolved: https://github.com/facebook/react-native/pull/23711

Differential Revision: D14298543

Pulled By: cpojer

fbshipit-source-id: d5e8cd69438f323ae102e61618c0371a01bee347
2019-03-03 20:29:58 -08:00
Ryan Stelly ced155327e chore: update comment in DrawerLayoutAndroid (#23730)
Summary:
...referencing stale function component limitations

While preparing a short tutorial on the DrawerLayoutAndroid using the v59 RC, I came across a comment that we can update that states refs as being available only in Class components. This updates that with both class and function components.

If we'd rather delete the comment entirely and move both examples to the website, I'm fine with that too. The current docs page doesn't address the imperative API. https://facebook.github.io/react-native/docs/drawerlayoutandroid

[General] [fixed] - Update stale comment to provide both class and functional component ref example for DrawerLayoutAndroid
Pull Request resolved: https://github.com/facebook/react-native/pull/23730

Differential Revision: D14298527

Pulled By: cpojer

fbshipit-source-id: 3e9f0d6ae49588045fd9d924996fe7cff3d6a156
2019-03-03 20:16:44 -08:00
zhongwuzw d8d42c7310 Added support of __nullable and __nonnull for module exported method signature (#23731)
Summary:
For the `NullabilityPostfix`, we can use `_Nullable` or `__nullable`. Please see https://developer.apple.com/swift/blog/?id=25 , and we also use it in our code.

[iOS] [Added] - Added support of __nullable and __nonnull for module exported method signature
Pull Request resolved: https://github.com/facebook/react-native/pull/23731

Differential Revision: D14298483

Pulled By: cpojer

fbshipit-source-id: 4dd3188f51be3808ea2b97ce19aa7a85ea1f4a9e
2019-03-03 20:06:21 -08:00
zhongwuzw 65c014d19f Keep placeholder attributes sync with text input text's attributes (#23738)
Summary:
We need to keep placeholder attributes sync with text input's text attributes, like `font`,`kern` ....., to keep style the same.

Also fixes #19002 .

[iOS] [Fixed] - Keep placeholder attributes sync with text input text's attributes
Pull Request resolved: https://github.com/facebook/react-native/pull/23738

Differential Revision: D14298482

Pulled By: cpojer

fbshipit-source-id: 3555091bf3bc01e4b026d5a4cdbe93b4122106e8
2019-03-03 19:59:57 -08:00
David Vacca d451c03284 Remove createMountItem code
Summary:
Now that pre-allocation of views update props, we can just force the execution of "pre-allocation" instead of "create" mount item.

This diff removes the methods that were used by view creation

This way we reduce the amount of mountItems that are created during commit phase.
This should improve TTI (I'm running a MobileLab)

Reviewed By: shergin

Differential Revision: D14297477

fbshipit-source-id: a100bab798467e9f0fa9773e0206ba1ded472298
2019-03-03 15:51:32 -08:00
David Vacca 7720613bda Add systraces for pre-mountItems executed during commit
Summary:
Now that pre-allocation of views update props, we can just force the execution of "pre-allocation" instead of "create" mount item.

This diff adds systraces to the execution of pre-mountItems during commit

This should reduce the amount of mountItems that are created during commit phase.
This should improve TTI (I'm running a MobileLab)

Reviewed By: shergin

Differential Revision: D14297478

fbshipit-source-id: d8e515d34cf6edacce53c0903f74a08029259f6f
2019-03-03 15:51:32 -08:00
David Vacca 861e406097 Force execution of all pre-allocation of views before execution of mount items
Summary:
Now that pre-allocation of views update props, we can just force the execution of "pre-allocation" instead of "create" mount item.

This should reduce the amount of mountItems that are created during commit phase.
This should improve TTI (I'm running a MobileLab)

Reviewed By: shergin

Differential Revision: D14297476

fbshipit-source-id: 3ade662848ed836dc3221abe78611bb4a2b94e00
2019-03-03 15:51:32 -08:00
David Vacca ca6e1793ed Cleanup android log
Summary:
Cleaning up <android/log.h> from includes
We use LOG
```
LOG(INFO) << "message";
```
to log

Reviewed By: shergin

Differential Revision: D14297264

fbshipit-source-id: 1a9a760a092b6947cca7d7d59b66c574b3e41ad8
2019-03-03 15:51:32 -08:00
David Vacca 747d1f7029 Cleanup SchedulerDelegate interface
Summary: This diff removes the "isLayoutable" parameter from SchedulerDelegate.schedulerDidRequestPreliminaryViewAllocation. This now can be infered from the shadowView parameter

Reviewed By: shergin

Differential Revision: D14296481

fbshipit-source-id: b200504f9c2bef41f0a70257f1f5a274fbe97cbb
2019-03-03 15:51:32 -08:00
Valentin Shergin e93522b14b Fabric: Using better::map in Prop parsing infra
Summary: It can save us a couple of ms, hopefully.

Reviewed By: mdvacca

Differential Revision: D14249196

fbshipit-source-id: b5911bcd8b49be66de7b9d2da660df38ef7cc8cd
2019-03-03 13:50:35 -08:00
Valentin Shergin 2409fbaeba Fabric: Using better::map in ComponentDescriptorRegistry
Summary: Trivial.

Reviewed By: mdvacca

Differential Revision: D14249487

fbshipit-source-id: 6dca86d9fcf5c70e08289fc92e5c5a3fa3558238
2019-03-03 13:50:35 -08:00
Valentin Shergin 90e49d759c Fabric: Using a ref to ComponentDescriptor instead of clone function inside ShadowNode
Summary: That should reduce the size of `ShadowNode`, make an instantiation of shadowNode a bit faster, and make `clone` operation a bit faster because simple dynamic dispatch is faster than std::function invocation. It also should help a bit with code size.

Reviewed By: mdvacca

Differential Revision: D14249200

fbshipit-source-id: c1332b139d27becebf15cd894475507b5fd0eb9f
2019-03-03 13:50:35 -08:00
Valentin Shergin aed352246e Fabric: Using RootComponentDescriptor to manage RootShadowNode in ShadowTree
Summary: We need this change to migrate away `cloneFunction` (to a pointer to ComponentDescriptor) inside ShadowNode.

Reviewed By: mdvacca

Differential Revision: D14249197

fbshipit-source-id: 773edcf40e17989886e2c5d3955823a0dbf3857a
2019-03-03 13:50:35 -08:00
Valentin Shergin 0ed988f182 Fabric: `string` and `vector` were removed from better
Summary: Well, that was not so good idea to add that in the first place. Turns out that nowadays standard `string` and `vector` are good enought (but we still need small and inlined collections thought).

Reviewed By: JoshuaGross

Differential Revision: D14249202

fbshipit-source-id: a1b32b800c3f52b29a57f015e1221a0a0eb305c8
2019-03-03 13:50:35 -08:00
Valentin Shergin 24c0702818 Fabric: Text measuring: Handling the case where the string is empty
Summary: Surprisingly, we have some significant amount of text measuring requests where the string is empty. So, there is no need to go to platform specific layer to find that the size of those strings is zero.

Reviewed By: mdvacca

Differential Revision: D14297315

fbshipit-source-id: bf84cf27d5c0893262e8b27da8ff42fc77bcd6c5
2019-03-03 12:07:12 -08:00
Valentin Shergin c61398d8f9 Fabric: Using SimpleThreadSafeCache in ParagraphMeasurementCache
Summary: `ParagraphMeasurementCache` was replaced with templated version of itself.

Reviewed By: mdvacca

Differential Revision: D14296515

fbshipit-source-id: 29e370f07baf14b25430f85a06f603907aed5563
2019-03-03 12:07:12 -08:00
Valentin Shergin 17cb6a8aeb Fabric: Caching for `NSAttributedString`s in RCTTextLayoutManager
Summary:
Creation NSAttributedString from attributedString is not so cheap process, so with this simple cache we hopefully can save a couple milliseconds.
The same string is used at least two times: first time for measuring and second for drawing.

Reviewed By: mdvacca

Differential Revision: D14296514

fbshipit-source-id: 6313aa2c6e9f63d873868131750f61c02d64d2de
2019-03-03 12:07:12 -08:00
Valentin Shergin 15ee4545f4 Fabric: Introducing SimpleThreadSafeCache
Summary: SimpleThreadSafeCache is a simple thread-safe LRU cache; it's a generalized version of ParagraphMeasurementCache.

Reviewed By: mdvacca

Differential Revision: D14296516

fbshipit-source-id: 2b40ac1979ada12551848ece3642b2d99e369672
2019-03-03 12:07:12 -08:00
David Vacca 70447775f7 Update Props during pre-allocation avoiding re-updating the same props during mounting
Summary:
Update Props during pre-allocation avoiding re-updating the same props during mounting

MobileLab test showed an improvement of:
MARKETPLACE_YOU_TTI_SUCCESS: -3.34% = 58ms

Reviewed By: shergin

Differential Revision: D14252170

fbshipit-source-id: 1f4e9ad5dcecbc06651fa065135ffeed4892d984
2019-03-03 09:00:48 -08:00
David Vacca 95c414cfbf Introduce "updateProps" field InsertMutation
Summary: This diff introduces the concept of "updateProps" as part of InsertMutation and it changes the diffing algorithm to populate this field.

Reviewed By: shergin

Differential Revision: D14289608

fbshipit-source-id: 642f00d03d294a12ea7fa7482c72e701b756f3d4
2019-03-03 09:00:47 -08:00
David Vacca f6ba52bf1e Enable update of props during preallocation for all views
Summary:
Before only the props of Images components were being applied during the pre-allocation phase.
Now that we have a limit of time that pre-allocations will be executed we can update props for any component

Reviewed By: shergin

Differential Revision: D14252171

fbshipit-source-id: afea4b71a32b7ae2c184b0cdce97f778bc3a47d2
2019-03-03 09:00:47 -08:00
David Vacca ed8573f957 Implement limit to execute pre-mount operations
Summary: This diff implements a limit on the execution of pre-allocation of views, taking into consideration the time it is left on the frame, with a maximum of 8 ms / frame

Reviewed By: shergin

Differential Revision: D14252172

fbshipit-source-id: 1780a489122a8bc476d6ec7c92b45fdc58993e1d
2019-03-03 09:00:47 -08:00