Commit Graph

40 Commits

Author SHA1 Message Date
Samuel Susla ce50c43986 Add more clang tidy rules
Summary:
changelog: [internal]

Add more clang tidy rules to prevent common class of bugs.

Reviewed By: javache

Differential Revision: D39245194

fbshipit-source-id: 5521c5c4653d7005b96ebba494e810ba5075afbc
2022-09-06 07:01:17 -07:00
MaeIg db284ae037 Don't capitalize words starting by a number (fabric renderer) (#33629)
Summary:
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->

Few month ago, I created a [pull request](https://github.com/facebook/react-native/pull/32774) to unify the behavior of capitalize style between Android and IOS.

But, I found out that it doesn't work when fabric is enabled. We have the old behavior :
| Android | IOS |
| ------------- | ------------- |
| <img width="458" alt="capitalize_android_fabric" src="https://user-images.githubusercontent.com/40902940/163182082-4061003c-230b-46f7-9e93-c34b66dbf3d2.png"> | <img width="476" alt="capitalize_ios_fabric" src="https://user-images.githubusercontent.com/40902940/163182124-b6dee450-46e3-41a3-b5bb-553d7c2662e6.png"> |
(source: rn-tester, last commit: dac56ce)

As fabric is now live since v0.68, we should fix this behavior for fabric aswell.

I don't know why there is so much duplicated code between `ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm` and `Libraries/Text/RCTTextAttributes.m` because I don't know the architecture of the project very well. But if you see missing tests or some refacto to do I'm open to suggestions!

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Fixed] - Don't capitalize the first letter of a word that is starting by a number (Fabric renderer)

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

Test Plan:
I manually tested these changes on rn-tester (react-native `main` branch):
| Fabric ? | Android | IOS |
| ------------- | ------------- | ------------- |
| YES | <img width="458" alt="capitalize_android_fabric" src="https://user-images.githubusercontent.com/40902940/163182082-4061003c-230b-46f7-9e93-c34b66dbf3d2.png"> | <img width="476" alt="capitalize_ios_fabric_after" src="https://user-images.githubusercontent.com/40902940/163184277-6c58c117-7144-4f6b-98ea-0c1db654f27b.png"> |
| NO | <img width="458" alt="android_nf_after" src="https://user-images.githubusercontent.com/40902940/163190263-9d801f6a-09c2-4ec6-a841-3dca115a5ef7.png"> | <img width="476" alt="ios_nf_after" src="https://user-images.githubusercontent.com/40902940/163190333-7e9eac6a-3f28-4826-8ef9-bcf45bf870a9.png"> |

Reviewed By: cortinico

Differential Revision: D35611086

Pulled By: GijsWeterings

fbshipit-source-id: 0c43807dcddb30e65921eb1525c0fe440162ec32
2022-04-22 06:15:21 -07:00
Andrei Shikov 2a6a6851ec Rename C++ part of ReadableMapBuffer to JReadableMapBuffer
Summary:
Aligns naming with `JWritableMapBuffer` and other fbjni classes to indicate that it is a JNI binding.

Changelog: [Internal] - Rename C++ part of ReadableMapBuffer to JReadableMapBuffer

Reviewed By: mdvacca

Differential Revision: D35219323

fbshipit-source-id: a7eb644a700a35dc94fa18e4fb3cc68f2cfa3e99
2022-03-30 20:27:23 -07:00
Andrei Shikov d63bf4add3 Align ReadableMap and MapBuffer measure methods in ViewManager
Summary:
Aligns two codepaths for measure, making sure we can use both MapBuffer and ReadableMap for measuring components.

Changelog: [Internal] - Align measure interface for MapBuffer experiment

Reviewed By: javache, mdvacca

Differential Revision: D34960317

fbshipit-source-id: a39eb84a0abb4414717463f2f1741e470be3531f
2022-03-18 00:36:07 -07:00
Andrei Shikov 0a004927ad Extract mapbuffer from reactutils module
Summary:
`MapBuffer` is not used in RN utils for anything shared for now, so we can remove it from the build config by reordering methods, shaving 20KB in APK size for each architecture.

Also applies clang-tidy rules to `MapBuffer`/`folly::dynamic` configurations.

Changelog: [Internal] - Remove `mapbuffer` dependency from `Android.mk` of reactutilsjni

Reviewed By: javache, cortinico

Differential Revision: D34620455

fbshipit-source-id: ad3717448f5c20fd071f71d436bb9dd00efe7eb0
2022-03-12 11:19:57 -08:00
Samuel Susla a159416333 Use std::optional instead of butter::optional
Summary: changelog: Use std::optional instead of butter::optional

Reviewed By: fkgozali

Differential Revision: D33352680

fbshipit-source-id: 45a53fec181a6ffb6218909bc23348f7c9f21ec4
2022-03-04 07:25:59 -08:00
David Vacca be9cf17316 Move TextLayoutManager constructor to Cpp file
Summary:
Move TextLayoutManager constructor to Cpp file

changelog: [internal] internal

Reviewed By: genkikondo

Differential Revision: D34246014

fbshipit-source-id: a85e144b05e2cefad8cb1757dad14bedacbb8d74
2022-02-27 22:23:48 -08:00
David Vacca 3fb3ce4fa2 Delete TextMeasurement destructor
Summary:
TextMeasurement destructor is not necessary, we are deleting it

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D34246015

fbshipit-source-id: 6ca4803fafc8b195828d546ba8fb45353257f383
2022-02-27 22:23:48 -08:00
David Vacca 926ab6ca26 Mark TextLayoutManager as not copyable / not movable
Summary:
TextLayoutManger should be not copyable / not movable

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D34246013

fbshipit-source-id: dc20db2ad9e2709ddca5bef5218356bd2b292c2d
2022-02-27 22:23:48 -08:00
Pieter De Baets 45af635b1e Fix some nits/typos in MapBuffer
Summary:
Was trying out some behaviour when using the MapBuffer experiment and fixed some small issues.

Changelog: [Internal]

Reviewed By: ShikaSD

Differential Revision: D34108859

fbshipit-source-id: 550ca0847419006ec17472cc4b70d38fc8d05396
2022-02-15 14:06:42 -08:00
Samuel Susla 681ed402de Turning on clang tidy performance-*
Summary:
changelog: [internal]

Enable performance related clang tidy rules.

Reviewed By: javache

Differential Revision: D33350556

fbshipit-source-id: 486446ed0a1ac88af21b691ac6905b4f2359dafc
2022-01-05 05:53:13 -08:00
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Samuel Susla d8d4e95697 Enable modernize-use-nullptr clang tidy rule
Summary:
changelog: [internal]

You can read more about this rule on https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html

Reviewed By: rubennorte

Differential Revision: D33296118

fbshipit-source-id: ba9de4611c0f0459db9cea56722385e2541b155e
2021-12-23 10:21:09 -08:00
Samuel Susla bf9872a7b5 Enable modernize-use-equals-default clang tidy rule
Summary:
changelog: [internal]

You can read more about this rule on https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html

Reviewed By: rubennorte

Differential Revision: D33295116

fbshipit-source-id: d7da62c35e141fc2bf5a83c28f80f4f8d355c4cb
2021-12-23 10:21:09 -08:00
Samuel Susla 6d1d2fe2b8 Enable modernize-use-auto clang tidy rule
Summary:
changelog: [internal]

You can read more about this rule on https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html

Reviewed By: mdvacca

Differential Revision: D33281781

fbshipit-source-id: 8e23becb74305e282993fe6b3996fa1a5878cf98
2021-12-23 03:55:16 -08:00
Samuel Susla 26fffe8cbf Enable modernize-loop-convert rule in clang-tidy
Summary:
changelog: [internal]

You can read more about this rule on https://clang.llvm.org/extra/clang-tidy/checks/modernize-loop-convert.html

Reviewed By: ShikaSD

Differential Revision: D33253673

fbshipit-source-id: db2ec74cc584f2e8eb74ce54c4f50986d8168387
2021-12-22 08:22:44 -08:00
Samuel Susla bcc4ab35da Remove use of TextLayoutManager::Shared and SharedTextLayoutManager
Summary:
changelog: [internal]

For some reason, using `TextLayoutManager::Shared` in `TextInputShadowNode` trips up clang tidy linter. We have a plan to move away from `*::Shared` anyway, so let's remove it from `TextInputShadowNode` now.

Why do we want to move away from `*::Shared`?
Using `TextLayoutManager::Shared` is confusing for people unfamiliar with Fabric's codebase. It expresses a concept of immutability but uses term `shared`. Term shared is already used in C++  `std::shared_ptr`.

Reviewed By: fkgozali

Differential Revision: D33186422

fbshipit-source-id: 10ee588735997f5fedc372a1d1e3d9cd9684178a
2021-12-22 04:20:42 -08:00
David Vacca 8f6aee0df5 Create experiment to increase size of TextMeasureCache and enable in RNPanel apps
Summary:
Fabric uses a cache where it stores the result of the text measurement in C++ (to avoid unnecessary text measurement that are very costly). This cache has a "max size" of 256 and this size is not enough to store all the texts we have in the screen

In my tests, the amount of texts being measured are ~290 and after scrolling many times they increase to 611.

This diff increases the size of the TextMeasure to 1024 for users in the experiment. As a result this improves performance of HoverEvents by +5x times (see test plan)

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D33112788

fbshipit-source-id: e15feecf0f54da62b252892d37a64fb4ead29e22
2021-12-14 19:33:09 -08:00
Phillip Pan def7dd857d use new instead of alloc init
Summary:
i saw this a lot in the codebase, it's not optimal bc we're using two selectors when we only need one.

  fastmod --extensions m,mm '\[\[(.*) alloc] init]' '[${1} new]' --dir xplat/js/react-native-github/*

i manually updated the callsites that this codemod couldn't handle (e.g., where there were more than one of these instances in a single line)

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D31776561

fbshipit-source-id: 1b16da240e8a79b54da67383d548921b82b05a9f
2021-10-20 22:18:38 -07:00
Rob Hogan 61755aced1 Merge textDecoration(LineStyle|LinePattern) into textDecorationStyle
Summary:
The [first implementation of `TextAttributes` in Fabric](https://github.com/facebook/react-native/commit/62576bcb7832e08c6fd9f9482285882c37a2ece5) included two separate props instead of `textDecorationStyle`: `textDecorationLineStyle` (single, double, ...) and `textDecorationLinePattern` (dot, dash, dotdash, ...). These two props were implemented in C++ and iOS but never supported in JS.

Pre-Fabric (and CSS) on the other hand use a single prop `textDecorationStyle: 'solid' | 'double' | 'dotted' | 'dashed'`.

This diff implements this same API in Fabric, and removes the unused `textDecorationLineStyle` and `textDecorationLinePattern` props.

Changelog:
[iOS][Fixed] - Implement `textDecorationStyle` on iOS and remove unused `textDecorationLineStyle` and `textDecorationLinePattern` from Fabric.

Reviewed By: dmitryrykun

Differential Revision: D31617598

fbshipit-source-id: f5173e7ecdd31aafa0e5f0e50137eefa0505e007
2021-10-18 02:16:03 -07:00
Dmitry Rykun 4a9621647c TextTransform prop implemented
Summary:
Changelog: [iOS] [Fixed]
TextTransform is applied when constructing NSAttributedString from C++ AttributedString in Fabric.

Reviewed By: sammy-SC

Differential Revision: D30515821

fbshipit-source-id: 8a824ff89919832f79ace693dfe3cf7ed35c3beb
2021-08-26 06:57:14 -07:00
Jimmy Zhang 11f8d9c7cd Add support for the UIAccessibilityTraitsTabBar
Summary:
Changelog:
Add the capability to set tabbar accessibilityRole which maps to the iOS's UIAccessibilityTraitsTabBar

Reviewed By: yungsters

Differential Revision: D30490752

fbshipit-source-id: f7561a8932306e133d2f65a5ab40ba0be3899ec3
2021-08-24 02:31:17 -07:00
Samuel Susla 79090c4802 Fabric: Decoupling Telemetry aggregation classes into a separate module
Summary:
We need to do this to break a dependency cycle that would happen if we try to have `view` depend on `mounting` just to add some telemetry to `view`.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: mdvacca

Differential Revision: D26827446

fbshipit-source-id: 4c415ebf5be3a02c18c80ea8a4a77068cae0f0fe
2021-03-29 05:12:42 -07:00
David Vacca 91b3f5d48a Implement and integrate Mapbuffer
Summary:
This diff contains the code from the 35 diff stack  - D27210587

This diff implement and integrates Mapbuffer into Fabric text measure system

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D27241836

fbshipit-source-id: f40a780df0723f27da440f709a8676cfcca63953
2021-03-24 03:52:31 -07:00
Valentin Shergin 60f15d6b5d Tracking time spent on measuring text in TransactionTelemetry
Summary:
Now we not only measure how many times we measured text but also measure how much time it takes. This way we can see which portion of the layout process is spent by layout itself (and measuring embedded components).

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: mdvacca

Differential Revision: D26827447

fbshipit-source-id: e0b09fcacc86aed50dd94b48458215adbb0a60ef
2021-03-11 14:34:22 -08:00
Valentin Shergin f27621465d Fabric: Fixes in Android TextLayoutManager for better caching performance
Summary:
The is how it works:
* Text is a quite special component with special properties and constraints. Some of them are:
It's expensive to measure (layout) text. It's expensive to measure and expensive to pass AttributedString via JNI.
* When we measure text, we don't concerned about maximum height, only maximum height is important. (Even though theoretically, there are text layout systems that can balance these constraints (max height and width) trying to find a perfect result, we don't use such complex (and expensive) layout engines for building UIs).

Yoga, as a flexbox engine, does not aware of such constraints, so it requests remeasuring of text components quite often, so we have an RN built-in text measure cache system just for text measurements that suit these constraints. This way when Yoga requests a text measuring, we always measure with `Inf` height and store that result in the cache. And when Yoga requests another measure with the same width but a different height we retrieve the value from the cache and then just clamp it.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: mdvacca

Differential Revision: D26696637

fbshipit-source-id: f65b275d33c77073bc2359cbf0a741ddcf05d8d4
2021-02-28 08:47:05 -08:00
Andres Suarez 0f4f917663 Apply clang-format update fixes
Reviewed By: igorsugak

Differential Revision: D25861683

fbshipit-source-id: 616afca13ae64c76421053ce49286035e0687e36
2021-01-09 22:11:00 -08:00
David Vacca 59f8b6adbb Extract measure() Android function into an utility method
Summary:
This diff extracts the measure() Android function into an utility method.
As part of this diff I'm also refactoring one of the usages of this method (Text)

Additional refactors will be done as part of other diffs

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D25721046

fbshipit-source-id: 76cc6a8088607aaae5055c675076a0c18fc322ec
2020-12-28 23:25:03 -08:00
Pieter De Baets 729e535137 Fix TextLayoutManager cxx stubs
Summary: Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D24702815

fbshipit-source-id: 5928e66ed881a9a3e80d0a2c604d5ce578253fd6
2020-11-05 03:02:03 -08:00
Joshua Gross d5076c6c8f Fix some JNI table leaks, more aggressively clean up memory
Summary:
There are a few places where we have JNI table ref leaks, and more places where we can aggressively clean up smart pointers immediately instead of waiting for them to be cleaned up at some later point.

In theory these smart pointers should be cleaned up immediately, but in cases where many components are being measured at once, the JNI table could grow until all measure calls are done. In extreme cases this
could cause a crash, which I want to avoid. At the very least, freeing memory more aggressively in this case can't hurt.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D24293775

fbshipit-source-id: 159741ba955e5a6fe02caf6e65d1e4d6d4afadee
2020-10-14 00:01:21 -07:00
Samuel Susla c1af56df71 Wire call from C++ to Java to get lines measurements
Summary: Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D23782998

fbshipit-source-id: fa9bda274c024d5bbd3ca24f394b5d76f8c07ad2
2020-09-22 01:53:24 -07:00
Valentin Shergin 5b93c49e76 Fabric: Using pre-cached UIColor objects for black, white, and clear colors
Summary:
This change maps the three most used colors (black, white, clear) to corresponding predefined values in UIColor. This should meaningfully reduce the overall amount of allocated UIColor/CGColor objects. In my non-scientific measures, it reduces the number of CGColor objects from ~1500 to ~1000. And... it no much at least in terms of kilobytes. However, I still think it's a good idea to implement this because I hope that can remove some work from memory allocation infra and maybe enable some optimizations that UIKit hopefully does for black and white colors. (I tend to believe that this optimization exists because UIKit even has a classes called UIDeviceWhiteColor and UICachedDeviceWhiteColor.)

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: JoshuaGross

Differential Revision: D23753506

fbshipit-source-id: 46e58dc7e6b0dcab3c83d29c7257c90ffbd95246
2020-09-17 11:12:29 -07:00
Valentin Shergin 241795cbc4 Fabric: Color conversion functions now do not depend on internal implementations of SharedColor
Summary:
This diff changes the implementation of `RCTCreateCGColorRefFromSharedColor` and `RCTUIColorFromSharedColor` in such a way that they don't rely on the fact that SharedColor is actually a `shared_ptr<CGColorRef>`. Instead, the methods just extract color components from SharedColor and create UIColor and CGColorRef objects on demand.
This allows us to change the implementation of SharedColor without worrying much about the rest of the system, which will do in the next diff.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: JoshuaGross

Differential Revision: D23753510

fbshipit-source-id: 340127527888776ebd5d241ed60c7e5220564013
2020-09-17 11:12:28 -07:00
Joshua Gross 0b3f46b564 Deallocate JNI array after TextInput text measurement
Summary:
Every time we measure a TextInput we allocate a JNI local array and weren't cleaning it up, leading to JNI table exhaustion.

Changelog: [Internal]

Differential Revision: D23670780

fbshipit-source-id: 2ecf9770c8593eeadd70a248be58037fefdca61e
2020-09-12 21:53:22 -07:00
Joshua Gross 44229d9149 Fix key mismatch in text layout
Summary:
Changelog: [Internal]

There was a key mismatch between what Java and C++.
cacheIdMap was incorrectly initialised.

Differential Revision: D23652342

fbshipit-source-id: 66f54dc887a011afeead9420bda093e9a0c9a8ca
2020-09-12 21:53:22 -07:00
Andy Matuschak 694e22de84 Fix Catalyst text rendering by disabling inappropriate subpixel-antialiasing (#29609)
Summary:
I noticed when porting my iOS app to macOS via Catalyst that the text rendering was somewhat different on the two platforms. Text looked blurry and over-weight on macOS, even when disabling the Catalyst scaling transform.

I hazily remembered that I'd seen this problem before in my old Cocoa development days: this kind of blurring occurs when rendering text with sub-pixel anti-aliasing into an offscreen buffer which will then be traditionally composited, because when the SPAA algorithm attempts to blend with the underlying content (i.e. in the offscreen buffer), there isn't any. SPAA is disabled on iOS, so the issue wouldn't appear there. On macOS, typical approachs to displaying text (e.g. `CATextLayer`) normally disable SPAA, since it's been incompatible with the platform's compositing strategy since the transition to layer-backed views some years ago. But React Native uses `NSLayoutManager` to rasterize text (rather than relying on the system render server via `CATextLayer`), and that class doesn't touch the context's font smoothing bit before drawing.

This change makes macOS/Catalyst text rendering consistent with iOS text rendering by disabling SPAA.

It appears that the code I've modified is in the process of being refactored (for Fabric?). It looks like [this](https://github.com/facebook/react-native/blob/8d6b41e9bcede07fb627d57cf6c11050ae590d57/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.mm#L111) is the corresponding place in the new code (sammy-SC, is that right?). I'm happy to include a change to the new renderer in this patch if someone can point me at how to test that change.

## Changelog

[iOS] [Fixed] - Improved text rendering on macOS Catalyst

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

Test Plan:
1. Prepare RNTester for running on macOS (or apply [this patch](https://gist.github.com/andymatuschak/d0f5b4fc1a28efc4f860801aa1deddcd) to handle parts 1 and 2, but you'll still need to do part 3):
   1. Open the workspace, navigate to the `RNTester` target's configuration, and check the "Mac" checkbox under "Deployment Info.
   2. Flipper doesn't yet compile for Catalyst (https://github.com/facebook/react-native/issues/27845), so you must disable it by: a) commenting out `use_flipper!` and `flipper_post_install` in the Podfile, then running `pod install`; and b) removing the `FB_SONARKIT_ENABLED` preprocessor flags in the Xcode project.
   3. macOS has different signing rules from iOS; you must set a development team in the "Signing & Capabilities" tab of the `RNTester` target configuration pane. Unfortunately, you must also do this in the `Pods` project for the `React-Core-AccessibilityResources` target ([this is an issue which CocoaPods must fix](https://github.com/CocoaPods/CocoaPods/issues/8891)).
2. Run RNTester with and without the patch. You'll see that the font hinting is overweight without the patch; see screenshots below (incorrect rendering above, correct rendering below; note that fonts still remain slightly blurred because of Catalyst's window scaling transform, but that's removed on Big Sur).

![Screen Shot 2020-08-12 at 10 03 50 AM](https://user-images.githubusercontent.com/2771/90045523-0374c700-dc84-11ea-8945-2d9830bccbd1.png)
![Screen Shot 2020-08-12 at 10 03 15 AM](https://user-images.githubusercontent.com/2771/90045547-0bcd0200-dc84-11ea-88af-37a8879b4efd.png)

Reviewed By: PeteTheHeat

Differential Revision: D23344751

Pulled By: sammy-SC

fbshipit-source-id: 1bbf682b681e381a8a90e152245d9b0df8ec7697
2020-08-26 18:22:54 -07:00
Joshua Gross d602c51996 Simplify TextInput measurements
Summary:
Simplify the TextInput measurement mechanism.

Now, data only flows from JS->C++->Java and from Java->JS. C++ passes along AttributedStrings from JS if JS updates, and otherwise Java maintains the only source of truth.

Previously we tried to keep all three in sync. This was complicated, slow, and even lead to some crashes.

This feels a bit hacky but I believe it's the simplest way to achieve this short-term. Ideally, we would use something like `AttributedStringBox` and pass that to State from Java,
but currently everything passed through the State system from Java must be serializable as `folly::dynamic`. So, instead, we just cache one Spannable per TextInput component and
use ReactTag as the cache identifier for lookup.

An interesting side-effect is that `measure` could race with TextInput updates, but the race condition favors measuring the latest text, not outdated values.

Followups:

- Can we do this without copying the EditText Spannable on every keystroke? Maybe this approach is too aggressive, but I don't want a background thread measuring a Spannable as it's being mutated.
- Do we need to support measuring Attachments?
- How can we clean up this API? It should work for now, but feels a little hacky.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23290230

fbshipit-source-id: 832d2f397d30dfb17b77958af970d9c52a37e88b
2020-08-24 11:59:28 -07:00
Samuel Susla 8d6b41e9bc Add support for onTextLayout in Text
Summary:
Changelog: [Internal]

Add `Text.onTextLayout` implementation

Reviewed By: JoshuaGross

Differential Revision: D22865139

fbshipit-source-id: 563084754ebdc9fb23463a306c526b97c61f85ec
2020-08-10 05:42:20 -07:00
David Vacca 7d5383eea8 Extend 'textlayoutmanager' module to compile in OSS
Summary:
This diff extends the 'textlayoutmanager' module to compile in OSS
As part of this diff I also moved Android files in order to make the module compatible with Android.mk system

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22963706

fbshipit-source-id: 14a7309f589fe12c21131c7d5cef02b4323d4a93
2020-08-07 19:49:19 -07:00
David Vacca 3093010ea5 move fabric to ReactCommon/react/renderer
Summary:
This diff moves fabric C++ code from ReactCommon/fabric to ReactCommon/react/renderer
As part of this diff I also refactored components, codegen and callsites on CatalystApp, FB4A and venice

Script: P137350694

changelog: [internal] internal refactor

Reviewed By: fkgozali

Differential Revision: D22852139

fbshipit-source-id: f85310ba858b6afd81abfd9cbe6d70b28eca7415
2020-07-31 13:34:29 -07:00