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

600 Коммитов

Автор SHA1 Сообщение Дата
Valentin Shergin af38a0cf87 Fabric: `Transform` type was moved to `graphics` module.
Summary:
We will use it inside `core` module, so we have to decouple it from `view`.
As part of this, I added some comments, changed `const Float &` to just `Float` and put the implementation into `.cpp` file.

Reviewed By: mdvacca

Differential Revision: D14593952

fbshipit-source-id: 80f7746f4fc5b95febc8df9f5a9c0386a6425c88
2019-03-25 12:04:53 -07:00
David Vacca ce3952faf5 Replace abort() with LOG(FATAL) when a prop-value is not found during parsing
Summary: This diff replaces usage of abort() with LOG(FATAL) when a prop-value is not found during parsing of prop values

Reviewed By: fkgozali

Differential Revision: D14591210

fbshipit-source-id: 4a8484ea6bdfec5534122ded43cc24ef80c13c1d
2019-03-23 22:53:23 -07:00
David Vacca 06c1f3c502 Fix parsing of flex-wrap='nowrap'
Summary: This diff fixes parsing of  flex-wrap='nowrap' prop in Fabric

Reviewed By: fkgozali

Differential Revision: D14591211

fbshipit-source-id: 2ece2cd03b1b78eaeb01f7fc15bf62c510f70501
2019-03-23 22:53:22 -07:00
Yuan Du 146b2839f5 Revert D14554656: [Fabric][C++] Fix parsing of flex-wrap='nowrap'
Differential Revision:
D14554656

Original commit changeset: 259b2cdaf204

fbshipit-source-id: 3bca12f204ff7be85c4901eb01894935e7857d75
2019-03-23 13:08:20 -07:00
Yuan Du 66e04347d1 Revert D14570713: [Fabric][C++] Replace abort() with LOG(FATAL) when a prop-value is not found during parsing
Differential Revision:
D14570713

Original commit changeset: 57b0f993ba26

fbshipit-source-id: 5f4eb0282b028e36d2cbb04a5ab85f469572aa37
2019-03-23 13:08:20 -07:00
Yuan Du a3296ff40f Revert D14572430: [Fabric][Android] ReactTTRCRenderFlag component in Fabric android
Differential Revision:
D14572430

Original commit changeset: 0e7c6cb5520b

fbshipit-source-id: 2cde5c9316c055c3836aab656a06c508f3e468af
2019-03-23 13:08:20 -07:00
David Vacca 819c584c46 ReactTTRCRenderFlag component in Fabric android
Summary: This diff migrates ReactTTRCRenderFlag component to Fabric android

Reviewed By: shergin

Differential Revision: D14572430

fbshipit-source-id: 0e7c6cb5520be44221939b0e711269b84f4657dc
2019-03-23 12:10:00 -07:00
David Vacca 1ceb4708f7 Replace abort() with LOG(FATAL) when a prop-value is not found during parsing
Summary: This diff replaces usage of abort() with LOG(FATAL) when a prop-value is not found during parsing of prop values

Reviewed By: sahrens

Differential Revision: D14570713

fbshipit-source-id: 57b0f993ba264a4949baf4022d807c55cdfe03b1
2019-03-23 12:09:59 -07:00
David Vacca f01a0d33ab Fix parsing of flex-wrap='nowrap'
Summary: This diff fixes parsing of  flex-wrap='nowrap' prop in Fabric

Reviewed By: fkgozali

Differential Revision: D14554656

fbshipit-source-id: 259b2cdaf2043f72c261ae7d74a80eb012883244
2019-03-23 12:09:59 -07:00
zhongwuzw 25a58d7bbb Consolidate shared_mutex with better::shared_mutex (#24075)
Summary:
Replace `folly::SharedMutex` with `better::shared_mutex`, consolidate the shared_mutex.
cc. shergin .

[General] [Changed] - Consolidate shared_mutex with better::shared_mutex
Pull Request resolved: https://github.com/facebook/react-native/pull/24075

Differential Revision: D14559213

Pulled By: shergin

fbshipit-source-id: 934c7cd7db9ce60031d6b007faeebb353860268f
2019-03-21 00:18:33 -07:00
Valentin Shergin 9ede538b75 Fabric: Removing an assert in YogaLayoutableShadowNode
Summary: Conceptually, this assert is correct, however, sometimes a new node got allocated by same address as old parent node (which does not exist already) which makes the assert fires.

Reviewed By: mdvacca

Differential Revision: D14533070

fbshipit-source-id: 3fcc71c25e7d724180dc85aaf2457227d22ddba0
2019-03-20 18:09:16 -07:00
Valentin Shergin ae157883eb ShadowNode: Using state value for computing ShadowView hash
Summary: Trivial.

Reviewed By: JoshuaGross

Differential Revision: D14472906

fbshipit-source-id: 014a3115c24d155a93ff24404d4f748880d53b2b
2019-03-19 00:02:30 -07:00
Valentin Shergin f24fd6e9ee Fabric: Using new shiny ShadowNode::getAncestors in LayoutableShadowNode
Summary: Same algorithm using a new API.

Reviewed By: JoshuaGross

Differential Revision: D14423509

fbshipit-source-id: c40f61fdd001f68785512c304941f523585d641c
2019-03-18 23:56:13 -07:00
Valentin Shergin 4602bf5cc6 Fabric: Using ShadowNode::getAncestors in RootShadowNode::clone
Summary: The basic idea of the implementation is the same, but it uses the new method for finding parenting chain and it does not use `shared_from_this()` anymore.

Reviewed By: JoshuaGross

Differential Revision: D14416949

fbshipit-source-id: 13ef928505a60280e2a6c30c76ac87d91cee326e
2019-03-18 23:56:13 -07:00
Valentin Shergin be51d0564b Fabric: a new efficient implementation of ShadowNode::getAncestors()
Summary:
The algorithm is quite simply:
1. Get family objects of the two nodes (inner and outer).
2. Traverse the list of family objects starting from the inner one and form a reversed list of them.
3. tarting from the inner node, traverse the tree layer-by-layer choosing a next element of the path by comparing the family object of each node on the level and an object from the list.

Reviewed By: JoshuaGross

Differential Revision: D14416950

fbshipit-source-id: 23c659a9e01690f90174193650a2b0ef09eadb4d
2019-03-18 23:56:13 -07:00
Valentin Shergin 978e59aa92 Fabric: ShadowNodeFamily, maintaining a pointer to a parent family
Summary:
One of the core feature of ShadowNodeFamily is having a pointer to a parent family. This diff implements it.
I don't think there is a hard retain cycle there, but for more lean memory usage we use weak_ptr here.

Reviewed By: JoshuaGross

Differential Revision: D14416948

fbshipit-source-id: 05fd2c4833146f007228363b1d958776b4a2a9cf
2019-03-18 23:56:13 -07:00
Valentin Shergin 28e89e5081 Fabric: ShadowNodeFamily, the first steps
Summary:
ShadowNodeFamily is a new concept that allows us to implement an efficient way to solve the problem of finding a path to some ancestor node (practically reimplement ShadowNode::constructAncestorPath() in some efficient way).

This diff is the first one in the series. It introduces a new class and moves some data into it.

Reviewed By: JoshuaGross

Differential Revision: D14416947

fbshipit-source-id: c93865a8929a2128498e34d3589487696aac6283
2019-03-18 23:56:13 -07:00
Valentin Shergin e0bbdbc040 Fabric: Removed declaration of ShadowNode::clearSourceNode()
Summary: This is a leftover from the ealy days of Fabric. The mehtod does not have implementation counterpart and any usage.

Reviewed By: JoshuaGross

Differential Revision: D14402636

fbshipit-source-id: aa2e919084ae7382d3a62af761e1f6eac334fc75
2019-03-18 23:56:13 -07:00
Valentin Shergin b93221036a Fabric: Removed unnecessary call in `RootShadowNode::clone`
Summary: The removed code does nothing because we are replacing the oldChild with newChild several lines above.

Reviewed By: JoshuaGross

Differential Revision: D14402637

fbshipit-source-id: 731a950f373e20f7d5bae3cbf6470335d3694ccc
2019-03-18 23:56:13 -07:00
Valentin Shergin 50b40a41c0 Fabric: Tightening up some ShadowNode cloning semantics
Summary: In React, things like changing `tag`, `eventTarget` or reparenting are impossible by design. Which seems like a strange limitation actually allows us to do tremendous performance optimizations (stay tuned!).

Reviewed By: JoshuaGross

Differential Revision: D14402638

fbshipit-source-id: 3b7b7edaff0d55a3ca94e2ac4c753d630d07101d
2019-03-18 23:56:13 -07:00
Valentin Shergin 9a0047f368 Fabric: Explicit dirtying Yoga nodes for Text component (and co.)
Summary:
With recent changes, simple cloning a component does not mean that underlying Yoga node will be dirtied. Autodirtying is only performed if the child nodes were dirtied and/or if the YGStyles were changed.
That's not the case for Text component which does not have direct layotable children, so we have to call `dirtyLayout` explicitly.

Reviewed By: JoshuaGross

Differential Revision: D14508277

fbshipit-source-id: 2c52d7d40da963a976c7d28a13781cc1755ef591
2019-03-18 19:21:26 -07:00
Valentin Shergin ab86085caf Fabric: Correct checking for `sealable` flag with move semantic methods
Summary: In methods which implement move semantic we have to check the source object because it's (also) being mutated.

Reviewed By: JoshuaGross

Differential Revision: D14496937

fbshipit-source-id: f3f2299d14e41c8b269f1647336dbd5b45c235f4
2019-03-18 19:21:26 -07:00
Valentin Shergin 587087c4e7 Fabric: More asserts/invariant-checking in YogaLayoutableShadowNode
Summary: More `assert`s and `ensureUnsealed` calls were added to YogaLayoutableShadowNode for simpler debugging and early failing.

Reviewed By: JoshuaGross

Differential Revision: D14496936

fbshipit-source-id: 898c6a0665aeac5d0b1995bd53046f58cec37007
2019-03-18 19:21:26 -07:00
Valentin Shergin 55eaf30740 Fabric: Checking for `HasNewLayout` before applying layout metrics to ShadowNode
Summary:
If the `HasNewLayout` flag is `false`, we should not copy the data from YGStyle/YGLayout to ShadowNode because the node can be already sealed and because it's unnecessary. Previously we workaround this case with a special check in `setLayoutMetrics` method, but that can be unreliable because of some side-effects related to pixel rounding and comparing floats.
The new approach is much more robust and explicit.

Reviewed By: JoshuaGross

Differential Revision: D14496939

fbshipit-source-id: deddb14d2206c5bd3f22154d0ea682e3c5888901
2019-03-18 19:21:26 -07:00
Valentin Shergin be6fa25d16 Fabric: Removing default implementation of some methods of LayoutableShadowNode
Summary: These default implementations are never being used. Removing them allowing to ensure that flags inside YGNode have same values as flags in YogaLayoutableShadowNode. That also saves a couple of bytes in size of ShadowNode.

Reviewed By: JoshuaGross

Differential Revision: D14496938

fbshipit-source-id: c43f9c8a2eec054f728ff54a6573668eccda55fb
2019-03-18 19:21:26 -07:00
Valentin Shergin 32d5c7e1f3 Fabric: Checking getHasNewLayout in RootShadowNode
Summary:
As a comment above changed lines states, RootShadowNode is a special one because it layouts itself. In normal case some parent node layouts its children, and it also checks getHasNewLayout flag. So, in the case of RootShadowNode it has to check its own flag by itself.
That fix should save some resources and generally correct.

After the change, changing a state of some node does not cause relayout process. If dirtying is required, the component should call `dirtyLayout()` explicitly in the constructor or in `adopt` method.

Reviewed By: JoshuaGross

Differential Revision: D14472751

fbshipit-source-id: 75bf62ac28991a39e5664aa71c08bd0e64fa275b
2019-03-18 19:21:25 -07:00
Valentin Shergin 72cd8716fd Fabric: Calling a base class copy constructor in YogaLayoutableShadowNode's copy constructor
Summary: That diff fixes an obvious bug that prevents internal data of LayoutableShadowNode being cloned during cloning of YogaLayoutableShadowNode.

Reviewed By: JoshuaGross

Differential Revision: D14472753

fbshipit-source-id: d07be3bf36708690dfe10de7898e2b48648aa0f4
2019-03-18 19:21:25 -07:00
Valentin Shergin 6bd67de4d3 Fabric: Being even smarter preserving dirty flag on Yoga nodes
Summary: In addition to the previous change, now we handle a situation where some node receives a new set of children and all those children have the same styles. (See the previous diff for more details.)

Reviewed By: JoshuaGross

Differential Revision: D14472754

fbshipit-source-id: 16411036e14f18e730e064e33948440b05ff51c8
2019-03-18 19:21:25 -07:00
Valentin Shergin d6d381180b Fabric: Being smarter preserving dirty flag on Yoga nodes
Summary:
After the change, YogaLayoutableShadowNode will preserve dirty flag (being false) in cases where:
* a node was cloned with same children;
* changes in props don't affect layout.

Motivation:
In Fabric we always were aggressive about dirting yoga nodes: when we clone the node, we always dirty underlying Yoga node. I think that was the case because we don't deeply understand how the system works and we always had more severe problems to fix. Now, we faced an issue that forces us to think about that problem carefully (more about that later).

(I don't expect that will improve TTI performance, but that's possible if we do a lot of changes in the hierarchy during initial load process.)

I see two main use cases where we have to be smart about dirtied yoga nodes:

Case 1. Native local commits which do *not* modify yoga styles.E.g. in a case where ScrollView updates the internal state (which has offset info) really really frequently. (It will be implemented later.) That `contentOffset` info does not or might not affect layout, so we should not pay for this.

Case 2. Legit React commits which do *not* modify yoga styles. E.g. in a case where only the background color of some view changes, we don't need to relayout anything. Unfortunately, we do this in Fabric because of two major reasons:
* We don't make a difference between any changes in Props.
* React constructs new children of cloned node iteratively, calling `appendChild`. That makes implementing optimization really challenging because we don't know when the process ends. And when it ends we have very few pieces of information about how the state looked before.

This diff stack will handle the problems of the first kind. The main motivation is: we want to have state updates to be as lean as possible.

Reviewed By: JoshuaGross

Differential Revision: D14472752

fbshipit-source-id: 68374f60cb07de9ab65bf1f6d94c828985359fa5
2019-03-18 19:21:25 -07:00
ericlewis 97e6ea1371 Fabric: working podspecs & works in RNTester (#23803)
Summary:
This is the couple of hacks I used after I finished #23802 in order to get fabric working on RNTester. This is inspired from prior work by kmagiera.

The goal of this PR is to show others what I’m struggling with, and to eventually merge it sans hacks.

- Yarn Install
- Uncomment the commented out pods in RNTester's pod file
- Open RNTesterPods workspace
- Run App

- this is only for pods, the non-pod RNTester will no longer work until updated with fabric too.
- `SurfaceHostingView` & `SurfaceHostingProxyRootView` both try to start the surface immediately, this leads to a race condition due to the javascript not having loaded yet, the hack here is:
   1. Swizzle the `start` method on `RCTFabricSurface` to no-op when called.
   2. Add observer for `RCTJavaScriptDidLoadNotification`
   3. Call private method `_startAllSurfaces` on `_surfacePresenter` in AppDelegate when we receive `RCTJavaScriptDidLoadNotification`.

[General] [Added] - Use Fabric in RNTester
Pull Request resolved: https://github.com/facebook/react-native/pull/23803

Reviewed By: shergin, mdvacca

Differential Revision: D14450726

Pulled By: fkgozali

fbshipit-source-id: 8ae2d48634fecb60db539aaf0a2c89ba1f572c27
2019-03-15 23:59:22 -07:00
Joshua Gross 34499002f2 fbios BottomSheet implementation
Summary: Several things need to ironed out: 1) LocalState in Fabric C++, 2) setting dimensions of BottomSheet component to 0,0 for parent.

Reviewed By: shergin

Differential Revision: D14426167

fbshipit-source-id: 45a90a7971c87672872108a9e360926b4a6095f0
2019-03-15 14:37:39 -07:00
Valentin Shergin 948398519d Fabric: Fixing usage of Folly's `hash_combine`
Summary:
Accidentally I noticed that the signature of Folly's hash_combine is different from boost's one.
The Folly's one is:
`size_t hash_combine(const T& t, const Ts&... ts)`, so the first argument is immutable and the method returns the result normally.
It means that all hashes that we compute in Fabric using `hash_combine` were `0`.
So I fixed it.

I have no idea why this difference exists, but some modern papers suggest that folly's variant has good chances to be standardized.
E.g.: http://open-std.org/JTC1/SC22/WG21/docs/papers/2017/p0814r0.pdf

Technically, it should improve performance, but I doubt that it can be more than 1-2 ms per screen TTI.

Reviewed By: JoshuaGross

Differential Revision: D14430380

fbshipit-source-id: 97da999ee5780b940bb789bc3eb5bf9f89c194ca
2019-03-14 18:35:00 -07:00
ericlewis d17e061c0e Fabric: support line-through for text components (#23911)
Summary:
While the proper typographical terminology is [Strikethrough](https://en.wikipedia.org/wiki/Strikethrough), we should still support `line-through` as it goes through a deprecation phase.

[iOS] [Added] - line-through support for fabric text components
Pull Request resolved: https://github.com/facebook/react-native/pull/23911

Differential Revision: D14460610

Pulled By: shergin

fbshipit-source-id: 0dae41b765f21d166ea3618c463ebe1330607b30
2019-03-14 11:07:32 -07:00
Rick Hanlon ed5ed23deb Move codegen to rn_library
Summary:
Moves rn_codgen to rn_library behind a `codegen` flag to limit the number of rules we generate

WIth this, modules with native components can enable the react-native-codegen schema parsing by just updating their buck rule to:

```
rn_library(
  name = 'lib',
  codegen = True,
  // ...
)
```

Reviewed By: TheSavior

Differential Revision: D14401263

fbshipit-source-id: 1675bc28389db64da10153c988bb4eb00d715056
2019-03-13 07:02:31 -07:00
Joshua Gross 34b7087515 Remove folly::futures targets
Summary: Remove unused BUCK targets.

Reviewed By: fkgozali

Differential Revision: D14416459

fbshipit-source-id: f9ee07c6e30dc825627cda9bdf8128ada5ef5166
2019-03-12 10:56:51 -07:00
Marco Zandonadi 756dc2f3ed Fix #import/include in SliderShadowNode
Summary: This diff is a part of an effort to resolve build errors that appear when compiling with the latest version of clang.

Reviewed By: shergin

Differential Revision: D14369797

fbshipit-source-id: e4c6f53e293f336efad18597f9d2705c025e1051
2019-03-11 12:36:28 -07:00
Valentin Shergin 2862ef3a47 Fabric: Using `small_vector` instead of regular `vector` in some hot code paths
Summary: The hope is that it will remove many unnececery allocations improving overal perfromance.

Reviewed By: mdvacca

Differential Revision: D14249198

fbshipit-source-id: f0442b3919ccead0582a3190dea0e33d517d85f6
2019-03-07 13:41:20 -08:00
Valentin Shergin c3ecae0db4 Fabric: Using small_vector for SharedShadowNodeList
Summary:
SharedShadowNodeList is one of the core collections in Fabric. Every ShadowNode has one, it's used intensivly during diffing and so on.
Usually, nodes have a very few children, so using `small_vector` instead of regular `vector` should save us a lot of memory allocations.

Reviewed By: JoshuaGross

Differential Revision: D14249201

fbshipit-source-id: 53297caa027a74099d0a1ed4a3cce78f8feb651b
2019-03-07 13:41:20 -08:00
Valentin Shergin 136666e2e7 Fabric: Using stored inside ShadowNode pointer to Descriptor instead of table lookup
Summary:
Nowadays, every ShadowNode has a reference to a ComponentDescriptor, so now there is no need to do registry lookup for that.
That should save us 0.5-1.0 ms in my non-scientific measurements.

Reviewed By: mdvacca

Differential Revision: D14348369

fbshipit-source-id: 57f6a6f2f8bf0b7e58d89a414fec20b2db8876f7
2019-03-06 20:06:08 -08:00
Valentin Shergin 393bf8aaad Fabric: Fixed a bug in ShadowViewMutation constructor
Summary:
Clowntown.
This fixes a recent regression happened becasuse wrong order of parameters in ShadowViewMutation constructor.

Reviewed By: JoshuaGross

Differential Revision: D14329164

fbshipit-source-id: 5a0dc04b889fb3357050b951d56c3e436dbeefb1
2019-03-05 14:07:20 -08:00
Rick Hanlon d48bd1759e Use codegen for Slider props + events
Summary: Use the codegen for the Slider component with the new `inferfaceOnly` option

Reviewed By: TheSavior

Differential Revision: D14295981

fbshipit-source-id: 0482572892fbcffada43c7c6fbf17e70546300b8
2019-03-05 11:53:56 -08:00
Rick Hanlon 9098bc7749 Remove activityindicator files
Summary: These were moved to the codgen

Reviewed By: TheSavior

Differential Revision: D14307470

fbshipit-source-id: 49030c245f11bd595bb97e1b2f34a7c454be5c56
2019-03-05 11:53:56 -08:00
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
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
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
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
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 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
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 aa69e51096 Preallocate Image views
Summary:
This diff changes the pre-allocation of Images update the props on the ImageViews during the creation of ShadowNodes instead of during rendering.
The purpose of this change is to optimize TTI.

This was originally landed in D14214844 and then backed out in D14247897

Reviewed By: shergin

Differential Revision: D14286232

fbshipit-source-id: 8437f57f9473eb22ef98d80531b4020ee5fbb9ae
2019-03-03 09:00:47 -08:00
Valentin Shergin 6bc7ef0b19 Fabric: Props now have a revision number
Summary:
Props now have a special value that represents generation number of `Props` object, which
increases when the object was constructed with some source `Props` object.

Reviewed By: mdvacca

Differential Revision: D14293939

fbshipit-source-id: 4782bf33ccf37623d4079c09cc4d0268bb6c2690
2019-03-01 22:11:32 -08:00
Valentin Shergin ada9dbf919 Fabric: Removed `ImageNoLongerNeededException`, an old leftover
Summary: Trivial.

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D14286275

fbshipit-source-id: c29961eb11877da8ae8f14cb2a71cb5eee386fe0
2019-03-01 22:11:32 -08:00
Yedidya Feldblum fc91bccd53 Add assorted missing includes in xplat
Summary: Add assorted missing includes in `xplat` that would be exposed by future changes.

Reviewed By: ispeters, nlutsenko

Differential Revision: D14213660

fbshipit-source-id: 329f133784015fe20ee99feaec8ef05e117fe3a6
2019-02-28 00:52:48 -08:00
David Vacca b3790d283f Back out "[Fabric][C++][Android] update props during pre allocation of views"
Summary:
This is a back-out of D14214844, we noticed that this regressed TTI for Marketplace You screen running in Fabric

Original commit changeset: b81005f2bf49

Reviewed By: JoshuaGross

Differential Revision: D14247897

fbshipit-source-id: de0cea92b437b2fbcd075f0d6a0066156800e3f0
2019-02-28 00:04:09 -08:00
Spencer Ahrens 189f99eccc Cleanup UITemplates / Fly logging
Summary: Kinda spammy

Reviewed By: shergin

Differential Revision: D14211415

fbshipit-source-id: a8d010f6133d8ec5e109e9d2164ade2c1d996537
2019-02-27 13:33:07 -08:00
Joshua Gross edceba9a9c Slider component - cache measurements, don't create measure manager on iOS
Summary: Small perf wins for both iOS and Android.

Reviewed By: PeteTheHeat

Differential Revision: D14237532

fbshipit-source-id: 2be114d36adfa6e8540cb8cbca5412782791d8ce
2019-02-27 12:48:26 -08:00
Valentin Shergin 802534e611 Fabric: Introducting State, an escape path from unidirectional data flow
Summary:
In React Native there are several use cases where React State is not the only input that affects the component tree. E.g., in case of a <Modal> component, the screen size directly affects the layout of components inside modal; in the case of uncontrolled <TextInput> component, the text inside the input affects the layout of the surrounding components. `State` is a special (legit!) workaround for all those similar cases. Native part of React Native maintains a special shared object between all nodes of the same family and use that during cloning and commits.

See coming commits to know how to use that.

In the near future State will fully replace LocalData concept but for simplicity they both exist for now.

Reviewed By: mdvacca

Differential Revision: D14217184

fbshipit-source-id: 6e018c5b68208d662462013bce0f4e2733d2f673
2019-02-27 00:32:25 -08:00
Valentin Shergin b9107084f7 Fabric: Small refactoring in EventQueue
Summary:
A couple of small changes:
  1. `onEnqueue` was decoupled from `enqueueEvent` for easier and unified overiding in subclasses (other methods will call `onEnqueue` soon);
  2. `flushEvents` was decoupled from `onBeat` (we will put more stuff into `onBeat` soon).

Reviewed By: mdvacca

Differential Revision: D14205769

fbshipit-source-id: 574c2b2caaa6432bc7782b2f3bc147fa1fb82bd3
2019-02-27 00:32:25 -08:00
Valentin Shergin 104ef96498 Fabric: LayoutConstraints::clamp()
Summary: `LayoutConstraints::clamp` clamps the provided `Size` between the `minimumSize` and `maximumSize` bounds of this `LayoutConstraints`.

Reviewed By: mdvacca

Differential Revision: D14205770

fbshipit-source-id: 4799608cead393451d334e47dd6906255699a1e8
2019-02-27 00:32:25 -08:00
Joshua Gross 3c1114eea7 Enable Slider component
Summary:
Enable Slider component in Fabric on Android.

{F151706188}

Reviewed By: mdvacca

Differential Revision: D14220147

fbshipit-source-id: 10b29112e950c8de98cba995839780c4f4e8d3b6
2019-02-26 14:40:58 -08:00
Valentin Shergin 9a64755a18 Fabric: `events` module was merged into `core` module
Summary: That's bummer that we have to do it, but it's actually reasonable. Files in `core` and `events` depend on each other creating circular dependencies and other similar hard problem.

Reviewed By: mdvacca

Differential Revision: D14195022

fbshipit-source-id: 96a44ae28631cc9ccd7d7de72a94526f9e0dd12a
2019-02-25 19:12:08 -08:00
David Vacca 19765c9b8c update props during pre allocation of views
Summary:
This diff changes the pre-allocation of Images update the props on the ImageViews during the creation of ShadowNodes instead of during rendering.

The purpose of this change is to optimize TTI.

Reviewed By: shergin

Differential Revision: D14214844

fbshipit-source-id: b81005f2bf494f62f421dc24846e1561e13b9a87
2019-02-25 17:21:24 -08:00
Spencer Ahrens ea54ceca13 basic useNativeDriver functionality
Summary:
Not super clean, but not terrible.

Unfortunately this still relies on the old Paper UIManager calling delegate methods to flush the operations queues. This will work for Marketplace You since Paper will be active, but we need to fix this, along with Animated Events which don't work at all yet.

Random aside: it seems like taps are less responsive in fabric vs. paper, at least on iOS. There is a sporadic delay between the touches event coming in nativly to the JS callback invoking the native module function to start the animation - this will need some debugging.

Reviewed By: shergin

Differential Revision: D14143331

fbshipit-source-id: 63a17eaafa1217d77a532a2716d9f886a96fae59
2019-02-25 12:25:34 -08:00
Valentin Shergin 53e15c9e95 Fabric: `event/primitive.h` was splitted into several files
Summary: It's handy to have all in one file but it also make it hard/impossible to fight with circular dependencies, so I had to slit it.

Reviewed By: mdvacca

Differential Revision: D14188546

fbshipit-source-id: 20809f1ea227c6f8f32922ed5760226248b718e3
2019-02-25 12:21:01 -08:00
Valentin Shergin af1808de69 Fabric: RootShadowNode::clone() fix
Summary:
The previous implementation of the method cloned the root node twice (one time at the very end of the method and one time at the end of loop body).
The new one does it once and a bit more readable.

Reviewed By: mdvacca

Differential Revision: D14187969

fbshipit-source-id: 9859deadd4b041ac115c37108188aab70200c75d
2019-02-25 12:21:01 -08:00
Valentin Shergin 30141e230d Fabric: Clone function for RootShadowNode
Summary:
RootShadowNode does not have ComponentDescriptor counterpart (because it cannot be created via UIManager) and we used to always clone it manually.
However, apparently, some algorithms (e.g. clone algorithm inside RootShadowNode, which is used by setNativeProps) require valid clone function associated with the node.
So, we implement it.

Reviewed By: JoshuaGross

Differential Revision: D14187762

fbshipit-source-id: a9b6b332a18583217ff0e4f9c15aea0ffb113ba2
2019-02-25 12:21:01 -08:00
Valentin Shergin e00f62022e Fabric: More flexible definition of ConcreteViewShadowNode
Summary:
The ConcreteViewShadowNode was changed to be independend of actual amount of template arguments of ConcreteShadowNode.
We will use it soon.

Reviewed By: JoshuaGross

Differential Revision: D14187761

fbshipit-source-id: b4c8051e2ae3803932713b0c255492466e80d3bd
2019-02-25 12:21:01 -08:00
Spencer Ahrens 37d04a5f5f fix rotation transforms
Summary:
* "rotate" is often used as shorthand for "rotateZ"
** Paper handles this here: diffusion/FBS/browse/master/xplat/js/react-native-github/React/Views/RCTConvert%2BTransform.m$89
* Sometimes react sends a string with units, e.g. "45deg", so we need to convert that to a Float.
** Paper handles this here: diffusion/FBS/browse/master/xplat/js/react-native-github/React/Views/RCTConvert%2BTransform.m$14-27

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D14154173

fbshipit-source-id: 53d7405f26c78bb470d46879309c9697d9985c1c
2019-02-22 13:35:41 -08:00
Joshua Gross 286abc5d08 Enable profile builds by adding ObjC annotations
Summary: Currently xcode fails profile builds since these variables are unused when asserts are disabled.

Reviewed By: PeteTheHeat

Differential Revision: D14160565

fbshipit-source-id: 997352dd148d23c28fa92d4171071c1abbb742f5
2019-02-21 12:40:38 -08:00
Valentin Shergin 7b62dca921 Fabric: Removed unnecessary const_cast leftovers
Summary: Trivial. If it compiles, it works.

Reviewed By: JoshuaGross

Differential Revision: D14146579

fbshipit-source-id: 6f6895d1634709a5bde012850c5df756171320ab
2019-02-21 10:46:52 -08:00
David Aurelio 9b6bbe69d6 Move node cloning to `YGConfig`
Summary:
@public

Encapsulates node cloning within `YGConfig`.
This is necessary for allowing for context-aware cloning functions, which will ultimately allow for removal of weak global JNI references.

Reviewed By: shergin

Differential Revision: D14132608

fbshipit-source-id: 0dec114c8e172b1e34a4b7fd146c43f13c151ade
2019-02-20 11:59:21 -08:00
Eric Lewis c3df673f12 Fabric: Fix dangling brace (#23540)
Summary:
This pull request fixes a dangling brace, causing Xcode to be unable to build RCTFabricSample.

[General] [Fixed] - Fabric: Xcode build issue
Pull Request resolved: https://github.com/facebook/react-native/pull/23540

Differential Revision: D14142990

Pulled By: hramos

fbshipit-source-id: d6c2313d831e2ea5d22c77543814b86bfe8a1d53
2019-02-19 21:55:18 -08:00
Héctor Ramos 2c25e34060 Use new yearless copyright header format
Summary: Use the new copyright header format used elsewhere in the React Native repository.

Reviewed By: shergin

Differential Revision: D14091706

fbshipit-source-id: b27b8e6bcdf2f3d9402886dbc6b68c305150b7d5
2019-02-19 10:35:12 -08:00
Jonathan Kim c02f278d8f xplat// -> fbsource//xplat/ for xplat/js
Reviewed By: scottrice

Differential Revision: D14076351

fbshipit-source-id: f803d2af438a5eb3f18c981793e17b6293d8ef1c
2019-02-14 23:53:32 -08:00
Valentin Shergin b3961aff2a Fabric: Fixed small perf problem in RCTImageManager
Summary:
This changes fix small perf problem in RCTImageManager (and layout!) saving (in my completly non-scientific tests) up to 2 ms.
Maybe that's not much, but it fires during layout (and ShadowNodeTree reconsiliation processes), so it has to be very performant.

Reviewed By: JoshuaGross

Differential Revision: D14072077

fbshipit-source-id: 0baa54584dc3ae6a5f43be13fd152b84801c8539
2019-02-14 20:09:16 -08:00
Valentin Shergin 13d87e9ad2 Fabric: Fixed object ownership problem in ImageManager
Summary:
Sometimes, when we deal with ImageRequest and ImageResponseObserverCoordinator we subscribe for status (or access the coordinator) without owning an ImageRequest. In those cases, we have to retain the coordinator explicitly.
For those cases, ImageRequest now exposes `ImageResponseObserverCoordinator` as a `std::shared_ptr`.

Eg, concretely in the code, `completionBlock` and `progressBlock` copied a raw pointer to the observer inside which can lead to a crash when ImageRequest is being deallocated before we received an image data.

Reviewed By: JoshuaGross

Differential Revision: D14072079

fbshipit-source-id: e10120bc05bf685e288f7b3d69092714dcd91d43
2019-02-14 00:43:03 -08:00
David Vacca 959fdf6049 ReadableNativeMap -> ReadableMap
Summary:
This diff refactors JNI methods used by the Binding.cpp class in order to use ReadableMap instead of ReadableNativeMap
This will be helpful to provide a different implementation of ReadableMap from C++

Reviewed By: shergin

Differential Revision: D14077762

fbshipit-source-id: 595b0c2d3a2d6070112257b65c1141a8af36f0e1
2019-02-14 00:07:40 -08:00
empyrical 1ec9325bae Fabric: Change naming scheme of `ShadowNodeFragment` placeholders (#23437)
Summary:
This pull request implements some suggestions made in #23414, namely:

* Rename `ShadowNodeFragment::nullSharedProps()` (and family) to `ShadowNodeFragment::propsPlaceholder()`;
* Introduce similar functions for the rest of members (tag and rootTag);

Later pull requests to remove designated initializers from Fabric (for MSVC support) will use these

I'd like to do the rename of `rootTag` to `surfaceId` as well, but would make sense to do in a separate diff as that would result in a great deal of changes.

[General] [Changed] - Changed naming scheme of `ShadowNodeFragment` placeholders, and added placeholders for remaining members
Pull Request resolved: https://github.com/facebook/react-native/pull/23437

Reviewed By: mdvacca

Differential Revision: D14072007

Pulled By: shergin

fbshipit-source-id: d5bb10a82c16d45955f417a49b503f215c4bc521
2019-02-13 22:03:01 -08:00
empyrical 1cb34cb761 Fabric/DebugStringConvertibleItem.h: Fix for MSVC (#23436)
Summary:
This pull request removes a constructor in `DebugStringConvertibleItem.h` that was causing this issue in MSVC:

```
DebugStringConvertibleItem.cpp(20): error C2600: 'facebook::react::DebugStringConvertibleItem::DebugStringConvertibleItem': cannot define a compiler-generated special member function (must be declared in the class first)
```

It was likely conflicting with the constructor that has default values for all of its arguments.

[General] [Fixed] - Fixed `DebugStringConvertibleItem` compilation on MSVC
Pull Request resolved: https://github.com/facebook/react-native/pull/23436

Reviewed By: shergin

Differential Revision: D14067760

Pulled By: mdvacca

fbshipit-source-id: 303cf9b3559932c3d06514a1f3a8739d0f6f9dc2
2019-02-13 18:59:33 -08:00
Valentin Shergin 222e650885 Fabric: Systraces are temporary disabled in Fabric C++ code
Summary: Now in BUCK file only, not in code.

Reviewed By: JoshuaGross

Differential Revision: D14019271

fbshipit-source-id: e1396be7156a374a1379a147ddecb83b51686121
2019-02-11 16:01:05 -08:00
Valentin Shergin 77838b5504 Fabric: Systraces are back
Summary:
It's better to comment `DWITH_FBSYSTRACE` out in BUCK files instead of removing them from the code.
I'll publish the BUCK changes as separate diff for simpler backout in the future.

Reviewed By: mdvacca

Differential Revision: D14019272

fbshipit-source-id: 8b322b5c115efe33c15929e008b97a05220813df
2019-02-11 16:01:05 -08:00
Valentin Shergin 1a26f97eb0 Clang-format for all files in Fabric folder
Summary:
Trivial.
If you have troubles with rebasing on top of this revision, run this on your diff:
$ find */*.h */*.mm */*.cpp */*.m -exec clang-format -style=file -i {} \;

Reviewed By: JoshuaGross

Differential Revision: D14018903

fbshipit-source-id: fd0ce2da0e11954e683385402738c701045e727c
2019-02-11 13:07:09 -08:00
Valentin Shergin 21290b569b Fabric: Enable all Fabric tests for Android
Summary: All our C++ Fabric tests are cross-platform, so it makes sense to run them for all platforms (especially because platform may behaive differently).

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D13984574

fbshipit-source-id: e384c03c7f9839be38a1910e04ba2f7725abc378
2019-02-08 20:18:19 -08:00
David Vacca 6a71d51250 Trivial rename
Summary: Trivial rename

Reviewed By: fkgozali

Differential Revision: D14011984

fbshipit-source-id: dd2e7e0221bdad7b482c6a39b1cc877779c9704c
2019-02-08 18:55:35 -08:00
Valentin Shergin fd3b8f2000 Fabric: Introducing Better: For faster, clear and ideomatic codebase
Summary:
`Better` is a trivial collection of basic tools borrowed from other low-level general purpose libraries (like Folly, Abseil or Boost). The main goals of Better:
 - Make the codebase more portable;
 - Make the dependency list explicit (by decoupling it as a dependency list of Better);
 - Make relying on modern C++ patterns and tools in code simple and easy.
 - Make executing experiments with different dependencies easier.

 As a first example usage, this diff replaces std::unordered_map with an efficient one from folly on the one of the hottest paths.

Reviewed By: JoshuaGross

Differential Revision: D13944565

fbshipit-source-id: 5fa2c4abe6c17f7361eddcc25f968b6440d5d9db
2019-02-08 13:57:33 -08:00
Valentin Shergin 9842e39019 Fabric: folly::dynamic was replaced with RawValue in prop-parsing infra
Summary:
Our long-term plan is to completely illuminate `jsi::Value`-to-`folly::dynamic` serialization step in prop parsing process improving performance and memory pressure. At the same time, we don't want to introduce a hard dependency in application code to JSI because it exposes direct access to VM and prevents parsing some data that come *NOT* from JSVM.
RawValue is an extremely light-weight (hopefully fully optimized-out) abstraction that provides limited JSON-like and C++-idiomatic interface.

The current particular implementation is still using `folly::dynamic` inside, but I have fully JSI-powered one which will replace the current one right after we figure out how to deal with folly::dynamic-specific callsites. Or we can implement RawValue in a hybrid manner if a code-size implication of that will be minimal.

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D13962466

fbshipit-source-id: e848522fd242f21e9e771773f2103f1c1d9d7f21
2019-02-06 16:34:46 -08:00
Valentin Shergin b0c8275369 Fabric: Lost comment in EventQueue
Summary: Just a comment.

Reviewed By: JoshuaGross

Differential Revision: D13962465

fbshipit-source-id: 31780a8ccf02d768e3d4b91e7205ceb0ee10fedf
2019-02-06 16:34:46 -08:00