mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04ae39e603 |
+1
-1
@@ -98,4 +98,4 @@ untyped-import
|
||||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.284.0
|
||||
^0.281.0
|
||||
|
||||
@@ -17,9 +17,6 @@ runs:
|
||||
- name: Install node dependencies
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Set React Native Version
|
||||
# We don't want to set the version for stable branches, because this has been
|
||||
# already set from the 'create release' commits on the release branch.
|
||||
if: ${{ !endsWith(github.ref_name, '-stable') }}
|
||||
shell: bash
|
||||
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }}
|
||||
- name: Setup gradle
|
||||
|
||||
@@ -383,7 +383,8 @@ jobs:
|
||||
runs-on: 8-core-ubuntu
|
||||
needs: [set_release_type]
|
||||
container:
|
||||
image: reactnativecommunity/react-native-android:latest
|
||||
# Version is pinned to v18.0 to unblock `run_fantom_tests` - see https://github.com/react-native-community/docker-android/pull/242#issuecomment-3280029122
|
||||
image: reactnativecommunity/react-native-android:v18.0
|
||||
env:
|
||||
TERM: "dumb"
|
||||
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
||||
|
||||
+2
-19
@@ -1,21 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## v0.82.0-rc.3
|
||||
|
||||
### Added
|
||||
|
||||
- **Hermes V1:** Added a dependency on hermes-compiler ([0caf8e70d5](https://github.com/facebook/react-native/commit/0caf8e70d53f611a73ad9b55879dfe0a5f036371) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
|
||||
### Fixed
|
||||
|
||||
#### Android specific
|
||||
|
||||
- **Hermes V1:** Changed the coordinates of hermes artifacts when using Hermes V1 ([d0fb33822d](https://github.com/facebook/react-native/commit/d0fb33822de38183895c8b3421f46966909beaf3) by [@j-piasecki](https://github.com/j-piasecki))
|
||||
|
||||
#### iOS specific
|
||||
|
||||
- **Codegen:** Fix regression that skips artifacts code generation ([f6f5ea0b2e](https://github.com/facebook/react-native/commit/f6f5ea0b2eed894725d8f6e8bd045c99c3182026) by [@kitten](https://github.com/kitten))
|
||||
|
||||
## v0.81.3
|
||||
|
||||
### Fixed
|
||||
@@ -82,7 +66,6 @@
|
||||
- **Error Handling:** Unhandled promises are now handled by ExceptionsManager.handleException, instead of being swallowed as Logbox Warnings. ([c4082c9ce2](https://github.com/facebook/react-native/commit/c4082c9ce208a324c2d011823ca2ba432411aafc) by [@krystofwoldrich](https://github.com/krystofwoldrich))
|
||||
- **`shouldEmitW3CPointerEvents`:** Migrate `shouldPressibilityUseW3CPointerEventsForHover` to common private feature flags and remove `shouldEmitW3CPointerEvents` flag. ([fb4587780e](https://github.com/facebook/react-native/commit/fb4587780e8d6111139d73598a9a26ff392dee28) by [@coado](https://github.com/coado))
|
||||
- **TurboModuleUtils:** Remove unused ReactCommon/TurboModuleUtils functions #deepCopyJSIObject and #deepCopyJSIArray ([ead669ade3](https://github.com/facebook/react-native/commit/ead669ade31ee703c407f96c0ce98d8f2991bdc8) by [@christophpurrer](https://github.com/christophpurrer))
|
||||
- **TurboModules:** Delete old location of CallbackWrapper.h / LongLivedObject.h by ([cb94e71](https://github.com/facebook/react-native/commit/cb94e71845259ae7fa823eb4d21cde74fccd7435) [@christophpurrer](https://github.com/christophpurrer))
|
||||
|
||||
#### Android specific
|
||||
|
||||
@@ -97,7 +80,7 @@
|
||||
|
||||
### Added
|
||||
|
||||
- **Animated:** `Animated.CompositeAnimation` is now exposed when using `"react-native-strict-api"` ([024d25794a](https://github.com/facebook/react-native/commit/024d25794a51c94c877c1dfa115a82ebbf559614) by [@huntie](https://github.com/huntie))
|
||||
- **Animated:** `Animated.CompositeAnomation` is now exposed when using `"react-native-strict-api"` ([024d25794a](https://github.com/facebook/react-native/commit/024d25794a51c94c877c1dfa115a82ebbf559614) by [@huntie](https://github.com/huntie))
|
||||
- **Animated:** Allow calling createAnimatedNode without batching ([d9d9a49e18](https://github.com/facebook/react-native/commit/d9d9a49e18f3c51caa18cf7da0a1fcd62f1ecf18) by [@zeyap](https://github.com/zeyap))
|
||||
- **Animated:** Allow filter usage with native animated driver. ([138d0eb01d](https://github.com/facebook/react-native/commit/138d0eb01dbe597261459a37d364d1780c3ef228) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
|
||||
- **API:** Expose NativeComponentRegistry API as JavaScript root export ([f936780cd5](https://github.com/facebook/react-native/commit/f936780cd5c0c17797f9d2bbc8f5cee81c2eefce) by [@zhongwuzw](https://github.com/zhongwuzw))
|
||||
@@ -134,7 +117,7 @@
|
||||
|
||||
- **AGP:** AGP to 8.12.0 ([742ef3d661](https://github.com/facebook/react-native/commit/742ef3d6615c8c1202e9f683e6127ac97d7a9e23) by [@cortinico](https://github.com/cortinico))
|
||||
- **DevSupportManager:** DevSupport `openDebugger()` methods now accept a `panel: String?` param. Frameworks directly implementing `DevSupportManager` will need to adjust call signatures. ([9dba7112cf](https://github.com/facebook/react-native/commit/9dba7112cfd09b02300869a77dba3dca16f49a28) by [@huntie](https://github.com/huntie))
|
||||
- **Kotlin:** Migrated TextAttributeProps to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation. ([fa921b3c7b](https://github.com/facebook/react-native/commit/fa921b3c7b289800a79196468f993a0eb0bf693f) by [@mateoguzmana](https://github.com/mateoguzmana))
|
||||
- **Kotlin:**Migrated TextAttributeProps to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation. ([fa921b3c7b](https://github.com/facebook/react-native/commit/fa921b3c7b289800a79196468f993a0eb0bf693f) by [@mateoguzmana](https://github.com/mateoguzmana))
|
||||
- **Kotlin:** Migrated ReactBaseTextShadowNode to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation. ([8ccfff9a46](https://github.com/facebook/react-native/commit/8ccfff9a46f317fd78f478c8b3f180441535d1ca) by [@mateoguzmana](https://github.com/mateoguzmana))
|
||||
- **Kotlin:** Migrated com.facebook.react.bridge.Arguments to Kotlin. ([2534aeaddb](https://github.com/facebook/react-native/commit/2534aeaddb0490b69dfaba6b8d316616c7e10a9c) by [@mateoguzmana](https://github.com/mateoguzmana))
|
||||
- **Kotlin:** Migrate `YogaConfig` to Kotlin ([4d5caef76b](https://github.com/facebook/react-native/commit/4d5caef76b83eb7e983364ecc81abb6027e5f98e) by [@mateoguzmana](https://github.com/mateoguzmana))
|
||||
|
||||
Vendored
+7
-10
@@ -3995,16 +3995,13 @@ declare class Process extends events$EventEmitter {
|
||||
initgroups?: (user: number | string, extra_group: number | string) => void;
|
||||
kill(pid: number, signal?: string | number): void;
|
||||
mainModule: Object;
|
||||
memoryUsage: {
|
||||
(): {
|
||||
arrayBuffers: number,
|
||||
rss: number,
|
||||
heapTotal: number,
|
||||
heapUsed: number,
|
||||
external: number,
|
||||
...
|
||||
},
|
||||
rss: () => number,
|
||||
memoryUsage(): {
|
||||
arrayBuffers: number,
|
||||
rss: number,
|
||||
heapTotal: number,
|
||||
heapUsed: number,
|
||||
external: number,
|
||||
...
|
||||
};
|
||||
nextTick: <T>(cb: (...T) => mixed, ...T) => void;
|
||||
pid: number;
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
* @format
|
||||
*/
|
||||
|
||||
declare module 'electron-store' {
|
||||
declare export type Schema = any;
|
||||
|
||||
declare export type Options = {
|
||||
+name?: string,
|
||||
defaults?: Object,
|
||||
schema?: any,
|
||||
migrations?: any,
|
||||
beforeEachMigration?: any,
|
||||
clearInvalidConfig?: boolean,
|
||||
serialize?: any,
|
||||
deserialize?: any,
|
||||
accessPropertiesByDotNotation?: boolean,
|
||||
watch?: boolean,
|
||||
encryptionKey?: string | Buffer | $ReadOnlyArray<number>,
|
||||
...
|
||||
};
|
||||
|
||||
declare class ElectronStore {
|
||||
constructor(options?: Options): this;
|
||||
get(key: string): any;
|
||||
get(key: string, defaultValue: any): any;
|
||||
set(key: string, value: any): void;
|
||||
set(object: Object): void;
|
||||
has(key: string): boolean;
|
||||
delete(key: string): void;
|
||||
clear(): void;
|
||||
}
|
||||
|
||||
declare module.exports: Class<ElectronStore>;
|
||||
}
|
||||
+1
-1
@@ -86,7 +86,7 @@
|
||||
"eslint-plugin-relay": "^1.8.3",
|
||||
"fb-dotslash": "0.5.8",
|
||||
"flow-api-translator": "0.32.0",
|
||||
"flow-bin": "^0.284.0",
|
||||
"flow-bin": "^0.281.0",
|
||||
"glob": "^7.1.1",
|
||||
"hermes-eslint": "0.32.0",
|
||||
"hermes-transform": "0.32.0",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@generated SignedSource<<d090ed9a9e781c82884f22944254ed65>>
|
||||
Git revision: 8b84a77b2c82c670886ef064dfc92d6bce83e579
|
||||
@generated SignedSource<<0b54f75686e4893a5444839bf621a317>>
|
||||
Git revision: 5a792db1225adda206313e9bf751198a1ca7851a
|
||||
Built with --nohooks: false
|
||||
Is local checkout: false
|
||||
Remote URL: https://github.com/facebook/react-native-devtools-frontend
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,71 +1,71 @@
|
||||
#!/usr/bin/env dotslash
|
||||
|
||||
// @generated SignedSource<<9c0f52fabb1406dea9e1411186a49f4d>>
|
||||
// @generated SignedSource<<9df662721aea6e3774a8677e2a6065e4>>
|
||||
|
||||
|
||||
{
|
||||
"name": "React Native DevTools",
|
||||
"platforms": {
|
||||
"linux-aarch64": {
|
||||
"size": 116052194,
|
||||
"size": 116056584,
|
||||
"hash": "sha256",
|
||||
"digest": "6ea405e02fb26fd4de16f93a35ea340c4bd3f8dac31e5d25d935f01540b7ff8e",
|
||||
"digest": "fac3912f10e3c373c874be6c4696f11e05cbaa754c116db6ea72189afae5efe6",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQMey7qYki6P6n_9C16jhxcWaGPGaH0dBIM76nl4xNfemVIfEVrvL143BIUFDetFqifepJowUX0BKF4tqnGpAeK_Y-yDzRK86RGK8dPqzx3xUih3niIDVmVt02JZzTpupw8gYhxV9SsuhEfkIIEZHIMOj9QWXkvJbKE-EPYTnwrnsdDkxcVb-ydEDC8"
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPdlYV_w4y_wxd5Rs8c_F-soLMbY1zwXJjD-JM4TkOtOELyxZGyreTb6dTehp_X6e3qVFZUT05ETRs0MbvqYr4mqdb6dkG9DqNQEVv3TBoHwl7TYSygtHJEs3gXTAtMLYEKW9xXODJlVF-9II7fdTdHU7x7Pyf6NR6S3nv7sKUVD-zKpxF50L2TwUQ"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
"path": "React Native DevTools-linux-arm64/React Native DevTools"
|
||||
},
|
||||
"linux-x86_64": {
|
||||
"size": 115921596,
|
||||
"size": 115929093,
|
||||
"hash": "sha256",
|
||||
"digest": "a7a07c684e436bd0f8ccfd3b2cbdb7c5b74b7bd662f60b6a142855568726c44e",
|
||||
"digest": "06bbaeb62ae2e0081d184eba42b9f15be0d0b3f4901142b08a8a1430ff83e722",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQOAG_xwP5LIc02siy7Er7cAhxD4GBoIYYbGe9jC9sDQe7rU_RGP0k553rIPMdFmDEmE210O83SjHn6g3VUWnxzatO4oqgy7cWfJzYFbYymxI8sac2hMFKH7Fe4S9nlovqHGkw63_3tzGFdxTa2gG99A46-zYfqEgFrvMlTCdd64D2tV1ut9Q5aP"
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPENbrxrg0RF_TiyxSY_YVYqC1UfRKj_bMfKb3qHUsIhBlya8n3FkbfJqTXTNdqL4riFRulXS5ecXZprtvk_9kao-zY59r3kiTRwobzF0jnjM507_9UOnEHWzG5ZJYzQyOtS3kQmT0HwZabVj9qw38OB9mk-MPVCZIPZay2PRnIThBzpKDoOOP9"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
"path": "React Native DevTools-linux-x64/React Native DevTools"
|
||||
},
|
||||
"macos-aarch64": {
|
||||
"size": 110891220,
|
||||
"size": 110891603,
|
||||
"hash": "sha256",
|
||||
"digest": "47b256fa80b5158e80cb9a308ba62d655f3ad9b5069edb5272b10b771996e31f",
|
||||
"digest": "eeb9cc1399c0c38c429848dbf622f1b46e88d7d97788dcdc4c30a9fcce37705c",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPtR9VRT74xLvGOA6aY6HIx2OL-8diOgIClmMqp1IomIRj7IwORZ6DwZIEp__xGLyAIN1g7XNr9tTJ7W1OgDW7Kq74xtgc7UTve04Wz1y2ftpIDaSX5G4zUd2h6TTRCFWXz3ey3hLN1LmoeFE0p0--ajTQaPT0T-MipxvI5KAu_DimzBZL78e4CE_hV"
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQN9bd7nbXi-uF_MooJEiUL2jJVifMqgQxZ236aqbSdiJe5Uzjud5ANf0LDAl8GDVVRShd6x4B-gsZ-qRowH0qJikoGatQIkBgyzp4i8ors52etGOIIwdAxdNIng5Vtp441j2_N__btkJqlHcMMbbqvO8fg9oeYTlhMpOx3MLLWXIlG7ix5IFUDiYChf"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
|
||||
},
|
||||
"macos-x86_64": {
|
||||
"size": 117768466,
|
||||
"size": 117770388,
|
||||
"hash": "sha256",
|
||||
"digest": "5a6da66e54213e6fe764563a4b952e311e7dd9bbe24566226003ac04dd4505cd",
|
||||
"digest": "a65e446e526502b267cbe6800ae031e4e1b5b0aca21412152a66ffe1d3a29410",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPE0gNVns9ZPmZNcsdsLq0FELH3tLhSERRZF1-IUaNnYUzUtjtPAIC3GeDqx1VOtFw2NMzO5oAl9Ei3CEf30lbNU-7iq65JL2xgXQMamI81tz8IwKEhul9f1GHIOb9qrTohGa-D3XeEFDDjNygMA4r9oXZqQol1nINLebnXUVhbEh92kfWZKZZguQ"
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQN29ukKLZS48QcCU-gms06YFnG-fxxDfrWTup-Z6KoIAP-QEu3sFzrpqeZz4g-jFsh3o-IIoHJsdbu4a2U7ROjPfWGguGJrPK8fdc3iV67Qw1_VAPU13dm0dI1DbSY50ah05wh43jdBG3LGCAYYJ-W8_mZMC3HqM2v-8KVd-DoPT4hOh1s9CCFgEQ"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
|
||||
},
|
||||
"windows-x86_64": {
|
||||
"size": 125527605,
|
||||
"size": 125526370,
|
||||
"hash": "sha256",
|
||||
"digest": "630102d4174fea343452a595f9f74f7817553f3e6573f7479b8990d0fe8ec27b",
|
||||
"digest": "26b190c0f85249dee91999e020b8fe7ffd5c007458a2103ed3822558861dbe87",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQP6r04FTh5QxNDyLwpzq5rPLpVmkzLJj7x9XVGcPdJyS_oAQOIdHOCpIGgl8yKVJjE2rdhlWLSb04OoHrWJ5Yx_R-6RXBjgvY_DcntfXMnzHDUr5sZ3Ca1zTlt6_wbFYUHpdiGougDIirzEsb3dxCsIBIOkH5UPDbVzXrlN0qlCtJPLWcBzdKaI"
|
||||
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQO0mdIJx1eYiSDJNiAZ2soaeECILayWnvOeiey-fpS4ydDTreAMfwL4QZ5GZo4-AsGwOXCSdF3hBMM2ufnvw6BDFg5UEiTc4DALJu7o6YBBG4wlVZbI-2kkaXd7u8RhBQPjmhsdcX3sDmCGmSr3WK9EkTRKStE2lb6ilOn-969h4dYWekwUUCSX"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron": "37.2.6",
|
||||
"electron-store": "^8.2.0",
|
||||
"semver": "^7.1.3"
|
||||
},
|
||||
"files": [
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
|
||||
// $FlowFixMe[unclear-type] We have no Flow types for the Electron API.
|
||||
const {BrowserWindow, Menu, app, shell, ipcMain} = require('electron') as any;
|
||||
const Store = require('electron-store');
|
||||
const path = require('path');
|
||||
const util = require('util');
|
||||
|
||||
const appSettings = new Store();
|
||||
const windowMetadata = new WeakMap<
|
||||
typeof BrowserWindow,
|
||||
$ReadOnly<{
|
||||
@@ -53,10 +55,11 @@ function handleLaunchArgs(argv: string[]) {
|
||||
}, 1000);
|
||||
}
|
||||
} else {
|
||||
// Create the browser window.
|
||||
frontendWindow = new BrowserWindow({
|
||||
width: 1200,
|
||||
height: 600,
|
||||
...(getSavedWindowPosition(windowKey) ?? {
|
||||
width: 1200,
|
||||
height: 600,
|
||||
}),
|
||||
webPreferences: {
|
||||
partition: 'persist:react-native-devtools',
|
||||
preload: require.resolve('./preload.js'),
|
||||
@@ -66,6 +69,8 @@ function handleLaunchArgs(argv: string[]) {
|
||||
});
|
||||
// Auto-hide the Windows/Linux menu bar
|
||||
frontendWindow.setMenuBarVisibility(false);
|
||||
// Observe and update saved window position
|
||||
setupWindowResizeListeners(frontendWindow, windowKey);
|
||||
}
|
||||
|
||||
// Open links in the default browser instead of in new Electron windows.
|
||||
@@ -119,6 +124,37 @@ function configureAppMenu() {
|
||||
Menu.setApplicationMenu(menu);
|
||||
}
|
||||
|
||||
function getSavedWindowPosition(
|
||||
windowKey: string,
|
||||
): ?{width: number, height: number, x?: number, y?: number} {
|
||||
return appSettings.get('windowArrangements', {})[windowKey];
|
||||
}
|
||||
|
||||
function saveWindowPosition(
|
||||
windowKey: string,
|
||||
position: {x: number, y: number, width: number, height: number},
|
||||
) {
|
||||
const windowArrangements = appSettings.get('windowArrangements', {});
|
||||
windowArrangements[windowKey] = position;
|
||||
appSettings.set('windowArrangements', windowArrangements);
|
||||
}
|
||||
|
||||
function setupWindowResizeListeners(
|
||||
browserWindow: typeof BrowserWindow,
|
||||
windowKey: string,
|
||||
) {
|
||||
const savePosition = () => {
|
||||
if (!browserWindow.isDestroyed()) {
|
||||
const [x, y] = browserWindow.getPosition();
|
||||
const [width, height] = browserWindow.getSize();
|
||||
saveWindowPosition(windowKey, {x, y, width, height});
|
||||
}
|
||||
};
|
||||
browserWindow.on('moved', savePosition);
|
||||
browserWindow.on('resized', savePosition);
|
||||
browserWindow.on('closed', savePosition);
|
||||
}
|
||||
|
||||
app.whenReady().then(() => {
|
||||
handleLaunchArgs(process.argv.slice(app.isPackaged ? 1 : 2));
|
||||
configureAppMenu();
|
||||
|
||||
-8
@@ -191,14 +191,6 @@ internal object DependencyUtils {
|
||||
"The hermes-android dependency was modified to use the correct Maven group.",
|
||||
)
|
||||
)
|
||||
} else if (hermesV1Enabled) {
|
||||
dependencySubstitution.add(
|
||||
Triple(
|
||||
"com.facebook.react:hermes-android",
|
||||
hermesVersionString,
|
||||
"The hermes-android dependency was modified to use Hermes V1.",
|
||||
)
|
||||
)
|
||||
}
|
||||
return dependencySubstitution
|
||||
}
|
||||
|
||||
+1
-1
@@ -242,7 +242,7 @@ internal fun readPackageJsonFile(
|
||||
return packageJson?.let { JsonUtils.fromPackageJson(it) }
|
||||
}
|
||||
|
||||
private const val HERMES_COMPILER_NPM_DIR = "node_modules/hermes-compiler/hermesc/%OS-BIN%/"
|
||||
private const val HERMES_COMPILER_NPM_DIR = "node_modules/hermes-compiler/%OS-BIN%/"
|
||||
private const val HERMESC_IN_REACT_NATIVE_DIR = "node_modules/react-native/sdks/hermesc/%OS-BIN%/"
|
||||
private const val HERMESC_BUILT_FROM_SOURCE_DIR =
|
||||
"node_modules/react-native/ReactAndroid/hermes-engine/build/hermes/bin/"
|
||||
|
||||
+2
-2
@@ -165,8 +165,8 @@ class PathUtilsTest {
|
||||
@Test
|
||||
@WithOs(OS.MAC)
|
||||
fun detectOSAwareHermesCommand_withHermesV1Enabled() {
|
||||
tempFolder.newFolder("node_modules/hermes-compiler/hermesc/osx-bin/")
|
||||
val expected = tempFolder.newFile("node_modules/hermes-compiler/hermesc/osx-bin/hermesc")
|
||||
tempFolder.newFolder("node_modules/hermes-compiler/osx-bin/")
|
||||
val expected = tempFolder.newFile("node_modules/hermes-compiler/osx-bin/hermesc")
|
||||
|
||||
assertThat(detectOSAwareHermesCommand(tempFolder.root, "", hermesV1Enabled = true))
|
||||
.isEqualTo(expected.toString())
|
||||
|
||||
@@ -540,7 +540,7 @@ function buildEventEmitterSchema(
|
||||
|
||||
return {
|
||||
name: eventemitterName,
|
||||
optional: Boolean(property.optional),
|
||||
optional: false,
|
||||
typeAnnotation: {
|
||||
type: 'EventEmitterTypeAnnotation',
|
||||
typeAnnotation: eventTypeAnnotation,
|
||||
|
||||
@@ -873,6 +873,56 @@ describe('Animated', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Animated Interactions', () => {
|
||||
let Animated; // eslint-disable-line no-shadow
|
||||
let InteractionManager;
|
||||
|
||||
beforeEach(() => {
|
||||
jest.mock('../../Interaction/InteractionManager');
|
||||
Animated = require('../Animated').default;
|
||||
InteractionManager =
|
||||
require('../../Interaction/InteractionManager').default;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.unmock('../../Interaction/InteractionManager');
|
||||
});
|
||||
|
||||
it('registers an interaction by default', () => {
|
||||
// $FlowFixMe[prop-missing]
|
||||
InteractionManager.createInteractionHandle.mockReturnValue(777);
|
||||
|
||||
const value = new Animated.Value(0);
|
||||
const callback = jest.fn();
|
||||
Animated.timing(value, {
|
||||
toValue: 100,
|
||||
duration: 100,
|
||||
useNativeDriver: false,
|
||||
}).start(callback);
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(InteractionManager.createInteractionHandle).toBeCalled();
|
||||
expect(InteractionManager.clearInteractionHandle).toBeCalledWith(777);
|
||||
expect(callback).toBeCalledWith({finished: true});
|
||||
});
|
||||
|
||||
it('does not register an interaction when specified', () => {
|
||||
const value = new Animated.Value(0);
|
||||
const callback = jest.fn();
|
||||
Animated.timing(value, {
|
||||
toValue: 100,
|
||||
duration: 100,
|
||||
isInteraction: false,
|
||||
useNativeDriver: false,
|
||||
}).start(callback);
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(InteractionManager.createInteractionHandle).not.toBeCalled();
|
||||
expect(InteractionManager.clearInteractionHandle).not.toBeCalled();
|
||||
expect(callback).toBeCalledWith({finished: true});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Animated Tracking', () => {
|
||||
it('should track values', () => {
|
||||
const value1 = new Animated.Value(0);
|
||||
|
||||
@@ -14,10 +14,9 @@ import Image from '../../Image/Image';
|
||||
import createAnimatedComponent from '../createAnimatedComponent';
|
||||
import * as React from 'react';
|
||||
|
||||
export default (createAnimatedComponent<
|
||||
$FlowFixMe,
|
||||
React.ElementRef<typeof Image>,
|
||||
>((Image: $FlowFixMe)): AnimatedComponentType<
|
||||
export default (createAnimatedComponent(
|
||||
(Image: $FlowFixMe),
|
||||
): AnimatedComponentType<
|
||||
React.ElementConfig<typeof Image>,
|
||||
React.ElementRef<typeof Image>,
|
||||
>);
|
||||
|
||||
@@ -14,10 +14,6 @@ import Text, {type TextProps} from '../../Text/Text';
|
||||
import createAnimatedComponent from '../createAnimatedComponent';
|
||||
import * as React from 'react';
|
||||
|
||||
export default (createAnimatedComponent<
|
||||
$FlowFixMe,
|
||||
React.ElementRef<typeof Text>,
|
||||
>((Text: $FlowFixMe)): AnimatedComponentType<
|
||||
TextProps,
|
||||
React.ElementRef<typeof Text>,
|
||||
>);
|
||||
export default (createAnimatedComponent(
|
||||
(Text: $FlowFixMe),
|
||||
): AnimatedComponentType<TextProps, React.ElementRef<typeof Text>>);
|
||||
|
||||
@@ -15,8 +15,7 @@ import View from '../../Components/View/View';
|
||||
import createAnimatedComponent from '../createAnimatedComponent';
|
||||
import * as React from 'react';
|
||||
|
||||
// $FlowFixMe[incompatible-type]
|
||||
export default createAnimatedComponent(View) as AnimatedComponentType<
|
||||
export default (createAnimatedComponent(View): AnimatedComponentType<
|
||||
ViewProps,
|
||||
React.ElementRef<typeof View>,
|
||||
>;
|
||||
>);
|
||||
|
||||
@@ -63,29 +63,17 @@ type PassThroughProps = $ReadOnly<{
|
||||
passthroughAnimatedPropExplicitValues?: ViewProps | null,
|
||||
}>;
|
||||
|
||||
type LooseOmit<O: interface {}, K: $Keys<$FlowFixMe>> = Pick<
|
||||
O,
|
||||
Exclude<$Keys<O>, K>,
|
||||
>;
|
||||
export type AnimatedProps<Props: {...}> = {
|
||||
[K in keyof Props]: K extends NonAnimatedProps
|
||||
? Props[K]
|
||||
: WithAnimatedValue<Props[K]>,
|
||||
} & PassThroughProps;
|
||||
|
||||
export type AnimatedProps<Props: {...}> = LooseOmit<
|
||||
{
|
||||
[K in keyof Props]: K extends NonAnimatedProps
|
||||
? Props[K]
|
||||
: WithAnimatedValue<Props[K]>,
|
||||
},
|
||||
'ref',
|
||||
> &
|
||||
PassThroughProps;
|
||||
|
||||
export type AnimatedBaseProps<Props: {...}> = LooseOmit<
|
||||
{
|
||||
[K in keyof Props]: K extends NonAnimatedProps
|
||||
? Props[K]
|
||||
: WithAnimatedValue<Props[K]>,
|
||||
},
|
||||
'ref',
|
||||
>;
|
||||
export type AnimatedBaseProps<Props: {...}> = {
|
||||
[K in keyof Props]: K extends NonAnimatedProps
|
||||
? Props[K]
|
||||
: WithAnimatedValue<Props[K]>,
|
||||
};
|
||||
|
||||
export type AnimatedComponentType<Props: {...}, +Instance = mixed> = component(
|
||||
ref?: React.RefSetter<Instance>,
|
||||
|
||||
@@ -18,6 +18,7 @@ import type {AnimatedNodeConfig} from './AnimatedNode';
|
||||
import type AnimatedTracking from './AnimatedTracking';
|
||||
|
||||
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
||||
import InteractionManager from '../../Interaction/InteractionManager';
|
||||
import AnimatedInterpolation from './AnimatedInterpolation';
|
||||
import AnimatedWithChildren from './AnimatedWithChildren';
|
||||
|
||||
@@ -311,6 +312,10 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
||||
* See https://reactnative.dev/docs/animatedvalue#animate
|
||||
*/
|
||||
animate(animation: Animation, callback: ?EndCallback): void {
|
||||
let handle = null;
|
||||
if (animation.__isInteraction) {
|
||||
handle = InteractionManager.createInteractionHandle();
|
||||
}
|
||||
const previousAnimation = this._animation;
|
||||
this._animation && this._animation.stop();
|
||||
this._animation = animation;
|
||||
@@ -323,6 +328,9 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
||||
},
|
||||
result => {
|
||||
this._animation = null;
|
||||
if (handle !== null) {
|
||||
InteractionManager.clearInteractionHandle(handle);
|
||||
}
|
||||
callback && callback(result);
|
||||
},
|
||||
previousAnimation,
|
||||
|
||||
@@ -1690,7 +1690,6 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
|
||||
return (
|
||||
<StickyHeaderComponent
|
||||
key={key}
|
||||
/* $FlowFixMe[incompatible-type] */
|
||||
ref={ref => this._setStickyHeaderRef(key, ref)}
|
||||
nextHeaderLayoutY={this._headerLayoutYs.get(
|
||||
this._getKeyForIndex(nextIndex, children),
|
||||
|
||||
+6
-6
@@ -44,7 +44,7 @@ interface Instance extends React.ElementRef<typeof Animated.View> {
|
||||
}
|
||||
|
||||
const ScrollViewStickyHeader: component(
|
||||
ref?: React.RefSetter<Instance>,
|
||||
ref: React.RefSetter<Instance>,
|
||||
...props: ScrollViewStickyHeaderProps
|
||||
) = function ScrollViewStickyHeader({
|
||||
ref: forwardedRef,
|
||||
@@ -282,7 +282,7 @@ const ScrollViewStickyHeader: component(
|
||||
const passthroughAnimatedPropExplicitValues =
|
||||
isFabric && translateY != null
|
||||
? {
|
||||
style: {transform: [{translateY}]},
|
||||
style: {transform: [{translateY: translateY}]},
|
||||
}
|
||||
: null;
|
||||
|
||||
@@ -303,20 +303,20 @@ const ScrollViewStickyHeader: component(
|
||||
passthroughAnimatedPropExplicitValues
|
||||
}>
|
||||
{cloneElement(child, {
|
||||
onLayout: undefined, // we call this manually through our this._onLayout
|
||||
style: styles.fill, // We transfer the child style to the wrapper.
|
||||
onLayout: undefined, // we call this manually through our this._onLayout
|
||||
})}
|
||||
</Animated.View>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
fill: {
|
||||
flex: 1,
|
||||
},
|
||||
header: {
|
||||
zIndex: 10,
|
||||
},
|
||||
fill: {
|
||||
flex: 1,
|
||||
},
|
||||
});
|
||||
|
||||
export default ScrollViewStickyHeader;
|
||||
|
||||
@@ -47,14 +47,15 @@ class TouchableBounce extends React.Component<
|
||||
|
||||
_createPressabilityConfig(): PressabilityConfig {
|
||||
return {
|
||||
android_disableSound: this.props.touchSoundDisabled,
|
||||
cancelable: !this.props.rejectResponderTermination,
|
||||
disabled: this.props.disabled,
|
||||
hitSlop: this.props.hitSlop,
|
||||
delayLongPress: this.props.delayLongPress,
|
||||
delayPressIn: this.props.delayPressIn,
|
||||
delayPressOut: this.props.delayPressOut,
|
||||
disabled: this.props.disabled,
|
||||
hitSlop: this.props.hitSlop,
|
||||
minPressDuration: 0,
|
||||
pressRectOffset: this.props.pressRetentionOffset,
|
||||
android_disableSound: this.props.touchSoundDisabled,
|
||||
onBlur: event => {
|
||||
if (Platform.isTV) {
|
||||
this._bounceTo(1, 0.4, 0);
|
||||
@@ -112,7 +113,6 @@ class TouchableBounce extends React.Component<
|
||||
this.props.onPressOut(event);
|
||||
}
|
||||
},
|
||||
pressRectOffset: this.props.pressRetentionOffset,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -123,10 +123,10 @@ class TouchableBounce extends React.Component<
|
||||
callback?: ?() => void,
|
||||
) {
|
||||
Animated.spring(this.state.scale, {
|
||||
bounciness,
|
||||
toValue,
|
||||
useNativeDriver: true,
|
||||
velocity,
|
||||
bounciness,
|
||||
useNativeDriver: true,
|
||||
}).start(callback);
|
||||
}
|
||||
|
||||
@@ -230,6 +230,6 @@ export default (function TouchableBounceWrapper({
|
||||
}) {
|
||||
return <TouchableBounce {...props} hostRef={hostRef} />;
|
||||
} as component(
|
||||
ref?: React.RefSetter<mixed>,
|
||||
ref: React.RefSetter<mixed>,
|
||||
...props: $ReadOnly<Omit<TouchableBounceProps, 'hostRef'>>
|
||||
));
|
||||
|
||||
@@ -21,14 +21,12 @@ const ViewNativeComponent: HostComponent<Props> =
|
||||
}));
|
||||
|
||||
interface NativeCommands {
|
||||
+focus: () => void;
|
||||
+blur: () => void;
|
||||
+hotspotUpdate: (viewRef: HostInstance, x: number, y: number) => void;
|
||||
+setPressed: (viewRef: HostInstance, pressed: boolean) => void;
|
||||
}
|
||||
|
||||
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
||||
supportedCommands: ['focus', 'blur', 'hotspotUpdate', 'setPressed'],
|
||||
supportedCommands: ['hotspotUpdate', 'setPressed'],
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
+21
-21
@@ -39,24 +39,6 @@ function DebuggingOverlay({
|
||||
useImperativeHandle(
|
||||
ref,
|
||||
() => ({
|
||||
clearElementsHighlight() {
|
||||
if (!isNativeComponentReady) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (nativeComponentRef.current != null) {
|
||||
Commands.clearElementsHighlights(nativeComponentRef.current);
|
||||
}
|
||||
},
|
||||
highlightElements(elements) {
|
||||
if (!isNativeComponentReady) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (nativeComponentRef.current != null) {
|
||||
Commands.highlightElements(nativeComponentRef.current, elements);
|
||||
}
|
||||
},
|
||||
highlightTraceUpdates(updates) {
|
||||
if (!isNativeComponentReady) {
|
||||
return;
|
||||
@@ -73,6 +55,24 @@ function DebuggingOverlay({
|
||||
);
|
||||
}
|
||||
},
|
||||
highlightElements(elements) {
|
||||
if (!isNativeComponentReady) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (nativeComponentRef.current != null) {
|
||||
Commands.highlightElements(nativeComponentRef.current, elements);
|
||||
}
|
||||
},
|
||||
clearElementsHighlight() {
|
||||
if (!isNativeComponentReady) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (nativeComponentRef.current != null) {
|
||||
Commands.clearElementsHighlights(nativeComponentRef.current);
|
||||
}
|
||||
},
|
||||
}),
|
||||
[],
|
||||
);
|
||||
@@ -95,14 +95,14 @@ function DebuggingOverlay({
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
overlay: {
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
position: 'absolute',
|
||||
right: 0,
|
||||
top: 0,
|
||||
},
|
||||
});
|
||||
|
||||
export default DebuggingOverlay as component(
|
||||
ref?: React.RefSetter<DebuggingOverlayHandle>,
|
||||
ref: React.RefSetter<DebuggingOverlayHandle>,
|
||||
);
|
||||
|
||||
+6
-3
@@ -8,8 +8,11 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {HostInstance} from '../..';
|
||||
import type {AbstractImageAndroid, AbstractImageIOS} from './ImageTypes.flow';
|
||||
import type {
|
||||
AbstractImageAndroid,
|
||||
AbstractImageIOS,
|
||||
ImageType as ImageComponent,
|
||||
} from './ImageTypes.flow';
|
||||
|
||||
import useMergeRefs from '../Utilities/useMergeRefs';
|
||||
import * as React from 'react';
|
||||
@@ -30,7 +33,7 @@ export function unstable_getImageComponentDecorator(): ?ImageComponentDecorator
|
||||
return injectedImageComponentDecorator;
|
||||
}
|
||||
|
||||
type ImageInstance = HostInstance;
|
||||
type ImageInstance = React.ElementRef<ImageComponent>;
|
||||
|
||||
type ImageAttachedCallback = (
|
||||
imageInstance: ImageInstance,
|
||||
|
||||
@@ -8,11 +8,12 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {HostInstance} from '../..';
|
||||
import type {RootTag} from '../Types/RootTagTypes';
|
||||
import type {ResolvedAssetSource} from './AssetSourceResolver';
|
||||
import type {ImageProps as ImagePropsType} from './ImageProps';
|
||||
import type {ImageSource} from './ImageSource';
|
||||
import typeof ImageViewNativeComponent from './ImageViewNativeComponent';
|
||||
import typeof TextInlineImageNativeComponent from './TextInlineImageNativeComponent';
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
@@ -66,14 +67,17 @@ type ImageComponentStaticsAndroid = $ReadOnly<{
|
||||
}>;
|
||||
|
||||
export type AbstractImageAndroid = component(
|
||||
ref?: React.RefSetter<HostInstance>,
|
||||
ref?: React.RefSetter<
|
||||
| React.ElementRef<TextInlineImageNativeComponent>
|
||||
| React.ElementRef<ImageViewNativeComponent>,
|
||||
>,
|
||||
...props: ImagePropsType
|
||||
);
|
||||
|
||||
export type ImageAndroid = AbstractImageAndroid & ImageComponentStaticsAndroid;
|
||||
|
||||
export type AbstractImageIOS = component(
|
||||
ref?: React.RefSetter<HostInstance>,
|
||||
ref?: React.RefSetter<React.ElementRef<ImageViewNativeComponent>>,
|
||||
...props: ImagePropsType
|
||||
);
|
||||
|
||||
|
||||
+51
-6
@@ -12,6 +12,7 @@
|
||||
|
||||
import type {GestureResponderEvent} from '../Types/CoreEventTypes';
|
||||
|
||||
const InteractionManager = require('./InteractionManager').default;
|
||||
const TouchHistoryMath = require('./TouchHistoryMath').default;
|
||||
|
||||
const currentCentroidXOfTouchesChangedAfter =
|
||||
@@ -30,6 +31,9 @@ const currentCentroidY = TouchHistoryMath.currentCentroidY;
|
||||
* single-touch gestures resilient to extra touches, and can be used to
|
||||
* recognize simple multi-touch gestures.
|
||||
*
|
||||
* By default, `PanResponder` holds an `InteractionManager` handle to block
|
||||
* long-running JS events from interrupting active gestures.
|
||||
*
|
||||
* It provides a predictable wrapper of the responder handlers provided by the
|
||||
* [gesture responder system](docs/gesture-responder-system.html).
|
||||
* For each handler, it provides a new `gestureState` object alongside the
|
||||
@@ -401,6 +405,9 @@ const PanResponder = {
|
||||
getInteractionHandle: () => ?number,
|
||||
panHandlers: GestureResponderHandlerMethods,
|
||||
} {
|
||||
const interactionState = {
|
||||
handle: (null: ?number),
|
||||
};
|
||||
const gestureState: PanResponderGestureState = {
|
||||
// Useful for debugging
|
||||
stateID: Math.random(),
|
||||
@@ -457,6 +464,10 @@ const PanResponder = {
|
||||
},
|
||||
|
||||
onResponderGrant(event: GestureResponderEvent): boolean {
|
||||
if (!interactionState.handle) {
|
||||
interactionState.handle =
|
||||
InteractionManager.createInteractionHandle();
|
||||
}
|
||||
gestureState.x0 = currentCentroidX(event.touchHistory);
|
||||
gestureState.y0 = currentCentroidY(event.touchHistory);
|
||||
gestureState.dx = 0;
|
||||
@@ -471,11 +482,21 @@ const PanResponder = {
|
||||
},
|
||||
|
||||
onResponderReject(event: GestureResponderEvent): void {
|
||||
config.onPanResponderReject?.call(undefined, event, gestureState);
|
||||
clearInteractionHandle(
|
||||
interactionState,
|
||||
config.onPanResponderReject,
|
||||
event,
|
||||
gestureState,
|
||||
);
|
||||
},
|
||||
|
||||
onResponderRelease(event: GestureResponderEvent): void {
|
||||
config.onPanResponderRelease?.call(undefined, event, gestureState);
|
||||
clearInteractionHandle(
|
||||
interactionState,
|
||||
config.onPanResponderRelease,
|
||||
event,
|
||||
gestureState,
|
||||
);
|
||||
PanResponder._initializeGestureState(gestureState);
|
||||
},
|
||||
|
||||
@@ -508,11 +529,21 @@ const PanResponder = {
|
||||
onResponderEnd(event: GestureResponderEvent): void {
|
||||
const touchHistory = event.touchHistory;
|
||||
gestureState.numberActiveTouches = touchHistory.numberActiveTouches;
|
||||
config.onPanResponderEnd?.call(undefined, event, gestureState);
|
||||
clearInteractionHandle(
|
||||
interactionState,
|
||||
config.onPanResponderEnd,
|
||||
event,
|
||||
gestureState,
|
||||
);
|
||||
},
|
||||
|
||||
onResponderTerminate(event: GestureResponderEvent): void {
|
||||
config.onPanResponderTerminate?.call(undefined, event, gestureState);
|
||||
clearInteractionHandle(
|
||||
interactionState,
|
||||
config.onPanResponderTerminate,
|
||||
event,
|
||||
gestureState,
|
||||
);
|
||||
PanResponder._initializeGestureState(gestureState);
|
||||
},
|
||||
|
||||
@@ -525,13 +556,27 @@ const PanResponder = {
|
||||
return {
|
||||
panHandlers,
|
||||
getInteractionHandle(): ?number {
|
||||
// TODO: Deprecate and delete this method.
|
||||
return null;
|
||||
return interactionState.handle;
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
function clearInteractionHandle(
|
||||
interactionState: {handle: ?number, ...},
|
||||
callback: ?(ActiveCallback | PassiveCallback),
|
||||
event: GestureResponderEvent,
|
||||
gestureState: PanResponderGestureState,
|
||||
) {
|
||||
if (interactionState.handle) {
|
||||
InteractionManager.clearInteractionHandle(interactionState.handle);
|
||||
interactionState.handle = null;
|
||||
}
|
||||
if (callback) {
|
||||
callback(event, gestureState);
|
||||
}
|
||||
}
|
||||
|
||||
export type PanResponderInstance = ReturnType<(typeof PanResponder)['create']>;
|
||||
|
||||
export default PanResponder;
|
||||
|
||||
@@ -129,13 +129,11 @@ export function getWithFallback_DEPRECATED<Config: {...}>(
|
||||
// `getRuntimeConfig == null` when static view configs are disabled
|
||||
// If `setRuntimeConfigProvider` is not configured, use native reflection.
|
||||
if (hasNativeViewConfig(name)) {
|
||||
/* $FlowFixMe[incompatible-type] Extra ref prop */
|
||||
return get<Config>(name, viewConfigProvider);
|
||||
}
|
||||
} else {
|
||||
// If there is no runtime config, then the native component is unavailable.
|
||||
if (getRuntimeConfig(name) != null) {
|
||||
/* $FlowFixMe[incompatible-type] Extra ref prop */
|
||||
return get<Config>(name, viewConfigProvider);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ let reactJsInspectorTracing = RNTarget(
|
||||
name: .reactJsInspectorTracing,
|
||||
path: "ReactCommon/jsinspector-modern/tracing",
|
||||
excludedPaths: ["tests"],
|
||||
dependencies: [.reactNativeDependencies, .reactFeatureFlags, .reactJsInspectorNetwork, .jsi, .reactOSCompat]
|
||||
dependencies: [.reactNativeDependencies, .reactFeatureFlags, .jsi, .reactOSCompat]
|
||||
)
|
||||
|
||||
/// React-jsinspectornetwork.podspec
|
||||
|
||||
@@ -365,14 +365,11 @@ RCT_EXPORT_MODULE()
|
||||
handler:^(__unused UIAlertAction *action) {
|
||||
[weakSelf setDefaultJSBundle];
|
||||
}]];
|
||||
UIAlertAction *configCancelAction =
|
||||
[UIAlertAction actionWithTitle:@"Cancel"
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:^(__unused UIAlertAction *action) {
|
||||
return;
|
||||
}];
|
||||
[configCancelAction setValue:[UIColor systemRedColor] forKey:@"titleTextColor"];
|
||||
[alertController addAction:configCancelAction];
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:@"Cancel"
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:^(__unused UIAlertAction *action) {
|
||||
return;
|
||||
}]];
|
||||
[RCTPresentedViewController() presentViewController:alertController animated:YES completion:NULL];
|
||||
}]];
|
||||
|
||||
@@ -393,11 +390,6 @@ RCT_EXPORT_METHOD(show)
|
||||
|
||||
_actionSheet = [UIAlertController alertControllerWithTitle:@"React Native Dev Menu" message:nil preferredStyle:style];
|
||||
|
||||
NSAttributedString *title =
|
||||
[[NSAttributedString alloc] initWithString:@"React Native Dev Menu"
|
||||
attributes:@{NSFontAttributeName : [UIFont boldSystemFontOfSize:17]}];
|
||||
[_actionSheet setValue:title forKey:@"_attributedTitle"];
|
||||
|
||||
NSArray<RCTDevMenuItem *> *items = [self _menuItemsToPresent];
|
||||
for (RCTDevMenuItem *item in items) {
|
||||
UIAlertAction *action = [UIAlertAction actionWithTitle:item.title
|
||||
@@ -407,11 +399,9 @@ RCT_EXPORT_METHOD(show)
|
||||
[_actionSheet addAction:action];
|
||||
}
|
||||
|
||||
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel"
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:[self alertActionHandlerForDevItem:nil]];
|
||||
[cancelAction setValue:[UIColor systemRedColor] forKey:@"titleTextColor"];
|
||||
[_actionSheet addAction:cancelAction];
|
||||
[_actionSheet addAction:[UIAlertAction actionWithTitle:@"Cancel"
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:[self alertActionHandlerForDevItem:nil]]];
|
||||
|
||||
_presentedItems = items;
|
||||
[RCTPresentedViewController() presentViewController:_actionSheet animated:YES completion:nil];
|
||||
|
||||
+4
-62
@@ -650,9 +650,7 @@ const CGFloat BACKGROUND_COLOR_ZPOSITION = -1024.0f;
|
||||
|
||||
BOOL isPointInside = [self pointInside:point withEvent:event];
|
||||
|
||||
UIView *currentContainerView = self.currentContainerView;
|
||||
|
||||
BOOL clipsToBounds = currentContainerView.clipsToBounds;
|
||||
BOOL clipsToBounds = self.currentContainerView.clipsToBounds;
|
||||
|
||||
clipsToBounds = clipsToBounds || _layoutMetrics.overflowInset == EdgeInsets{};
|
||||
|
||||
@@ -660,8 +658,8 @@ const CGFloat BACKGROUND_COLOR_ZPOSITION = -1024.0f;
|
||||
return nil;
|
||||
}
|
||||
|
||||
for (UIView *subview = nullptr in [currentContainerView.subviews reverseObjectEnumerator]) {
|
||||
UIView *hitView = [subview hitTest:[subview convertPoint:point fromView:currentContainerView] withEvent:event];
|
||||
for (UIView *subview in [self.subviews reverseObjectEnumerator]) {
|
||||
UIView *hitView = [subview hitTest:[subview convertPoint:point fromView:self] withEvent:event];
|
||||
if (hitView) {
|
||||
return hitView;
|
||||
}
|
||||
@@ -861,7 +859,7 @@ static RCTBorderStyle RCTBorderStyleFromOutlineStyle(OutlineStyle outlineStyle)
|
||||
|
||||
if (_useCustomContainerView) {
|
||||
if (!_containerView) {
|
||||
_containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)];
|
||||
_containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
|
||||
for (UIView *subview = nullptr in effectiveContentView.subviews) {
|
||||
[_containerView addSubview:subview];
|
||||
}
|
||||
@@ -1542,62 +1540,6 @@ static NSString *RCTRecursiveAccessibilityLabel(UIView *view)
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)canBecomeFirstResponder
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args
|
||||
{
|
||||
if ([commandName isEqualToString:@"focus"]) {
|
||||
[self focus];
|
||||
return;
|
||||
}
|
||||
|
||||
if ([commandName isEqualToString:@"blur"]) {
|
||||
[self blur];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)focus
|
||||
{
|
||||
[self becomeFirstResponder];
|
||||
}
|
||||
|
||||
- (void)blur
|
||||
{
|
||||
[self resignFirstResponder];
|
||||
}
|
||||
|
||||
#pragma mark - Focus Events
|
||||
|
||||
- (BOOL)becomeFirstResponder
|
||||
{
|
||||
if (![super becomeFirstResponder]) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (_eventEmitter && ReactNativeFeatureFlags::enableImperativeFocus()) {
|
||||
_eventEmitter->onFocus();
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)resignFirstResponder
|
||||
{
|
||||
if (![super resignFirstResponder]) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (_eventEmitter && ReactNativeFeatureFlags::enableImperativeFocus()) {
|
||||
_eventEmitter->onBlur();
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
-10
@@ -328,15 +328,6 @@ public class ReactInstanceManager {
|
||||
}
|
||||
|
||||
registerCxxErrorHandlerFunc();
|
||||
|
||||
// Using `if (true)` just to prevent tests / lint errors.
|
||||
if (true) {
|
||||
// Legacy architecture of React Native is deprecated and can't be initialized anymore.
|
||||
// More details on:
|
||||
// https://github.com/react-native-community/discussions-and-proposals/blob/nc/legacy-arch-removal/proposals/0929-legacy-architecture-removal.md
|
||||
throw new UnsupportedOperationException(
|
||||
"ReactInstanceManager.createReactContext is unsupported.");
|
||||
}
|
||||
}
|
||||
|
||||
private ReactInstanceDevHelper createDevHelperInterface() {
|
||||
@@ -1455,7 +1446,6 @@ public class ReactInstanceManager {
|
||||
*/
|
||||
private ReactApplicationContext createReactContext(
|
||||
JavaScriptExecutor jsExecutor, JSBundleLoader jsBundleLoader) {
|
||||
|
||||
FLog.d(ReactConstants.TAG, "ReactInstanceManager.createReactContext()");
|
||||
ReactMarker.logMarker(CREATE_REACT_CONTEXT_START, jsExecutor.getName());
|
||||
|
||||
|
||||
+19
-24
@@ -196,11 +196,9 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
||||
|
||||
private val nodesManagerRef = AtomicReference<NativeAnimatedNodesManager?>()
|
||||
|
||||
private var batchingControlledByJS = false // TODO T71377544: delete
|
||||
@Volatile private var currentFrameNumber: Long = 0
|
||||
|
||||
@Volatile private var currentFrameNumber: Long = 0 // TODO T71377544: delete
|
||||
|
||||
@Volatile private var currentBatchNumber: Long = 0
|
||||
@Volatile private var currentBatchNumber: Long = 0 // frame number at last operations dispatch
|
||||
|
||||
private var initializedForFabric = false
|
||||
private var initializedForNonFabric = false
|
||||
@@ -282,22 +280,19 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
||||
|
||||
var batchNumber = currentBatchNumber - 1
|
||||
|
||||
// TODO T71377544: delete this when the JS method is confirmed safe
|
||||
if (!batchingControlledByJS) {
|
||||
// The problem we're trying to solve here: we could be in the middle of queueing
|
||||
// a batch of related animation operations when Fabric flushes a batch of MountItems.
|
||||
// It's visually bad if we execute half of the animation ops and then wait another frame
|
||||
// (or more) to execute the rest.
|
||||
// See mFrameNumber. If the dispatchedFrameNumber drifts too far - that
|
||||
// is, if no MountItems are scheduled for a while, which can happen if a tree
|
||||
// is committed but there are no changes - bring these counts back in sync and
|
||||
// execute any queued operations. This number is arbitrary, but we want it low
|
||||
// enough that the user shouldn't be able to see this delay in most cases.
|
||||
currentFrameNumber++
|
||||
if ((currentFrameNumber - currentBatchNumber) > 2) {
|
||||
currentBatchNumber = currentFrameNumber
|
||||
batchNumber = currentBatchNumber
|
||||
}
|
||||
// The problem we're trying to solve here: we could be in the middle of queueing
|
||||
// a batch of related animation operations when Fabric flushes a batch of MountItems.
|
||||
// It's visually bad if we execute half of the animation ops and then wait another frame
|
||||
// (or more) to execute the rest.
|
||||
// See mFrameNumber. If the dispatchedFrameNumber drifts too far - that
|
||||
// is, if no MountItems are scheduled for a while, which can happen if a tree
|
||||
// is committed but there are no changes - bring these counts back in sync and
|
||||
// execute any queued operations. This number is arbitrary, but we want it low
|
||||
// enough that the user shouldn't be able to see this delay in most cases.
|
||||
currentFrameNumber++
|
||||
if ((currentFrameNumber - currentBatchNumber) > 2) {
|
||||
currentBatchNumber = currentFrameNumber
|
||||
batchNumber = currentBatchNumber
|
||||
}
|
||||
|
||||
preOperations.executeBatch(batchNumber, nodesManager)
|
||||
@@ -484,14 +479,14 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun startOperationBatch() {
|
||||
batchingControlledByJS = true
|
||||
currentBatchNumber++
|
||||
// no-op
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun finishOperationBatch() {
|
||||
batchingControlledByJS = false
|
||||
currentBatchNumber++
|
||||
// no-op
|
||||
}
|
||||
|
||||
override fun createAnimatedNode(tagDouble: Double, config: ReadableMap) {
|
||||
|
||||
-4
@@ -774,12 +774,8 @@ public class NativeAnimatedNodesManager(
|
||||
("Looks like animated nodes graph has ${reason}, there are $activeNodesCount but toposort visited only $updatedNodesCount")
|
||||
)
|
||||
if (eventListenerInitializedForFabric && cyclesDetected == 0) {
|
||||
// TODO T71377544: investigate these SoftExceptions and see if we can remove entirely
|
||||
// or fix the root cause
|
||||
ReactSoftExceptionLogger.logSoftException(TAG, ReactNoCrashSoftException(ex))
|
||||
} else if (eventListenerInitializedForFabric) {
|
||||
// TODO T71377544: investigate these SoftExceptions and see if we can remove entirely
|
||||
// or fix the root cause
|
||||
ReactSoftExceptionLogger.logSoftException(TAG, ReactNoCrashSoftException(ex))
|
||||
} else {
|
||||
throw ex
|
||||
|
||||
+15
-15
@@ -98,7 +98,13 @@ public object DefaultNewArchitectureEntryPoint {
|
||||
ReactNativeFeatureFlags.override(ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android())
|
||||
}
|
||||
ReleaseLevel.STABLE -> {
|
||||
ReactNativeFeatureFlags.override(ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android())
|
||||
ReactNativeFeatureFlags.override(
|
||||
ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android(
|
||||
fabricEnabled,
|
||||
bridgelessEnabled,
|
||||
turboModulesEnabled,
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,12 +125,6 @@ public object DefaultNewArchitectureEntryPoint {
|
||||
privateConcurrentReactEnabled = featureFlags.enableFabricRenderer()
|
||||
privateBridgelessEnabled = featureFlags.enableBridgelessArchitecture()
|
||||
|
||||
val (isValid, errorMessage) =
|
||||
isConfigurationValid(turboModulesEnabled, fabricEnabled, bridgelessEnabled)
|
||||
if (!isValid) {
|
||||
error(errorMessage)
|
||||
}
|
||||
|
||||
DefaultSoLoader.maybeLoadSoLibrary()
|
||||
}
|
||||
|
||||
@@ -158,13 +158,13 @@ public object DefaultNewArchitectureEntryPoint {
|
||||
fabricEnabled: Boolean,
|
||||
bridgelessEnabled: Boolean,
|
||||
): Pair<Boolean, String> =
|
||||
if (!turboModulesEnabled || !fabricEnabled || !bridgelessEnabled) {
|
||||
false to
|
||||
"You cannot load React Native with the New Architecture disabled. " +
|
||||
"Please use DefaultNewArchitectureEntryPoint.load() instead of " +
|
||||
"DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=$turboModulesEnabled, " +
|
||||
"fabricEnabled=$fabricEnabled, bridgelessEnabled=$bridgelessEnabled)"
|
||||
} else {
|
||||
true to ""
|
||||
when {
|
||||
fabricEnabled && !turboModulesEnabled ->
|
||||
false to
|
||||
"fabricEnabled=true requires turboModulesEnabled=true (is now false) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
|
||||
bridgelessEnabled && (!turboModulesEnabled || !fabricEnabled) ->
|
||||
false to
|
||||
"bridgelessEnabled=true requires (turboModulesEnabled=true AND fabricEnabled=true) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
|
||||
else -> true to ""
|
||||
}
|
||||
}
|
||||
|
||||
-3
@@ -821,9 +821,6 @@ public class SurfaceMountingManager {
|
||||
@UnstableReactNativeAPI
|
||||
public void experimental_prefetchResources(
|
||||
int surfaceId, String componentName, MapBuffer params) {
|
||||
if (isStopped()) {
|
||||
return;
|
||||
}
|
||||
mViewManagerRegistry
|
||||
.get(componentName)
|
||||
.experimental_prefetchResources(
|
||||
|
||||
+1
-7
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<ce122427070db337420728a1028bc2b6>>
|
||||
* @generated SignedSource<<f089964c958dfcac00f83c3371ccbefc>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -192,12 +192,6 @@ public object ReactNativeFeatureFlags {
|
||||
@JvmStatic
|
||||
public fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean = accessor.enableImmediateUpdateModeForContentOffsetChanges()
|
||||
|
||||
/**
|
||||
* Enable ref.focus() and ref.blur() for all views, not just TextInput.
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun enableImperativeFocus(): Boolean = accessor.enableImperativeFocus()
|
||||
|
||||
/**
|
||||
* This is to fix the issue with interop view manager where component descriptor lookup is causing ViewManager to preload.
|
||||
*/
|
||||
|
||||
+1
-11
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<e7581ab264bca8b059723bd7bd788790>>
|
||||
* @generated SignedSource<<912dec895495052328e7e52b94a6738a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -47,7 +47,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
private var enableImagePrefetchingAndroidCache: Boolean? = null
|
||||
private var enableImagePrefetchingOnUiThreadAndroidCache: Boolean? = null
|
||||
private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
|
||||
private var enableImperativeFocusCache: Boolean? = null
|
||||
private var enableInteropViewManagerClassLookUpOptimizationIOSCache: Boolean? = null
|
||||
private var enableLayoutAnimationsOnAndroidCache: Boolean? = null
|
||||
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
|
||||
@@ -338,15 +337,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun enableImperativeFocus(): Boolean {
|
||||
var cached = enableImperativeFocusCache
|
||||
if (cached == null) {
|
||||
cached = ReactNativeFeatureFlagsCxxInterop.enableImperativeFocus()
|
||||
enableImperativeFocusCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean {
|
||||
var cached = enableInteropViewManagerClassLookUpOptimizationIOSCache
|
||||
if (cached == null) {
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<d73f5df2130479a4cd1000dc76b15d1b>>
|
||||
* @generated SignedSource<<ba1e53d93b9fdaf298a034543bc44a57>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -82,8 +82,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun enableImperativeFocus(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun enableLayoutAnimationsOnAndroid(): Boolean
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<4fa15189361a6c92bdd44bafc9356167>>
|
||||
* @generated SignedSource<<7601cbcde75ff19ef0fe67f6faef2549>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -77,8 +77,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean = false
|
||||
|
||||
override fun enableImperativeFocus(): Boolean = false
|
||||
|
||||
override fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean = false
|
||||
|
||||
override fun enableLayoutAnimationsOnAndroid(): Boolean = false
|
||||
|
||||
+1
-12
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<962c60d1761b0a1f4945b44767aa7b02>>
|
||||
* @generated SignedSource<<3a13f8e35423b634ed4ef46fbac3c1e9>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -51,7 +51,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
private var enableImagePrefetchingAndroidCache: Boolean? = null
|
||||
private var enableImagePrefetchingOnUiThreadAndroidCache: Boolean? = null
|
||||
private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
|
||||
private var enableImperativeFocusCache: Boolean? = null
|
||||
private var enableInteropViewManagerClassLookUpOptimizationIOSCache: Boolean? = null
|
||||
private var enableLayoutAnimationsOnAndroidCache: Boolean? = null
|
||||
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
|
||||
@@ -369,16 +368,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun enableImperativeFocus(): Boolean {
|
||||
var cached = enableImperativeFocusCache
|
||||
if (cached == null) {
|
||||
cached = currentProvider.enableImperativeFocus()
|
||||
accessedFeatureFlags.add("enableImperativeFocus")
|
||||
enableImperativeFocusCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean {
|
||||
var cached = enableInteropViewManagerClassLookUpOptimizationIOSCache
|
||||
if (cached == null) {
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<dffc5db0f80501f6246f9d6087c6fb4a>>
|
||||
* @generated SignedSource<<4feeb3c1789d8169dd93bee7ae1ff1ac>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -25,7 +25,5 @@ public open class ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android :
|
||||
|
||||
override fun enableAccessibilityOrder(): Boolean = true
|
||||
|
||||
override fun enableSwiftUIBasedFilters(): Boolean = true
|
||||
|
||||
override fun preventShadowTreeCommitExhaustion(): Boolean = true
|
||||
}
|
||||
|
||||
+9
-3
@@ -7,10 +7,16 @@
|
||||
|
||||
package com.facebook.react.internal.featureflags
|
||||
|
||||
public class ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android() :
|
||||
ReactNativeNewArchitectureFeatureFlagsDefaults() {
|
||||
public class ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android(
|
||||
private val fabricEnabled: Boolean,
|
||||
private val bridgelessEnabled: Boolean,
|
||||
private val turboModulesEnabled: Boolean,
|
||||
) : ReactNativeNewArchitectureFeatureFlagsDefaults(bridgelessEnabled) {
|
||||
override fun useFabricInterop(): Boolean = bridgelessEnabled || fabricEnabled
|
||||
|
||||
override fun useFabricInterop(): Boolean = true
|
||||
override fun enableFabricRenderer(): Boolean = bridgelessEnabled || fabricEnabled
|
||||
|
||||
override fun useTurboModules(): Boolean = bridgelessEnabled || turboModulesEnabled
|
||||
|
||||
override fun useShadowNodeStateOnClone(): Boolean = true
|
||||
}
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<f9f3dee3dde2f7f6f851ce4525a4ebec>>
|
||||
* @generated SignedSource<<143b568248e68033efaefc3f178ff6db>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -77,8 +77,6 @@ public interface ReactNativeFeatureFlagsProvider {
|
||||
|
||||
@DoNotStrip public fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean
|
||||
|
||||
@DoNotStrip public fun enableImperativeFocus(): Boolean
|
||||
|
||||
@DoNotStrip public fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean
|
||||
|
||||
@DoNotStrip public fun enableLayoutAnimationsOnAndroid(): Boolean
|
||||
|
||||
+3
-5
@@ -20,11 +20,9 @@ package com.facebook.react.internal.featureflags
|
||||
* When the new architecture is enabled, we want to set the default values of the flags for Fabric,
|
||||
* TurboModules and Bridgeless as enabled by default.
|
||||
*/
|
||||
public open class ReactNativeNewArchitectureFeatureFlagsDefaults() :
|
||||
ReactNativeFeatureFlagsDefaults() {
|
||||
|
||||
private val newArchitectureEnabled: Boolean = true
|
||||
|
||||
public open class ReactNativeNewArchitectureFeatureFlagsDefaults(
|
||||
private val newArchitectureEnabled: Boolean = true
|
||||
) : ReactNativeFeatureFlagsDefaults() {
|
||||
override fun enableBridgelessArchitecture(): Boolean = newArchitectureEnabled
|
||||
|
||||
override fun enableFabricRenderer(): Boolean = newArchitectureEnabled
|
||||
|
||||
+1
@@ -166,6 +166,7 @@ public class ReactScrollView extends ScrollView
|
||||
mRemoveClippedSubviews = false;
|
||||
mScrollEnabled = true;
|
||||
mSendMomentumEvents = false;
|
||||
mFpsListener = null;
|
||||
mScrollPerfTag = null;
|
||||
mEndBackground = null;
|
||||
mEndFillColor = Color.TRANSPARENT;
|
||||
|
||||
+2
-2
@@ -34,6 +34,7 @@ import com.facebook.react.views.text.ReactTypefaceUtils.parseFontStyle
|
||||
import com.facebook.react.views.text.ReactTypefaceUtils.parseFontVariant
|
||||
import com.facebook.react.views.text.ReactTypefaceUtils.parseFontWeight
|
||||
import com.facebook.react.views.text.TextTransform.Companion.apply
|
||||
import com.facebook.react.views.text.internal.ReactTextInlineImageShadowNode
|
||||
import com.facebook.react.views.text.internal.span.CustomLetterSpacingSpan
|
||||
import com.facebook.react.views.text.internal.span.CustomLineHeightSpan
|
||||
import com.facebook.react.views.text.internal.span.CustomStyleSpan
|
||||
@@ -522,7 +523,6 @@ public constructor(
|
||||
while (i < length) {
|
||||
val child: ReactShadowNode<*> = textShadowNode.getChildAt(i)
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
if (child is ReactRawTextShadowNode) {
|
||||
child.text?.let { sb.append(apply(it, textAttributes.textTransform)) }
|
||||
} else if (child is ReactBaseTextShadowNode) {
|
||||
@@ -535,7 +535,7 @@ public constructor(
|
||||
inlineViews,
|
||||
sb.length,
|
||||
)
|
||||
} else if (child is com.facebook.react.views.text.internal.ReactTextInlineImageShadowNode) {
|
||||
} else if (child is ReactTextInlineImageShadowNode) {
|
||||
// We make the image take up 1 character in the span and put a corresponding character
|
||||
// into the text so that the image doesn't run over any following text.
|
||||
sb.append(INLINE_VIEW_PLACEHOLDER)
|
||||
|
||||
-2
@@ -5,8 +5,6 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package com.facebook.react.views.text.frescosupport
|
||||
|
||||
import android.content.Context
|
||||
|
||||
-7
@@ -9,18 +9,11 @@
|
||||
|
||||
package com.facebook.react.views.text.internal
|
||||
|
||||
import com.facebook.react.common.annotations.internal.LegacyArchitecture
|
||||
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel
|
||||
import com.facebook.react.uimanager.LayoutShadowNode
|
||||
import com.facebook.react.views.text.internal.span.TextInlineImageSpan
|
||||
import com.facebook.yoga.YogaNode
|
||||
|
||||
/** Base class for [YogaNode]s that represent inline images. */
|
||||
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
|
||||
@Deprecated(
|
||||
message = "This class is part of Legacy Architecture and will be removed in a future release",
|
||||
level = DeprecationLevel.WARNING,
|
||||
)
|
||||
internal abstract class ReactTextInlineImageShadowNode : LayoutShadowNode() {
|
||||
/**
|
||||
* Build a [TextInlineImageSpan] from this node. This will be added to the TextView in place of
|
||||
|
||||
-8
@@ -416,14 +416,6 @@ public open class ReactViewGroup public constructor(context: Context?) :
|
||||
updateClippingToRect(clippingRect, excludedViews)
|
||||
}
|
||||
|
||||
internal fun requestFocusFromJS() {
|
||||
super.requestFocus(FOCUS_DOWN, null)
|
||||
}
|
||||
|
||||
internal fun clearFocusFromJS() {
|
||||
super.clearFocus()
|
||||
}
|
||||
|
||||
override fun endViewTransition(view: View) {
|
||||
super.endViewTransition(view)
|
||||
childrenRemovedWhileTransitioning?.remove(view.id)
|
||||
|
||||
-14
@@ -404,8 +404,6 @@ public open class ReactViewManager : ReactClippingViewManager<ReactViewGroup>()
|
||||
when (commandId) {
|
||||
HOTSPOT_UPDATE_KEY -> handleHotspotUpdate(root, args)
|
||||
"setPressed" -> handleSetPressed(root, args)
|
||||
"focus" -> handleFocus(root)
|
||||
"blur" -> handleBlur(root)
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
@@ -430,16 +428,4 @@ public open class ReactViewManager : ReactClippingViewManager<ReactViewGroup>()
|
||||
val y = args.getDouble(1).dpToPx()
|
||||
root.drawableHotspotChanged(x, y)
|
||||
}
|
||||
|
||||
private fun handleFocus(root: ReactViewGroup) {
|
||||
if (ReactNativeFeatureFlags.enableImperativeFocus()) {
|
||||
root.requestFocusFromJS()
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleBlur(root: ReactViewGroup) {
|
||||
if (ReactNativeFeatureFlags.enableImperativeFocus()) {
|
||||
root.clearFocusFromJS()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-15
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<de817bc06ae5ef584db08d6a094c9d03>>
|
||||
* @generated SignedSource<<92c9aa29df580c6d12faa14e60b00e4f>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -201,12 +201,6 @@ class ReactNativeFeatureFlagsJavaProvider
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool enableImperativeFocus() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableImperativeFocus");
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool enableInteropViewManagerClassLookUpOptimizationIOS() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableInteropViewManagerClassLookUpOptimizationIOS");
|
||||
@@ -622,11 +616,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableImmediateUpdateModeForContentOffs
|
||||
return ReactNativeFeatureFlags::enableImmediateUpdateModeForContentOffsetChanges();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::enableImperativeFocus(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::enableImperativeFocus();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::enableInteropViewManagerClassLookUpOptimizationIOS(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizationIOS();
|
||||
@@ -969,9 +958,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"enableImmediateUpdateModeForContentOffsetChanges",
|
||||
JReactNativeFeatureFlagsCxxInterop::enableImmediateUpdateModeForContentOffsetChanges),
|
||||
makeNativeMethod(
|
||||
"enableImperativeFocus",
|
||||
JReactNativeFeatureFlagsCxxInterop::enableImperativeFocus),
|
||||
makeNativeMethod(
|
||||
"enableInteropViewManagerClassLookUpOptimizationIOS",
|
||||
JReactNativeFeatureFlagsCxxInterop::enableInteropViewManagerClassLookUpOptimizationIOS),
|
||||
|
||||
+1
-4
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<f163997b1149c1f1ac1e60f273a5448f>>
|
||||
* @generated SignedSource<<124d1378990fdd09a4d97f9103f81a6a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -111,9 +111,6 @@ class JReactNativeFeatureFlagsCxxInterop
|
||||
static bool enableImmediateUpdateModeForContentOffsetChanges(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool enableImperativeFocus(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool enableInteropViewManagerClassLookUpOptimizationIOS(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
|
||||
+12
-24
@@ -13,48 +13,36 @@ import org.junit.Test
|
||||
class DefaultNewArchitectureEntryPointTest {
|
||||
|
||||
@Test
|
||||
fun isConfigurationValid_withEverythingOff_returnsFalse() {
|
||||
val (isValid, errorMessage) =
|
||||
fun isConfigurationValid_withEverythingOff_returnsTrue() {
|
||||
val (isValid, _) =
|
||||
DefaultNewArchitectureEntryPoint.isConfigurationValid(
|
||||
turboModulesEnabled = false,
|
||||
fabricEnabled = false,
|
||||
bridgelessEnabled = false,
|
||||
)
|
||||
assertThat(isValid).isFalse()
|
||||
assertThat(errorMessage)
|
||||
.isEqualTo(
|
||||
"You cannot load React Native with the New Architecture disabled. Please use DefaultNewArchitectureEntryPoint.load() instead of DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=false, fabricEnabled=false, bridgelessEnabled=false)"
|
||||
)
|
||||
assertThat(isValid).isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun isConfigurationValid_withNewArchOnlyOn_returnsFalse() {
|
||||
val (isValid, errorMessage) =
|
||||
fun isConfigurationValid_withNewArchOn_returnsTrue() {
|
||||
val (isValid, _) =
|
||||
DefaultNewArchitectureEntryPoint.isConfigurationValid(
|
||||
turboModulesEnabled = true,
|
||||
fabricEnabled = true,
|
||||
bridgelessEnabled = false,
|
||||
)
|
||||
assertThat(isValid).isFalse()
|
||||
assertThat(errorMessage)
|
||||
.isEqualTo(
|
||||
"You cannot load React Native with the New Architecture disabled. Please use DefaultNewArchitectureEntryPoint.load() instead of DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=true, fabricEnabled=true, bridgelessEnabled=false)"
|
||||
)
|
||||
assertThat(isValid).isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun isConfigurationValid_withTurboModulesOnlyOn_returnsFalse() {
|
||||
val (isValid, errorMessage) =
|
||||
fun isConfigurationValid_withTurboModulesOnlyOn_returnsTrue() {
|
||||
val (isValid, _) =
|
||||
DefaultNewArchitectureEntryPoint.isConfigurationValid(
|
||||
turboModulesEnabled = true,
|
||||
fabricEnabled = false,
|
||||
bridgelessEnabled = false,
|
||||
)
|
||||
assertThat(isValid).isFalse()
|
||||
assertThat(errorMessage)
|
||||
.isEqualTo(
|
||||
"You cannot load React Native with the New Architecture disabled. Please use DefaultNewArchitectureEntryPoint.load() instead of DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=true, fabricEnabled=false, bridgelessEnabled=false)"
|
||||
)
|
||||
assertThat(isValid).isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -79,7 +67,7 @@ class DefaultNewArchitectureEntryPointTest {
|
||||
assertThat(isValid).isFalse()
|
||||
assertThat(errorMessage)
|
||||
.isEqualTo(
|
||||
"You cannot load React Native with the New Architecture disabled. Please use DefaultNewArchitectureEntryPoint.load() instead of DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=false, fabricEnabled=true, bridgelessEnabled=false)"
|
||||
"fabricEnabled=true requires turboModulesEnabled=true (is now false) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
|
||||
)
|
||||
}
|
||||
|
||||
@@ -94,7 +82,7 @@ class DefaultNewArchitectureEntryPointTest {
|
||||
assertThat(isValid).isFalse()
|
||||
assertThat(errorMessage)
|
||||
.isEqualTo(
|
||||
"You cannot load React Native with the New Architecture disabled. Please use DefaultNewArchitectureEntryPoint.load() instead of DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=false, fabricEnabled=true, bridgelessEnabled=true)"
|
||||
"fabricEnabled=true requires turboModulesEnabled=true (is now false) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
|
||||
)
|
||||
}
|
||||
|
||||
@@ -109,7 +97,7 @@ class DefaultNewArchitectureEntryPointTest {
|
||||
assertThat(isValid).isFalse()
|
||||
assertThat(errorMessage)
|
||||
.isEqualTo(
|
||||
"You cannot load React Native with the New Architecture disabled. Please use DefaultNewArchitectureEntryPoint.load() instead of DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=true, fabricEnabled=false, bridgelessEnabled=true)"
|
||||
"bridgelessEnabled=true requires (turboModulesEnabled=true AND fabricEnabled=true) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,10 +141,10 @@ class RuntimeDecorator : public Base, private jsi::Instrumentation {
|
||||
}
|
||||
std::string description() override {
|
||||
return plain().description();
|
||||
}
|
||||
};
|
||||
bool isInspectable() override {
|
||||
return plain().isInspectable();
|
||||
}
|
||||
};
|
||||
Instrumentation& instrumentation() override {
|
||||
return *this;
|
||||
}
|
||||
@@ -160,45 +160,45 @@ class RuntimeDecorator : public Base, private jsi::Instrumentation {
|
||||
|
||||
Runtime::PointerValue* cloneSymbol(const Runtime::PointerValue* pv) override {
|
||||
return plain_.cloneSymbol(pv);
|
||||
}
|
||||
};
|
||||
Runtime::PointerValue* cloneBigInt(const Runtime::PointerValue* pv) override {
|
||||
return plain_.cloneBigInt(pv);
|
||||
}
|
||||
};
|
||||
Runtime::PointerValue* cloneString(const Runtime::PointerValue* pv) override {
|
||||
return plain_.cloneString(pv);
|
||||
}
|
||||
};
|
||||
Runtime::PointerValue* cloneObject(const Runtime::PointerValue* pv) override {
|
||||
return plain_.cloneObject(pv);
|
||||
}
|
||||
};
|
||||
Runtime::PointerValue* clonePropNameID(
|
||||
const Runtime::PointerValue* pv) override {
|
||||
return plain_.clonePropNameID(pv);
|
||||
}
|
||||
};
|
||||
|
||||
PropNameID createPropNameIDFromAscii(const char* str, size_t length)
|
||||
override {
|
||||
return plain_.createPropNameIDFromAscii(str, length);
|
||||
}
|
||||
};
|
||||
PropNameID createPropNameIDFromUtf8(const uint8_t* utf8, size_t length)
|
||||
override {
|
||||
return plain_.createPropNameIDFromUtf8(utf8, length);
|
||||
}
|
||||
};
|
||||
PropNameID createPropNameIDFromString(const String& str) override {
|
||||
return plain_.createPropNameIDFromString(str);
|
||||
}
|
||||
};
|
||||
PropNameID createPropNameIDFromUtf16(const char16_t* utf16, size_t length)
|
||||
override {
|
||||
return plain_.createPropNameIDFromUtf16(utf16, length);
|
||||
}
|
||||
PropNameID createPropNameIDFromSymbol(const Symbol& sym) override {
|
||||
return plain_.createPropNameIDFromSymbol(sym);
|
||||
}
|
||||
};
|
||||
std::string utf8(const PropNameID& id) override {
|
||||
return plain_.utf8(id);
|
||||
}
|
||||
};
|
||||
bool compare(const PropNameID& a, const PropNameID& b) override {
|
||||
return plain_.compare(a, b);
|
||||
}
|
||||
};
|
||||
|
||||
std::string symbolToString(const Symbol& sym) override {
|
||||
return plain_.symbolToString(sym);
|
||||
@@ -225,10 +225,10 @@ class RuntimeDecorator : public Base, private jsi::Instrumentation {
|
||||
|
||||
String createStringFromAscii(const char* str, size_t length) override {
|
||||
return plain_.createStringFromAscii(str, length);
|
||||
}
|
||||
};
|
||||
String createStringFromUtf8(const uint8_t* utf8, size_t length) override {
|
||||
return plain_.createStringFromUtf8(utf8, length);
|
||||
}
|
||||
};
|
||||
String createStringFromUtf16(const char16_t* utf16, size_t length) override {
|
||||
return plain_.createStringFromUtf16(utf16, length);
|
||||
}
|
||||
@@ -265,22 +265,22 @@ class RuntimeDecorator : public Base, private jsi::Instrumentation {
|
||||
|
||||
Object createObject() override {
|
||||
return plain_.createObject();
|
||||
}
|
||||
};
|
||||
|
||||
Object createObject(std::shared_ptr<HostObject> ho) override {
|
||||
return plain_.createObject(
|
||||
std::make_shared<DecoratedHostObject>(*this, std::move(ho)));
|
||||
}
|
||||
};
|
||||
std::shared_ptr<HostObject> getHostObject(const jsi::Object& o) override {
|
||||
std::shared_ptr<HostObject> dho = plain_.getHostObject(o);
|
||||
return static_cast<DecoratedHostObject&>(*dho).plainHO_;
|
||||
}
|
||||
};
|
||||
HostFunctionType& getHostFunction(const jsi::Function& f) override {
|
||||
HostFunctionType& dhf = plain_.getHostFunction(f);
|
||||
// This will fail if a cpp file including this header is not compiled
|
||||
// with RTTI.
|
||||
return dhf.target<DecoratedHostFunction>()->plainHF_;
|
||||
}
|
||||
};
|
||||
|
||||
bool hasNativeState(const Object& o) override {
|
||||
return plain_.hasNativeState(o);
|
||||
@@ -307,19 +307,19 @@ class RuntimeDecorator : public Base, private jsi::Instrumentation {
|
||||
|
||||
Value getProperty(const Object& o, const PropNameID& name) override {
|
||||
return plain_.getProperty(o, name);
|
||||
}
|
||||
};
|
||||
Value getProperty(const Object& o, const String& name) override {
|
||||
return plain_.getProperty(o, name);
|
||||
}
|
||||
};
|
||||
Value getProperty(const Object& o, const Value& name) override {
|
||||
return plain_.getProperty(o, name);
|
||||
}
|
||||
bool hasProperty(const Object& o, const PropNameID& name) override {
|
||||
return plain_.hasProperty(o, name);
|
||||
}
|
||||
};
|
||||
bool hasProperty(const Object& o, const String& name) override {
|
||||
return plain_.hasProperty(o, name);
|
||||
}
|
||||
};
|
||||
bool hasProperty(const Object& o, const Value& name) override {
|
||||
return plain_.hasProperty(o, name);
|
||||
}
|
||||
@@ -328,11 +328,11 @@ class RuntimeDecorator : public Base, private jsi::Instrumentation {
|
||||
const PropNameID& name,
|
||||
const Value& value) override {
|
||||
plain_.setPropertyValue(o, name, value);
|
||||
}
|
||||
};
|
||||
void setPropertyValue(const Object& o, const String& name, const Value& value)
|
||||
override {
|
||||
plain_.setPropertyValue(o, name, value);
|
||||
}
|
||||
};
|
||||
void setPropertyValue(const Object& o, const Value& name, const Value& value)
|
||||
override {
|
||||
plain_.setPropertyValue(o, name, value);
|
||||
@@ -352,53 +352,53 @@ class RuntimeDecorator : public Base, private jsi::Instrumentation {
|
||||
|
||||
bool isArray(const Object& o) const override {
|
||||
return plain_.isArray(o);
|
||||
}
|
||||
};
|
||||
bool isArrayBuffer(const Object& o) const override {
|
||||
return plain_.isArrayBuffer(o);
|
||||
}
|
||||
};
|
||||
bool isFunction(const Object& o) const override {
|
||||
return plain_.isFunction(o);
|
||||
}
|
||||
};
|
||||
bool isHostObject(const jsi::Object& o) const override {
|
||||
return plain_.isHostObject(o);
|
||||
}
|
||||
};
|
||||
bool isHostFunction(const jsi::Function& f) const override {
|
||||
return plain_.isHostFunction(f);
|
||||
}
|
||||
};
|
||||
Array getPropertyNames(const Object& o) override {
|
||||
return plain_.getPropertyNames(o);
|
||||
}
|
||||
};
|
||||
|
||||
WeakObject createWeakObject(const Object& o) override {
|
||||
return plain_.createWeakObject(o);
|
||||
}
|
||||
};
|
||||
Value lockWeakObject(const WeakObject& wo) override {
|
||||
return plain_.lockWeakObject(wo);
|
||||
}
|
||||
};
|
||||
|
||||
Array createArray(size_t length) override {
|
||||
return plain_.createArray(length);
|
||||
}
|
||||
};
|
||||
ArrayBuffer createArrayBuffer(
|
||||
std::shared_ptr<MutableBuffer> buffer) override {
|
||||
return plain_.createArrayBuffer(std::move(buffer));
|
||||
}
|
||||
};
|
||||
size_t size(const Array& a) override {
|
||||
return plain_.size(a);
|
||||
}
|
||||
};
|
||||
size_t size(const ArrayBuffer& ab) override {
|
||||
return plain_.size(ab);
|
||||
}
|
||||
};
|
||||
uint8_t* data(const ArrayBuffer& ab) override {
|
||||
return plain_.data(ab);
|
||||
}
|
||||
};
|
||||
Value getValueAtIndex(const Array& a, size_t i) override {
|
||||
return plain_.getValueAtIndex(a, i);
|
||||
}
|
||||
};
|
||||
void setValueAtIndexImpl(const Array& a, size_t i, const Value& value)
|
||||
override {
|
||||
plain_.setValueAtIndexImpl(a, i, value);
|
||||
}
|
||||
};
|
||||
|
||||
Function createFunctionFromHostFunction(
|
||||
const PropNameID& name,
|
||||
@@ -406,18 +406,18 @@ class RuntimeDecorator : public Base, private jsi::Instrumentation {
|
||||
HostFunctionType func) override {
|
||||
return plain_.createFunctionFromHostFunction(
|
||||
name, paramCount, DecoratedHostFunction(*this, std::move(func)));
|
||||
}
|
||||
};
|
||||
Value call(
|
||||
const Function& f,
|
||||
const Value& jsThis,
|
||||
const Value* args,
|
||||
size_t count) override {
|
||||
return plain_.call(f, jsThis, args, count);
|
||||
}
|
||||
};
|
||||
Value callAsConstructor(const Function& f, const Value* args, size_t count)
|
||||
override {
|
||||
return plain_.callAsConstructor(f, args, count);
|
||||
}
|
||||
};
|
||||
|
||||
void setRuntimeDataImpl(
|
||||
const UUID& uuid,
|
||||
@@ -440,20 +440,20 @@ class RuntimeDecorator : public Base, private jsi::Instrumentation {
|
||||
|
||||
bool strictEquals(const Symbol& a, const Symbol& b) const override {
|
||||
return plain_.strictEquals(a, b);
|
||||
}
|
||||
};
|
||||
bool strictEquals(const BigInt& a, const BigInt& b) const override {
|
||||
return plain_.strictEquals(a, b);
|
||||
}
|
||||
};
|
||||
bool strictEquals(const String& a, const String& b) const override {
|
||||
return plain_.strictEquals(a, b);
|
||||
}
|
||||
};
|
||||
bool strictEquals(const Object& a, const Object& b) const override {
|
||||
return plain_.strictEquals(a, b);
|
||||
}
|
||||
};
|
||||
|
||||
bool instanceOf(const Object& o, const Function& f) override {
|
||||
return plain_.instanceOf(o, f);
|
||||
}
|
||||
};
|
||||
|
||||
// jsi::Instrumentation methods
|
||||
|
||||
@@ -654,11 +654,11 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
||||
std::string description() override {
|
||||
Around around{with_};
|
||||
return RD::description();
|
||||
}
|
||||
};
|
||||
bool isInspectable() override {
|
||||
Around around{with_};
|
||||
return RD::isInspectable();
|
||||
}
|
||||
};
|
||||
|
||||
// The jsi:: prefix is necessary because MSVC compiler complains C2247:
|
||||
// Instrumentation is not accessible because RuntimeDecorator uses private
|
||||
@@ -673,35 +673,35 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
||||
Runtime::PointerValue* cloneSymbol(const Runtime::PointerValue* pv) override {
|
||||
Around around{with_};
|
||||
return RD::cloneSymbol(pv);
|
||||
}
|
||||
};
|
||||
Runtime::PointerValue* cloneBigInt(const Runtime::PointerValue* pv) override {
|
||||
Around around{with_};
|
||||
return RD::cloneBigInt(pv);
|
||||
}
|
||||
};
|
||||
Runtime::PointerValue* cloneString(const Runtime::PointerValue* pv) override {
|
||||
Around around{with_};
|
||||
return RD::cloneString(pv);
|
||||
}
|
||||
};
|
||||
Runtime::PointerValue* cloneObject(const Runtime::PointerValue* pv) override {
|
||||
Around around{with_};
|
||||
return RD::cloneObject(pv);
|
||||
}
|
||||
};
|
||||
Runtime::PointerValue* clonePropNameID(
|
||||
const Runtime::PointerValue* pv) override {
|
||||
Around around{with_};
|
||||
return RD::clonePropNameID(pv);
|
||||
}
|
||||
};
|
||||
|
||||
PropNameID createPropNameIDFromAscii(const char* str, size_t length)
|
||||
override {
|
||||
Around around{with_};
|
||||
return RD::createPropNameIDFromAscii(str, length);
|
||||
}
|
||||
};
|
||||
PropNameID createPropNameIDFromUtf8(const uint8_t* utf8, size_t length)
|
||||
override {
|
||||
Around around{with_};
|
||||
return RD::createPropNameIDFromUtf8(utf8, length);
|
||||
}
|
||||
};
|
||||
PropNameID createPropNameIDFromUtf16(const char16_t* utf16, size_t length)
|
||||
override {
|
||||
Around around{with_};
|
||||
@@ -710,58 +710,58 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
||||
PropNameID createPropNameIDFromString(const String& str) override {
|
||||
Around around{with_};
|
||||
return RD::createPropNameIDFromString(str);
|
||||
}
|
||||
};
|
||||
PropNameID createPropNameIDFromSymbol(const Symbol& sym) override {
|
||||
Around around{with_};
|
||||
return RD::createPropNameIDFromSymbol(sym);
|
||||
}
|
||||
};
|
||||
std::string utf8(const PropNameID& id) override {
|
||||
Around around{with_};
|
||||
return RD::utf8(id);
|
||||
}
|
||||
};
|
||||
bool compare(const PropNameID& a, const PropNameID& b) override {
|
||||
Around around{with_};
|
||||
return RD::compare(a, b);
|
||||
}
|
||||
};
|
||||
|
||||
std::string symbolToString(const Symbol& sym) override {
|
||||
Around around{with_};
|
||||
return RD::symbolToString(sym);
|
||||
}
|
||||
};
|
||||
|
||||
BigInt createBigIntFromInt64(int64_t i) override {
|
||||
Around around{with_};
|
||||
return RD::createBigIntFromInt64(i);
|
||||
}
|
||||
};
|
||||
BigInt createBigIntFromUint64(uint64_t i) override {
|
||||
Around around{with_};
|
||||
return RD::createBigIntFromUint64(i);
|
||||
}
|
||||
};
|
||||
bool bigintIsInt64(const BigInt& bi) override {
|
||||
Around around{with_};
|
||||
return RD::bigintIsInt64(bi);
|
||||
}
|
||||
};
|
||||
bool bigintIsUint64(const BigInt& bi) override {
|
||||
Around around{with_};
|
||||
return RD::bigintIsUint64(bi);
|
||||
}
|
||||
};
|
||||
uint64_t truncate(const BigInt& bi) override {
|
||||
Around around{with_};
|
||||
return RD::truncate(bi);
|
||||
}
|
||||
};
|
||||
String bigintToString(const BigInt& bi, int i) override {
|
||||
Around around{with_};
|
||||
return RD::bigintToString(bi, i);
|
||||
}
|
||||
};
|
||||
|
||||
String createStringFromAscii(const char* str, size_t length) override {
|
||||
Around around{with_};
|
||||
return RD::createStringFromAscii(str, length);
|
||||
}
|
||||
};
|
||||
String createStringFromUtf8(const uint8_t* utf8, size_t length) override {
|
||||
Around around{with_};
|
||||
return RD::createStringFromUtf8(utf8, length);
|
||||
}
|
||||
};
|
||||
String createStringFromUtf16(const char16_t* utf16, size_t length) override {
|
||||
Around around{with_};
|
||||
return RD::createStringFromUtf16(utf16, length);
|
||||
@@ -801,7 +801,7 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
||||
Value createValueFromJsonUtf8(const uint8_t* json, size_t length) override {
|
||||
Around around{with_};
|
||||
return RD::createValueFromJsonUtf8(json, length);
|
||||
}
|
||||
};
|
||||
|
||||
Object createObjectWithPrototype(const Value& prototype) override {
|
||||
Around around{with_};
|
||||
@@ -811,33 +811,33 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
||||
Object createObject() override {
|
||||
Around around{with_};
|
||||
return RD::createObject();
|
||||
}
|
||||
};
|
||||
Object createObject(std::shared_ptr<HostObject> ho) override {
|
||||
Around around{with_};
|
||||
return RD::createObject(std::move(ho));
|
||||
}
|
||||
};
|
||||
std::shared_ptr<HostObject> getHostObject(const jsi::Object& o) override {
|
||||
Around around{with_};
|
||||
return RD::getHostObject(o);
|
||||
}
|
||||
};
|
||||
HostFunctionType& getHostFunction(const jsi::Function& f) override {
|
||||
Around around{with_};
|
||||
return RD::getHostFunction(f);
|
||||
}
|
||||
};
|
||||
|
||||
bool hasNativeState(const Object& o) override {
|
||||
Around around{with_};
|
||||
return RD::hasNativeState(o);
|
||||
}
|
||||
};
|
||||
std::shared_ptr<NativeState> getNativeState(const Object& o) override {
|
||||
Around around{with_};
|
||||
return RD::getNativeState(o);
|
||||
}
|
||||
};
|
||||
void setNativeState(const Object& o, std::shared_ptr<NativeState> state)
|
||||
override {
|
||||
Around around{with_};
|
||||
RD::setNativeState(o, state);
|
||||
}
|
||||
};
|
||||
|
||||
void setPrototypeOf(const Object& object, const Value& prototype) override {
|
||||
Around around{with_};
|
||||
@@ -852,11 +852,11 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
||||
Value getProperty(const Object& o, const PropNameID& name) override {
|
||||
Around around{with_};
|
||||
return RD::getProperty(o, name);
|
||||
}
|
||||
};
|
||||
Value getProperty(const Object& o, const String& name) override {
|
||||
Around around{with_};
|
||||
return RD::getProperty(o, name);
|
||||
}
|
||||
};
|
||||
Value getProperty(const Object& o, const Value& name) override {
|
||||
Around around{with_};
|
||||
return RD::getProperty(o, name);
|
||||
@@ -864,11 +864,11 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
||||
bool hasProperty(const Object& o, const PropNameID& name) override {
|
||||
Around around{with_};
|
||||
return RD::hasProperty(o, name);
|
||||
}
|
||||
};
|
||||
bool hasProperty(const Object& o, const String& name) override {
|
||||
Around around{with_};
|
||||
return RD::hasProperty(o, name);
|
||||
}
|
||||
};
|
||||
bool hasProperty(const Object& o, const Value& name) override {
|
||||
Around around{with_};
|
||||
return RD::hasProperty(o, name);
|
||||
@@ -879,12 +879,12 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
||||
const Value& value) override {
|
||||
Around around{with_};
|
||||
RD::setPropertyValue(o, name, value);
|
||||
}
|
||||
};
|
||||
void setPropertyValue(const Object& o, const String& name, const Value& value)
|
||||
override {
|
||||
Around around{with_};
|
||||
RD::setPropertyValue(o, name, value);
|
||||
}
|
||||
};
|
||||
void setPropertyValue(const Object& o, const Value& name, const Value& value)
|
||||
override {
|
||||
Around around{with_};
|
||||
@@ -909,66 +909,66 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
||||
bool isArray(const Object& o) const override {
|
||||
Around around{with_};
|
||||
return RD::isArray(o);
|
||||
}
|
||||
};
|
||||
bool isArrayBuffer(const Object& o) const override {
|
||||
Around around{with_};
|
||||
return RD::isArrayBuffer(o);
|
||||
}
|
||||
};
|
||||
bool isFunction(const Object& o) const override {
|
||||
Around around{with_};
|
||||
return RD::isFunction(o);
|
||||
}
|
||||
};
|
||||
bool isHostObject(const jsi::Object& o) const override {
|
||||
Around around{with_};
|
||||
return RD::isHostObject(o);
|
||||
}
|
||||
};
|
||||
bool isHostFunction(const jsi::Function& f) const override {
|
||||
Around around{with_};
|
||||
return RD::isHostFunction(f);
|
||||
}
|
||||
};
|
||||
Array getPropertyNames(const Object& o) override {
|
||||
Around around{with_};
|
||||
return RD::getPropertyNames(o);
|
||||
}
|
||||
};
|
||||
|
||||
WeakObject createWeakObject(const Object& o) override {
|
||||
Around around{with_};
|
||||
return RD::createWeakObject(o);
|
||||
}
|
||||
};
|
||||
Value lockWeakObject(const WeakObject& wo) override {
|
||||
Around around{with_};
|
||||
return RD::lockWeakObject(wo);
|
||||
}
|
||||
};
|
||||
|
||||
Array createArray(size_t length) override {
|
||||
Around around{with_};
|
||||
return RD::createArray(length);
|
||||
}
|
||||
};
|
||||
ArrayBuffer createArrayBuffer(
|
||||
std::shared_ptr<MutableBuffer> buffer) override {
|
||||
return RD::createArrayBuffer(std::move(buffer));
|
||||
}
|
||||
};
|
||||
size_t size(const Array& a) override {
|
||||
Around around{with_};
|
||||
return RD::size(a);
|
||||
}
|
||||
};
|
||||
size_t size(const ArrayBuffer& ab) override {
|
||||
Around around{with_};
|
||||
return RD::size(ab);
|
||||
}
|
||||
};
|
||||
uint8_t* data(const ArrayBuffer& ab) override {
|
||||
Around around{with_};
|
||||
return RD::data(ab);
|
||||
}
|
||||
};
|
||||
Value getValueAtIndex(const Array& a, size_t i) override {
|
||||
Around around{with_};
|
||||
return RD::getValueAtIndex(a, i);
|
||||
}
|
||||
};
|
||||
void setValueAtIndexImpl(const Array& a, size_t i, const Value& value)
|
||||
override {
|
||||
Around around{with_};
|
||||
RD::setValueAtIndexImpl(a, i, value);
|
||||
}
|
||||
};
|
||||
|
||||
Function createFunctionFromHostFunction(
|
||||
const PropNameID& name,
|
||||
@@ -977,7 +977,7 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
||||
Around around{with_};
|
||||
return RD::createFunctionFromHostFunction(
|
||||
name, paramCount, std::move(func));
|
||||
}
|
||||
};
|
||||
Value call(
|
||||
const Function& f,
|
||||
const Value& jsThis,
|
||||
@@ -985,12 +985,12 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
||||
size_t count) override {
|
||||
Around around{with_};
|
||||
return RD::call(f, jsThis, args, count);
|
||||
}
|
||||
};
|
||||
Value callAsConstructor(const Function& f, const Value* args, size_t count)
|
||||
override {
|
||||
Around around{with_};
|
||||
return RD::callAsConstructor(f, args, count);
|
||||
}
|
||||
};
|
||||
|
||||
// Private data for managing scopes.
|
||||
Runtime::ScopeState* pushScope() override {
|
||||
@@ -1005,31 +1005,31 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
|
||||
bool strictEquals(const Symbol& a, const Symbol& b) const override {
|
||||
Around around{with_};
|
||||
return RD::strictEquals(a, b);
|
||||
}
|
||||
};
|
||||
bool strictEquals(const BigInt& a, const BigInt& b) const override {
|
||||
Around around{with_};
|
||||
return RD::strictEquals(a, b);
|
||||
}
|
||||
};
|
||||
|
||||
bool strictEquals(const String& a, const String& b) const override {
|
||||
Around around{with_};
|
||||
return RD::strictEquals(a, b);
|
||||
}
|
||||
};
|
||||
bool strictEquals(const Object& a, const Object& b) const override {
|
||||
Around around{with_};
|
||||
return RD::strictEquals(a, b);
|
||||
}
|
||||
};
|
||||
|
||||
bool instanceOf(const Object& o, const Function& f) override {
|
||||
Around around{with_};
|
||||
return RD::instanceOf(o, f);
|
||||
}
|
||||
};
|
||||
|
||||
void setExternalMemoryPressure(const jsi::Object& obj, size_t amount)
|
||||
override {
|
||||
Around around{with_};
|
||||
RD::setExternalMemoryPressure(obj, amount);
|
||||
}
|
||||
};
|
||||
|
||||
void setRuntimeDataImpl(
|
||||
const UUID& uuid,
|
||||
|
||||
@@ -13,11 +13,13 @@ namespace facebook::react::jsinspector_modern::cdp::network {
|
||||
|
||||
namespace {
|
||||
|
||||
folly::dynamic headersToDynamic(const Headers& headers) {
|
||||
folly::dynamic headersToDynamic(const std::optional<Headers>& headers) {
|
||||
folly::dynamic result = folly::dynamic::object;
|
||||
|
||||
for (const auto& [key, value] : headers) {
|
||||
result[key] = value;
|
||||
if (headers) {
|
||||
for (const auto& [key, value] : *headers) {
|
||||
result[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -39,14 +41,14 @@ folly::dynamic Request::toDynamic() const {
|
||||
/* static */ Response Response::fromInputParams(
|
||||
const std::string& url,
|
||||
uint16_t status,
|
||||
const Headers& headers,
|
||||
const std::optional<Headers>& headers,
|
||||
int encodedDataLength) {
|
||||
return {
|
||||
.url = url,
|
||||
.status = status,
|
||||
.statusText = httpReasonPhrase(status),
|
||||
.headers = headers,
|
||||
.mimeType = mimeTypeFromHeaders(headers),
|
||||
.mimeType = mimeTypeFromHeaders(headers.value_or(Headers())),
|
||||
.encodedDataLength = encodedDataLength,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ using Headers = std::map<std::string, std::string>;
|
||||
struct Request {
|
||||
std::string url;
|
||||
std::string method;
|
||||
Headers headers;
|
||||
std::optional<Headers> headers;
|
||||
std::optional<std::string> postData;
|
||||
|
||||
folly::dynamic toDynamic() const;
|
||||
@@ -37,7 +37,7 @@ struct Response {
|
||||
std::string url;
|
||||
uint16_t status;
|
||||
std::string statusText;
|
||||
Headers headers;
|
||||
std::optional<Headers> headers;
|
||||
std::string mimeType;
|
||||
int encodedDataLength;
|
||||
|
||||
@@ -48,7 +48,7 @@ struct Response {
|
||||
static Response fromInputParams(
|
||||
const std::string& url,
|
||||
uint16_t status,
|
||||
const Headers& headers,
|
||||
const std::optional<Headers>& headers,
|
||||
int encodedDataLength);
|
||||
|
||||
folly::dynamic toDynamic() const;
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
|
||||
namespace facebook::react::jsinspector_modern {
|
||||
|
||||
using Headers = std::map<std::string, std::string>;
|
||||
|
||||
/**
|
||||
* Get the HTTP reason phrase for a given status code (RFC 9110).
|
||||
*/
|
||||
@@ -23,6 +21,7 @@ std::string httpReasonPhrase(uint16_t status);
|
||||
* Get the MIME type for a response based on the 'Content-Type' header. If
|
||||
* the header is not present, returns 'application/octet-stream'.
|
||||
*/
|
||||
std::string mimeTypeFromHeaders(const Headers& headers);
|
||||
std::string mimeTypeFromHeaders(
|
||||
const std::map<std::string, std::string>& headers);
|
||||
|
||||
} // namespace facebook::react::jsinspector_modern
|
||||
|
||||
@@ -18,7 +18,6 @@ target_include_directories(jsinspector_tracing PUBLIC ${REACT_COMMON_DIR})
|
||||
|
||||
target_link_libraries(jsinspector_tracing
|
||||
folly_runtime
|
||||
jsinspector_network
|
||||
oscompat
|
||||
react_timing
|
||||
)
|
||||
|
||||
+42
-105
@@ -9,8 +9,6 @@
|
||||
#include "Timing.h"
|
||||
#include "TraceEventSerializer.h"
|
||||
|
||||
#include <jsinspector-modern/network/CdpNetwork.h>
|
||||
#include <jsinspector-modern/network/HttpUtils.h>
|
||||
#include <oscompat/OSCompat.h>
|
||||
#include <react/timing/primitives.h>
|
||||
|
||||
@@ -18,12 +16,9 @@
|
||||
|
||||
#include <mutex>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
namespace facebook::react::jsinspector_modern::tracing {
|
||||
|
||||
namespace {
|
||||
|
||||
/**
|
||||
* Instead of validating that the indicated duration is positive, we can ensure
|
||||
* the value is sensible (less than 1 seccond doesn't make much sense).
|
||||
@@ -36,7 +31,6 @@ ThreadId getCurrentThreadId() {
|
||||
oscompat::getCurrentThreadId();
|
||||
return CURRENT_THREAD_ID;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
PerformanceTracer& PerformanceTracer::getInstance() {
|
||||
@@ -90,7 +84,6 @@ std::optional<std::vector<TraceEvent>> PerformanceTracer::stopTracing() {
|
||||
tracingAtomic_ = false;
|
||||
performanceMeasureCount_ = 0;
|
||||
|
||||
alreadyEmittedEntryForComponentsTrackOrdering_ = false;
|
||||
events = collectEventsAndClearBuffers(currentTraceEndTime);
|
||||
}
|
||||
|
||||
@@ -239,12 +232,15 @@ void PerformanceTracer::reportEventLoopMicrotasks(
|
||||
});
|
||||
}
|
||||
|
||||
void PerformanceTracer::reportResourceSendRequest(
|
||||
const std::string& devtoolsRequestId,
|
||||
HighResTimeStamp start,
|
||||
void PerformanceTracer::reportResourceTiming(
|
||||
const std::string& requestId,
|
||||
const std::string& url,
|
||||
HighResTimeStamp fetchStart,
|
||||
HighResTimeStamp responseStart,
|
||||
HighResTimeStamp responseEnd,
|
||||
int statusCode,
|
||||
const std::string& requestMethod,
|
||||
const Headers& headers) {
|
||||
const std::string& resourceType) {
|
||||
if (!tracingAtomic_) {
|
||||
return;
|
||||
}
|
||||
@@ -254,67 +250,28 @@ void PerformanceTracer::reportResourceSendRequest(
|
||||
return;
|
||||
}
|
||||
|
||||
auto resourceType =
|
||||
jsinspector_modern::cdp::network::resourceTypeFromMimeType(
|
||||
jsinspector_modern::mimeTypeFromHeaders(headers));
|
||||
enqueueEvent(PerformanceTracerResourceWillSendRequest{
|
||||
.requestId = requestId,
|
||||
.start = fetchStart,
|
||||
.threadId = getCurrentThreadId(),
|
||||
});
|
||||
enqueueEvent(PerformanceTracerResourceSendRequest{
|
||||
.requestId = devtoolsRequestId,
|
||||
.requestId = requestId,
|
||||
.url = url,
|
||||
.start = start,
|
||||
.start = fetchStart,
|
||||
.requestMethod = requestMethod,
|
||||
.resourceType = resourceType,
|
||||
.threadId = getCurrentThreadId(),
|
||||
});
|
||||
}
|
||||
|
||||
void PerformanceTracer::reportResourceReceiveResponse(
|
||||
const std::string& devtoolsRequestId,
|
||||
HighResTimeStamp start,
|
||||
int statusCode,
|
||||
const Headers& headers,
|
||||
int encodedDataLength,
|
||||
folly::dynamic timingData) {
|
||||
if (!tracingAtomic_) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
if (!tracingAtomic_) {
|
||||
return;
|
||||
}
|
||||
|
||||
enqueueEvent(PerformanceTracerResourceReceiveResponse{
|
||||
.requestId = devtoolsRequestId,
|
||||
.start = start,
|
||||
.encodedDataLength = encodedDataLength,
|
||||
.headers = headers,
|
||||
.mimeType = jsinspector_modern::mimeTypeFromHeaders(headers),
|
||||
.protocol = "h2",
|
||||
.requestId = requestId,
|
||||
.start = responseStart,
|
||||
.statusCode = statusCode,
|
||||
.timing = std::move(timingData),
|
||||
.threadId = getCurrentThreadId(),
|
||||
});
|
||||
}
|
||||
|
||||
void PerformanceTracer::reportResourceFinish(
|
||||
const std::string& devtoolsRequestId,
|
||||
HighResTimeStamp start,
|
||||
int encodedDataLength,
|
||||
int decodedBodyLength) {
|
||||
if (!tracingAtomic_) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
if (!tracingAtomic_) {
|
||||
return;
|
||||
}
|
||||
|
||||
enqueueEvent(PerformanceTracerResourceFinish{
|
||||
.requestId = devtoolsRequestId,
|
||||
.start = start,
|
||||
.encodedDataLength = encodedDataLength,
|
||||
.decodedBodyLength = decodedBodyLength,
|
||||
.requestId = requestId,
|
||||
.start = responseEnd,
|
||||
.threadId = getCurrentThreadId(),
|
||||
});
|
||||
}
|
||||
@@ -551,8 +508,11 @@ void PerformanceTracer::enqueueTraceEventsFromPerformanceTracerEvent(
|
||||
});
|
||||
},
|
||||
[&](PerformanceTracerEventTimeStamp&& event) {
|
||||
folly::dynamic data = folly::dynamic::object("name", event.name)(
|
||||
"message", std::move(event.name));
|
||||
// `name` takes precedence over `message` in Chrome DevTools
|
||||
// Frontend, no need
|
||||
// to record both.
|
||||
folly::dynamic data =
|
||||
folly::dynamic::object("name", std::move(event.name));
|
||||
if (event.start) {
|
||||
if (std::holds_alternative<HighResTimeStamp>(*event.start)) {
|
||||
data["start"] = highResTimeStampToTracingClockTimeStamp(
|
||||
@@ -569,34 +529,6 @@ void PerformanceTracer::enqueueTraceEventsFromPerformanceTracerEvent(
|
||||
data["end"] = std::move(std::get<std::string>(*event.end));
|
||||
}
|
||||
}
|
||||
|
||||
// We add a custom synthetic entry here to manually put Components
|
||||
// track right under the Scheduler track. Will be removed once CDT
|
||||
// Frontend preserves track ordering and we upgrade the fork.
|
||||
if (!alreadyEmittedEntryForComponentsTrackOrdering_ &&
|
||||
event.trackName && !event.trackGroup) {
|
||||
if (*event.trackName == "Components \u269B") {
|
||||
alreadyEmittedEntryForComponentsTrackOrdering_ = true;
|
||||
// React is using 0.003 for Scheduler sub-tracks.
|
||||
auto timestamp = highResTimeStampToTracingClockTimeStamp(
|
||||
HighResTimeStamp::fromDOMHighResTimeStamp(0.004));
|
||||
events.emplace_back(TraceEvent{
|
||||
.name = "TimeStamp",
|
||||
.cat = "devtools.timeline",
|
||||
.ph = 'I',
|
||||
.ts = event.createdAt,
|
||||
.pid = processId_,
|
||||
.tid = event.threadId,
|
||||
.args = folly::dynamic::object(
|
||||
"data",
|
||||
folly::dynamic::object(
|
||||
"name", "ReactNative-ComponentsTrack")(
|
||||
"start", timestamp)("end", timestamp)(
|
||||
"track", *event.trackName)),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (event.trackName) {
|
||||
data["track"] = std::move(*event.trackName);
|
||||
}
|
||||
@@ -617,10 +549,25 @@ void PerformanceTracer::enqueueTraceEventsFromPerformanceTracerEvent(
|
||||
.args = folly::dynamic::object("data", std::move(data)),
|
||||
});
|
||||
},
|
||||
[&](PerformanceTracerResourceWillSendRequest&& event) {
|
||||
folly::dynamic data =
|
||||
folly::dynamic::object("requestId", std::move(event.requestId));
|
||||
|
||||
events.emplace_back(TraceEvent{
|
||||
.name = "ResourceWillSendRequest",
|
||||
.cat = "devtools.timeline",
|
||||
.ph = 'I',
|
||||
.ts = event.start,
|
||||
.pid = processId_,
|
||||
.s = 't',
|
||||
.tid = event.threadId,
|
||||
.args = folly::dynamic::object("data", std::move(data)),
|
||||
});
|
||||
},
|
||||
[&](PerformanceTracerResourceSendRequest&& event) {
|
||||
folly::dynamic data =
|
||||
folly::dynamic::object("initiator", folly::dynamic::object())(
|
||||
"priority", "VeryHigh")("renderBlocking", "non_blocking")(
|
||||
"renderBlocking", "non_blocking")(
|
||||
"requestId", std::move(event.requestId))(
|
||||
"requestMethod", std::move(event.requestMethod))(
|
||||
"resourceType", std::move(event.resourceType))(
|
||||
@@ -638,18 +585,10 @@ void PerformanceTracer::enqueueTraceEventsFromPerformanceTracerEvent(
|
||||
});
|
||||
},
|
||||
[&](PerformanceTracerResourceReceiveResponse&& event) {
|
||||
folly::dynamic headersEntries = folly::dynamic::array;
|
||||
for (const auto& [key, value] : event.headers) {
|
||||
headersEntries.push_back(
|
||||
folly::dynamic::object("name", key)("value", value));
|
||||
}
|
||||
folly::dynamic data = folly::dynamic::object(
|
||||
"encodedDataLength", event.encodedDataLength)(
|
||||
"headers", headersEntries)("mimeType", event.mimeType)(
|
||||
"protocol", event.protocol)(
|
||||
folly::dynamic data = folly::dynamic::object("protocol", "h2")(
|
||||
"requestId", std::move(event.requestId))(
|
||||
"statusCode", event.statusCode)(
|
||||
"timing", std::move(event.timing));
|
||||
"timing", folly::dynamic::object());
|
||||
|
||||
events.emplace_back(TraceEvent{
|
||||
.name = "ResourceReceiveResponse",
|
||||
@@ -663,9 +602,7 @@ void PerformanceTracer::enqueueTraceEventsFromPerformanceTracerEvent(
|
||||
});
|
||||
},
|
||||
[&](PerformanceTracerResourceFinish&& event) {
|
||||
folly::dynamic data = folly::dynamic::object(
|
||||
"decodedBodyLength", event.decodedBodyLength)("didFail", false)(
|
||||
"encodedDataLength", event.encodedDataLength)(
|
||||
folly::dynamic data = folly::dynamic::object("didFail", false)(
|
||||
"requestId", std::move(event.requestId));
|
||||
|
||||
events.emplace_back(TraceEvent{
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
#include <folly/dynamic.h>
|
||||
#include <atomic>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
@@ -25,8 +24,6 @@ namespace facebook::react::jsinspector_modern::tracing {
|
||||
// TODO: Review how this API is integrated into jsinspector_modern (singleton
|
||||
// design is copied from earlier FuseboxTracer prototype).
|
||||
|
||||
using Headers = std::map<std::string, std::string>;
|
||||
|
||||
/**
|
||||
* [Experimental] An interface for logging performance trace events to the
|
||||
* modern debugger server.
|
||||
@@ -112,56 +109,19 @@ class PerformanceTracer {
|
||||
void reportEventLoopMicrotasks(HighResTimeStamp start, HighResTimeStamp end);
|
||||
|
||||
/**
|
||||
* Record a "ResourceWillSendRequest" event. Paired with other "Resource*"
|
||||
* events, renders a network request timeline in the Performance panel Network
|
||||
* track.
|
||||
*
|
||||
* If not currently tracing, this is a no-op.
|
||||
* Record a "ResourceSendRequest"/"ResourceFinish" event pair - a labelled
|
||||
* duration in the Performance timeline Network track. If not currently
|
||||
* tracing, this is a no-op.
|
||||
*/
|
||||
void reportResourceWillSendRequest(
|
||||
const std::string& devtoolsRequestId,
|
||||
HighResTimeStamp start);
|
||||
|
||||
/**
|
||||
* Record a "ResourceSendRequest" event. Paired with other "Resource*"
|
||||
* events, renders a network request timeline in the Performance panel Network
|
||||
* track.
|
||||
*
|
||||
* If not currently tracing, this is a no-op.
|
||||
*/
|
||||
void reportResourceSendRequest(
|
||||
const std::string& devtoolsRequestId,
|
||||
HighResTimeStamp start,
|
||||
void reportResourceTiming(
|
||||
const std::string& requestId,
|
||||
const std::string& url,
|
||||
const std::string& requestMethod,
|
||||
const Headers& headers);
|
||||
|
||||
/**
|
||||
* Record a "ResourceReceiveResponse" event. Paired with other "Resource*"
|
||||
* events, renders a network request timeline in the Performance panel Network
|
||||
* track.
|
||||
*
|
||||
* If not currently tracing, this is a no-op.
|
||||
*/
|
||||
void reportResourceReceiveResponse(
|
||||
const std::string& devtoolsRequestId,
|
||||
HighResTimeStamp start,
|
||||
HighResTimeStamp fetchStart,
|
||||
HighResTimeStamp responseStart,
|
||||
HighResTimeStamp responseEnd,
|
||||
int statusCode,
|
||||
const Headers& headers,
|
||||
int encodedDataLength,
|
||||
folly::dynamic timingData);
|
||||
|
||||
/**
|
||||
* Record a "ResourceFinish" event. Paired with other "Resource*" events,
|
||||
* renders a network request timeline in the Performance panel Network track.
|
||||
*
|
||||
* If not currently tracing, this is a no-op.
|
||||
*/
|
||||
void reportResourceFinish(
|
||||
const std::string& devtoolsRequestId,
|
||||
HighResTimeStamp start,
|
||||
int encodedDataLength,
|
||||
int decodedBodyLength);
|
||||
const std::string& requestMethod,
|
||||
const std::string& resourceType);
|
||||
|
||||
/**
|
||||
* Creates "Profile" Trace Event.
|
||||
@@ -236,6 +196,13 @@ class PerformanceTracer {
|
||||
HighResTimeStamp createdAt = HighResTimeStamp::now();
|
||||
};
|
||||
|
||||
struct PerformanceTracerResourceWillSendRequest {
|
||||
std::string requestId;
|
||||
HighResTimeStamp start;
|
||||
ThreadId threadId;
|
||||
HighResTimeStamp createdAt = HighResTimeStamp::now();
|
||||
};
|
||||
|
||||
struct PerformanceTracerResourceSendRequest {
|
||||
std::string requestId;
|
||||
std::string url;
|
||||
@@ -249,8 +216,6 @@ class PerformanceTracer {
|
||||
struct PerformanceTracerResourceFinish {
|
||||
std::string requestId;
|
||||
HighResTimeStamp start;
|
||||
int encodedDataLength;
|
||||
int decodedBodyLength;
|
||||
ThreadId threadId;
|
||||
HighResTimeStamp createdAt = HighResTimeStamp::now();
|
||||
};
|
||||
@@ -258,12 +223,7 @@ class PerformanceTracer {
|
||||
struct PerformanceTracerResourceReceiveResponse {
|
||||
std::string requestId;
|
||||
HighResTimeStamp start;
|
||||
int encodedDataLength;
|
||||
Headers headers;
|
||||
std::string mimeType;
|
||||
std::string protocol;
|
||||
int statusCode;
|
||||
folly::dynamic timing;
|
||||
ThreadId threadId;
|
||||
HighResTimeStamp createdAt = HighResTimeStamp::now();
|
||||
};
|
||||
@@ -274,6 +234,7 @@ class PerformanceTracer {
|
||||
PerformanceTracerEventEventLoopMicrotask,
|
||||
PerformanceTracerEventMark,
|
||||
PerformanceTracerEventMeasure,
|
||||
PerformanceTracerResourceWillSendRequest,
|
||||
PerformanceTracerResourceSendRequest,
|
||||
PerformanceTracerResourceReceiveResponse,
|
||||
PerformanceTracerResourceFinish>;
|
||||
@@ -310,10 +271,6 @@ class PerformanceTracer {
|
||||
std::vector<PerformanceTracerEvent>* previousBuffer_{};
|
||||
HighResTimeStamp currentBufferStartTime_;
|
||||
|
||||
// A flag that is used to ensure we only emit one auxiliary entry for the
|
||||
// ordering of Scheduler / Component tracks.
|
||||
bool alreadyEmittedEntryForComponentsTrackOrdering_ = false;
|
||||
|
||||
/**
|
||||
* Protects data members of this class for concurrent access, including
|
||||
* the tracingAtomic_, in order to eliminate potential "logic" races.
|
||||
|
||||
-1
@@ -43,7 +43,6 @@ Pod::Spec.new do |s|
|
||||
|
||||
resolve_use_frameworks(s, header_mappings_dir: "../..", module_name: module_name)
|
||||
|
||||
add_dependency(s, "React-jsinspectornetwork", :framework_name => 'jsinspector_modernnetwork')
|
||||
s.dependency "React-oscompat"
|
||||
s.dependency "React-timing"
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <ReactCommon/RuntimeExecutor.h>
|
||||
#include <cxxreact/MessageQueueThread.h>
|
||||
#include <jsi/jsi.h>
|
||||
#include <jsinspector-modern/ReactCdp.h>
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
class MessageQueueThread;
|
||||
|
||||
/**
|
||||
* An interface that represents an instance of a JS VM
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<50f81f60d4c2d2e08fde98f4a2d841ea>>
|
||||
* @generated SignedSource<<42bea10b4b62a91dce8fde7674f76ceb>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -134,10 +134,6 @@ bool ReactNativeFeatureFlags::enableImmediateUpdateModeForContentOffsetChanges()
|
||||
return getAccessor().enableImmediateUpdateModeForContentOffsetChanges();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::enableImperativeFocus() {
|
||||
return getAccessor().enableImperativeFocus();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizationIOS() {
|
||||
return getAccessor().enableInteropViewManagerClassLookUpOptimizationIOS();
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<3446eebd26c1142fd78cd5413771569d>>
|
||||
* @generated SignedSource<<40421ac664927693136a8e3197e3c07c>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -174,11 +174,6 @@ class ReactNativeFeatureFlags {
|
||||
*/
|
||||
RN_EXPORT static bool enableImmediateUpdateModeForContentOffsetChanges();
|
||||
|
||||
/**
|
||||
* Enable ref.focus() and ref.blur() for all views, not just TextInput.
|
||||
*/
|
||||
RN_EXPORT static bool enableImperativeFocus();
|
||||
|
||||
/**
|
||||
* This is to fix the issue with interop view manager where component descriptor lookup is causing ViewManager to preload.
|
||||
*/
|
||||
|
||||
+47
-65
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<891375f88b3f48b324de29e31c8936cf>>
|
||||
* @generated SignedSource<<e433f2f36d7a2852aaea2b37f671a7e1>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -515,24 +515,6 @@ bool ReactNativeFeatureFlagsAccessor::enableImmediateUpdateModeForContentOffsetC
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::enableImperativeFocus() {
|
||||
auto flagValue = enableImperativeFocus_.load();
|
||||
|
||||
if (!flagValue.has_value()) {
|
||||
// This block is not exclusive but it is not necessary.
|
||||
// If multiple threads try to initialize the feature flag, we would only
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(27, "enableImperativeFocus");
|
||||
|
||||
flagValue = currentProvider_->enableImperativeFocus();
|
||||
enableImperativeFocus_ = flagValue;
|
||||
}
|
||||
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::enableInteropViewManagerClassLookUpOptimizationIOS() {
|
||||
auto flagValue = enableInteropViewManagerClassLookUpOptimizationIOS_.load();
|
||||
|
||||
@@ -542,7 +524,7 @@ bool ReactNativeFeatureFlagsAccessor::enableInteropViewManagerClassLookUpOptimiz
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(28, "enableInteropViewManagerClassLookUpOptimizationIOS");
|
||||
markFlagAsAccessed(27, "enableInteropViewManagerClassLookUpOptimizationIOS");
|
||||
|
||||
flagValue = currentProvider_->enableInteropViewManagerClassLookUpOptimizationIOS();
|
||||
enableInteropViewManagerClassLookUpOptimizationIOS_ = flagValue;
|
||||
@@ -560,7 +542,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(29, "enableLayoutAnimationsOnAndroid");
|
||||
markFlagAsAccessed(28, "enableLayoutAnimationsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->enableLayoutAnimationsOnAndroid();
|
||||
enableLayoutAnimationsOnAndroid_ = flagValue;
|
||||
@@ -578,7 +560,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnIOS() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(30, "enableLayoutAnimationsOnIOS");
|
||||
markFlagAsAccessed(29, "enableLayoutAnimationsOnIOS");
|
||||
|
||||
flagValue = currentProvider_->enableLayoutAnimationsOnIOS();
|
||||
enableLayoutAnimationsOnIOS_ = flagValue;
|
||||
@@ -596,7 +578,7 @@ bool ReactNativeFeatureFlagsAccessor::enableMainQueueCoordinatorOnIOS() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(31, "enableMainQueueCoordinatorOnIOS");
|
||||
markFlagAsAccessed(30, "enableMainQueueCoordinatorOnIOS");
|
||||
|
||||
flagValue = currentProvider_->enableMainQueueCoordinatorOnIOS();
|
||||
enableMainQueueCoordinatorOnIOS_ = flagValue;
|
||||
@@ -614,7 +596,7 @@ bool ReactNativeFeatureFlagsAccessor::enableModuleArgumentNSNullConversionIOS()
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(32, "enableModuleArgumentNSNullConversionIOS");
|
||||
markFlagAsAccessed(31, "enableModuleArgumentNSNullConversionIOS");
|
||||
|
||||
flagValue = currentProvider_->enableModuleArgumentNSNullConversionIOS();
|
||||
enableModuleArgumentNSNullConversionIOS_ = flagValue;
|
||||
@@ -632,7 +614,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNativeCSSParsing() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(33, "enableNativeCSSParsing");
|
||||
markFlagAsAccessed(32, "enableNativeCSSParsing");
|
||||
|
||||
flagValue = currentProvider_->enableNativeCSSParsing();
|
||||
enableNativeCSSParsing_ = flagValue;
|
||||
@@ -650,7 +632,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNetworkEventReporting() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(34, "enableNetworkEventReporting");
|
||||
markFlagAsAccessed(33, "enableNetworkEventReporting");
|
||||
|
||||
flagValue = currentProvider_->enableNetworkEventReporting();
|
||||
enableNetworkEventReporting_ = flagValue;
|
||||
@@ -668,7 +650,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePreparedTextLayout() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(35, "enablePreparedTextLayout");
|
||||
markFlagAsAccessed(34, "enablePreparedTextLayout");
|
||||
|
||||
flagValue = currentProvider_->enablePreparedTextLayout();
|
||||
enablePreparedTextLayout_ = flagValue;
|
||||
@@ -686,7 +668,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePropsUpdateReconciliationAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(36, "enablePropsUpdateReconciliationAndroid");
|
||||
markFlagAsAccessed(35, "enablePropsUpdateReconciliationAndroid");
|
||||
|
||||
flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid();
|
||||
enablePropsUpdateReconciliationAndroid_ = flagValue;
|
||||
@@ -704,7 +686,7 @@ bool ReactNativeFeatureFlagsAccessor::enableResourceTimingAPI() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(37, "enableResourceTimingAPI");
|
||||
markFlagAsAccessed(36, "enableResourceTimingAPI");
|
||||
|
||||
flagValue = currentProvider_->enableResourceTimingAPI();
|
||||
enableResourceTimingAPI_ = flagValue;
|
||||
@@ -722,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSwiftUIBasedFilters() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(38, "enableSwiftUIBasedFilters");
|
||||
markFlagAsAccessed(37, "enableSwiftUIBasedFilters");
|
||||
|
||||
flagValue = currentProvider_->enableSwiftUIBasedFilters();
|
||||
enableSwiftUIBasedFilters_ = flagValue;
|
||||
@@ -740,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewCulling() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(39, "enableViewCulling");
|
||||
markFlagAsAccessed(38, "enableViewCulling");
|
||||
|
||||
flagValue = currentProvider_->enableViewCulling();
|
||||
enableViewCulling_ = flagValue;
|
||||
@@ -758,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecycling() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(40, "enableViewRecycling");
|
||||
markFlagAsAccessed(39, "enableViewRecycling");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecycling();
|
||||
enableViewRecycling_ = flagValue;
|
||||
@@ -776,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForImage() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(41, "enableViewRecyclingForImage");
|
||||
markFlagAsAccessed(40, "enableViewRecyclingForImage");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecyclingForImage();
|
||||
enableViewRecyclingForImage_ = flagValue;
|
||||
@@ -794,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForScrollView() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(42, "enableViewRecyclingForScrollView");
|
||||
markFlagAsAccessed(41, "enableViewRecyclingForScrollView");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecyclingForScrollView();
|
||||
enableViewRecyclingForScrollView_ = flagValue;
|
||||
@@ -812,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForText() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(43, "enableViewRecyclingForText");
|
||||
markFlagAsAccessed(42, "enableViewRecyclingForText");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecyclingForText();
|
||||
enableViewRecyclingForText_ = flagValue;
|
||||
@@ -830,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForView() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(44, "enableViewRecyclingForView");
|
||||
markFlagAsAccessed(43, "enableViewRecyclingForView");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecyclingForView();
|
||||
enableViewRecyclingForView_ = flagValue;
|
||||
@@ -848,7 +830,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewDebugFeatures() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(45, "enableVirtualViewDebugFeatures");
|
||||
markFlagAsAccessed(44, "enableVirtualViewDebugFeatures");
|
||||
|
||||
flagValue = currentProvider_->enableVirtualViewDebugFeatures();
|
||||
enableVirtualViewDebugFeatures_ = flagValue;
|
||||
@@ -866,7 +848,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewRenderState() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(46, "enableVirtualViewRenderState");
|
||||
markFlagAsAccessed(45, "enableVirtualViewRenderState");
|
||||
|
||||
flagValue = currentProvider_->enableVirtualViewRenderState();
|
||||
enableVirtualViewRenderState_ = flagValue;
|
||||
@@ -884,7 +866,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewWindowFocusDetection() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(47, "enableVirtualViewWindowFocusDetection");
|
||||
markFlagAsAccessed(46, "enableVirtualViewWindowFocusDetection");
|
||||
|
||||
flagValue = currentProvider_->enableVirtualViewWindowFocusDetection();
|
||||
enableVirtualViewWindowFocusDetection_ = flagValue;
|
||||
@@ -902,7 +884,7 @@ bool ReactNativeFeatureFlagsAccessor::enableWebPerformanceAPIsByDefault() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(48, "enableWebPerformanceAPIsByDefault");
|
||||
markFlagAsAccessed(47, "enableWebPerformanceAPIsByDefault");
|
||||
|
||||
flagValue = currentProvider_->enableWebPerformanceAPIsByDefault();
|
||||
enableWebPerformanceAPIsByDefault_ = flagValue;
|
||||
@@ -920,7 +902,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMappingOfEventPrioritiesBetweenFabricAn
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(49, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
|
||||
markFlagAsAccessed(48, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
|
||||
|
||||
flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact();
|
||||
fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue;
|
||||
@@ -938,7 +920,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxEnabledRelease() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(50, "fuseboxEnabledRelease");
|
||||
markFlagAsAccessed(49, "fuseboxEnabledRelease");
|
||||
|
||||
flagValue = currentProvider_->fuseboxEnabledRelease();
|
||||
fuseboxEnabledRelease_ = flagValue;
|
||||
@@ -956,7 +938,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxNetworkInspectionEnabled() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(51, "fuseboxNetworkInspectionEnabled");
|
||||
markFlagAsAccessed(50, "fuseboxNetworkInspectionEnabled");
|
||||
|
||||
flagValue = currentProvider_->fuseboxNetworkInspectionEnabled();
|
||||
fuseboxNetworkInspectionEnabled_ = flagValue;
|
||||
@@ -974,7 +956,7 @@ bool ReactNativeFeatureFlagsAccessor::hideOffscreenVirtualViewsOnIOS() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(52, "hideOffscreenVirtualViewsOnIOS");
|
||||
markFlagAsAccessed(51, "hideOffscreenVirtualViewsOnIOS");
|
||||
|
||||
flagValue = currentProvider_->hideOffscreenVirtualViewsOnIOS();
|
||||
hideOffscreenVirtualViewsOnIOS_ = flagValue;
|
||||
@@ -992,7 +974,7 @@ bool ReactNativeFeatureFlagsAccessor::overrideBySynchronousMountPropsAtMountingA
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(53, "overrideBySynchronousMountPropsAtMountingAndroid");
|
||||
markFlagAsAccessed(52, "overrideBySynchronousMountPropsAtMountingAndroid");
|
||||
|
||||
flagValue = currentProvider_->overrideBySynchronousMountPropsAtMountingAndroid();
|
||||
overrideBySynchronousMountPropsAtMountingAndroid_ = flagValue;
|
||||
@@ -1010,7 +992,7 @@ bool ReactNativeFeatureFlagsAccessor::perfMonitorV2Enabled() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(54, "perfMonitorV2Enabled");
|
||||
markFlagAsAccessed(53, "perfMonitorV2Enabled");
|
||||
|
||||
flagValue = currentProvider_->perfMonitorV2Enabled();
|
||||
perfMonitorV2Enabled_ = flagValue;
|
||||
@@ -1028,7 +1010,7 @@ double ReactNativeFeatureFlagsAccessor::preparedTextCacheSize() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(55, "preparedTextCacheSize");
|
||||
markFlagAsAccessed(54, "preparedTextCacheSize");
|
||||
|
||||
flagValue = currentProvider_->preparedTextCacheSize();
|
||||
preparedTextCacheSize_ = flagValue;
|
||||
@@ -1046,7 +1028,7 @@ bool ReactNativeFeatureFlagsAccessor::preventShadowTreeCommitExhaustion() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(56, "preventShadowTreeCommitExhaustion");
|
||||
markFlagAsAccessed(55, "preventShadowTreeCommitExhaustion");
|
||||
|
||||
flagValue = currentProvider_->preventShadowTreeCommitExhaustion();
|
||||
preventShadowTreeCommitExhaustion_ = flagValue;
|
||||
@@ -1064,7 +1046,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldPressibilityUseW3CPointerEventsForHo
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(57, "shouldPressibilityUseW3CPointerEventsForHover");
|
||||
markFlagAsAccessed(56, "shouldPressibilityUseW3CPointerEventsForHover");
|
||||
|
||||
flagValue = currentProvider_->shouldPressibilityUseW3CPointerEventsForHover();
|
||||
shouldPressibilityUseW3CPointerEventsForHover_ = flagValue;
|
||||
@@ -1082,7 +1064,7 @@ bool ReactNativeFeatureFlagsAccessor::skipActivityIdentityAssertionOnHostPause()
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(58, "skipActivityIdentityAssertionOnHostPause");
|
||||
markFlagAsAccessed(57, "skipActivityIdentityAssertionOnHostPause");
|
||||
|
||||
flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause();
|
||||
skipActivityIdentityAssertionOnHostPause_ = flagValue;
|
||||
@@ -1100,7 +1082,7 @@ bool ReactNativeFeatureFlagsAccessor::sweepActiveTouchOnChildNativeGesturesAndro
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(59, "sweepActiveTouchOnChildNativeGesturesAndroid");
|
||||
markFlagAsAccessed(58, "sweepActiveTouchOnChildNativeGesturesAndroid");
|
||||
|
||||
flagValue = currentProvider_->sweepActiveTouchOnChildNativeGesturesAndroid();
|
||||
sweepActiveTouchOnChildNativeGesturesAndroid_ = flagValue;
|
||||
@@ -1118,7 +1100,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(60, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
markFlagAsAccessed(59, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
|
||||
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
|
||||
@@ -1136,7 +1118,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit(
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(61, "updateRuntimeShadowNodeReferencesOnCommit");
|
||||
markFlagAsAccessed(60, "updateRuntimeShadowNodeReferencesOnCommit");
|
||||
|
||||
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
|
||||
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
|
||||
@@ -1154,7 +1136,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(62, "useAlwaysAvailableJSErrorHandling");
|
||||
markFlagAsAccessed(61, "useAlwaysAvailableJSErrorHandling");
|
||||
|
||||
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
|
||||
useAlwaysAvailableJSErrorHandling_ = flagValue;
|
||||
@@ -1172,7 +1154,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(63, "useFabricInterop");
|
||||
markFlagAsAccessed(62, "useFabricInterop");
|
||||
|
||||
flagValue = currentProvider_->useFabricInterop();
|
||||
useFabricInterop_ = flagValue;
|
||||
@@ -1190,7 +1172,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeEqualsInNativeReadableArrayAndroi
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(64, "useNativeEqualsInNativeReadableArrayAndroid");
|
||||
markFlagAsAccessed(63, "useNativeEqualsInNativeReadableArrayAndroid");
|
||||
|
||||
flagValue = currentProvider_->useNativeEqualsInNativeReadableArrayAndroid();
|
||||
useNativeEqualsInNativeReadableArrayAndroid_ = flagValue;
|
||||
@@ -1208,7 +1190,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeTransformHelperAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(65, "useNativeTransformHelperAndroid");
|
||||
markFlagAsAccessed(64, "useNativeTransformHelperAndroid");
|
||||
|
||||
flagValue = currentProvider_->useNativeTransformHelperAndroid();
|
||||
useNativeTransformHelperAndroid_ = flagValue;
|
||||
@@ -1226,7 +1208,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(66, "useNativeViewConfigsInBridgelessMode");
|
||||
markFlagAsAccessed(65, "useNativeViewConfigsInBridgelessMode");
|
||||
|
||||
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
|
||||
useNativeViewConfigsInBridgelessMode_ = flagValue;
|
||||
@@ -1244,7 +1226,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(67, "useOptimizedEventBatchingOnAndroid");
|
||||
markFlagAsAccessed(66, "useOptimizedEventBatchingOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
|
||||
useOptimizedEventBatchingOnAndroid_ = flagValue;
|
||||
@@ -1262,7 +1244,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(68, "useRawPropsJsiValue");
|
||||
markFlagAsAccessed(67, "useRawPropsJsiValue");
|
||||
|
||||
flagValue = currentProvider_->useRawPropsJsiValue();
|
||||
useRawPropsJsiValue_ = flagValue;
|
||||
@@ -1280,7 +1262,7 @@ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(69, "useShadowNodeStateOnClone");
|
||||
markFlagAsAccessed(68, "useShadowNodeStateOnClone");
|
||||
|
||||
flagValue = currentProvider_->useShadowNodeStateOnClone();
|
||||
useShadowNodeStateOnClone_ = flagValue;
|
||||
@@ -1298,7 +1280,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(70, "useTurboModuleInterop");
|
||||
markFlagAsAccessed(69, "useTurboModuleInterop");
|
||||
|
||||
flagValue = currentProvider_->useTurboModuleInterop();
|
||||
useTurboModuleInterop_ = flagValue;
|
||||
@@ -1316,7 +1298,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(71, "useTurboModules");
|
||||
markFlagAsAccessed(70, "useTurboModules");
|
||||
|
||||
flagValue = currentProvider_->useTurboModules();
|
||||
useTurboModules_ = flagValue;
|
||||
@@ -1334,7 +1316,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewHysteresisRatio() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(72, "virtualViewHysteresisRatio");
|
||||
markFlagAsAccessed(71, "virtualViewHysteresisRatio");
|
||||
|
||||
flagValue = currentProvider_->virtualViewHysteresisRatio();
|
||||
virtualViewHysteresisRatio_ = flagValue;
|
||||
@@ -1352,7 +1334,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(73, "virtualViewPrerenderRatio");
|
||||
markFlagAsAccessed(72, "virtualViewPrerenderRatio");
|
||||
|
||||
flagValue = currentProvider_->virtualViewPrerenderRatio();
|
||||
virtualViewPrerenderRatio_ = flagValue;
|
||||
|
||||
+2
-4
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<53981e017d681009b240ad6b5d09d4d8>>
|
||||
* @generated SignedSource<<6f05211b44f2be076b37ef9178e5ef43>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -59,7 +59,6 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
bool enableImagePrefetchingAndroid();
|
||||
bool enableImagePrefetchingOnUiThreadAndroid();
|
||||
bool enableImmediateUpdateModeForContentOffsetChanges();
|
||||
bool enableImperativeFocus();
|
||||
bool enableInteropViewManagerClassLookUpOptimizationIOS();
|
||||
bool enableLayoutAnimationsOnAndroid();
|
||||
bool enableLayoutAnimationsOnIOS();
|
||||
@@ -117,7 +116,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
||||
bool wasOverridden_;
|
||||
|
||||
std::array<std::atomic<const char*>, 74> accessedFeatureFlags_;
|
||||
std::array<std::atomic<const char*>, 73> accessedFeatureFlags_;
|
||||
|
||||
std::atomic<std::optional<bool>> commonTestFlag_;
|
||||
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
|
||||
@@ -146,7 +145,6 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::atomic<std::optional<bool>> enableImagePrefetchingAndroid_;
|
||||
std::atomic<std::optional<bool>> enableImagePrefetchingOnUiThreadAndroid_;
|
||||
std::atomic<std::optional<bool>> enableImmediateUpdateModeForContentOffsetChanges_;
|
||||
std::atomic<std::optional<bool>> enableImperativeFocus_;
|
||||
std::atomic<std::optional<bool>> enableInteropViewManagerClassLookUpOptimizationIOS_;
|
||||
std::atomic<std::optional<bool>> enableLayoutAnimationsOnAndroid_;
|
||||
std::atomic<std::optional<bool>> enableLayoutAnimationsOnIOS_;
|
||||
|
||||
+1
-5
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<6c1c050029f105d0075fb83ca21aa48b>>
|
||||
* @generated SignedSource<<b6da08857919846dda053b3635fb9702>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -135,10 +135,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool enableImperativeFocus() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool enableInteropViewManagerClassLookUpOptimizationIOS() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
+1
-10
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<0bef63a074aa6b67787c2ca30706a847>>
|
||||
* @generated SignedSource<<737e882a924b2730d0c67cc8dc27c8a7>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -288,15 +288,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
||||
return ReactNativeFeatureFlagsDefaults::enableImmediateUpdateModeForContentOffsetChanges();
|
||||
}
|
||||
|
||||
bool enableImperativeFocus() override {
|
||||
auto value = values_["enableImperativeFocus"];
|
||||
if (!value.isNull()) {
|
||||
return value.getBool();
|
||||
}
|
||||
|
||||
return ReactNativeFeatureFlagsDefaults::enableImperativeFocus();
|
||||
}
|
||||
|
||||
bool enableInteropViewManagerClassLookUpOptimizationIOS() override {
|
||||
auto value = values_["enableInteropViewManagerClassLookUpOptimizationIOS"];
|
||||
if (!value.isNull()) {
|
||||
|
||||
+1
-5
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<c5b1dc86ec11d40e5d26ae8a6f0ee6ff>>
|
||||
* @generated SignedSource<<77870f0db494c7b6932950a1fa475fdc>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -31,10 +31,6 @@ class ReactNativeFeatureFlagsOverridesOSSExperimental : public ReactNativeFeatur
|
||||
return true;
|
||||
}
|
||||
|
||||
bool enableSwiftUIBasedFilters() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool preventShadowTreeCommitExhaustion() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-2
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<40ea902a1d376324f75680d651f3eff6>>
|
||||
* @generated SignedSource<<4045a760f000400d47117728119f0d21>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -52,7 +52,6 @@ class ReactNativeFeatureFlagsProvider {
|
||||
virtual bool enableImagePrefetchingAndroid() = 0;
|
||||
virtual bool enableImagePrefetchingOnUiThreadAndroid() = 0;
|
||||
virtual bool enableImmediateUpdateModeForContentOffsetChanges() = 0;
|
||||
virtual bool enableImperativeFocus() = 0;
|
||||
virtual bool enableInteropViewManagerClassLookUpOptimizationIOS() = 0;
|
||||
virtual bool enableLayoutAnimationsOnAndroid() = 0;
|
||||
virtual bool enableLayoutAnimationsOnIOS() = 0;
|
||||
|
||||
+1
-6
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<c97db1f02897c99b61643cac10067c6d>>
|
||||
* @generated SignedSource<<5042321d7d0da40cc0436ffaeedda168>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -179,11 +179,6 @@ bool NativeReactNativeFeatureFlags::enableImmediateUpdateModeForContentOffsetCha
|
||||
return ReactNativeFeatureFlags::enableImmediateUpdateModeForContentOffsetChanges();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::enableImperativeFocus(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::enableImperativeFocus();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizationIOS(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizationIOS();
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<ae105f2906573a4f8955c086d3441389>>
|
||||
* @generated SignedSource<<b1583692e9e07ae68b946496cb94e3e9>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -90,8 +90,6 @@ class NativeReactNativeFeatureFlags
|
||||
|
||||
bool enableImmediateUpdateModeForContentOffsetChanges(jsi::Runtime& runtime);
|
||||
|
||||
bool enableImperativeFocus(jsi::Runtime& runtime);
|
||||
|
||||
bool enableInteropViewManagerClassLookUpOptimizationIOS(jsi::Runtime& runtime);
|
||||
|
||||
bool enableLayoutAnimationsOnAndroid(jsi::Runtime& runtime);
|
||||
|
||||
-3
@@ -75,9 +75,6 @@ NativePerformanceEntry toNativePerformanceEntry(const PerformanceEntry& entry) {
|
||||
nativeEntry.responseStart = resourceEntry.responseStart;
|
||||
nativeEntry.responseEnd = resourceEntry.responseEnd;
|
||||
nativeEntry.responseStatus = resourceEntry.responseStatus;
|
||||
nativeEntry.contentType = resourceEntry.contentType;
|
||||
nativeEntry.encodedBodySize = resourceEntry.encodedBodySize;
|
||||
nativeEntry.decodedBodySize = resourceEntry.decodedBodySize;
|
||||
}
|
||||
|
||||
return nativeEntry;
|
||||
|
||||
-3
@@ -68,9 +68,6 @@ struct NativePerformanceEntry {
|
||||
std::optional<HighResTimeStamp> responseStart;
|
||||
std::optional<HighResTimeStamp> responseEnd;
|
||||
std::optional<int> responseStatus;
|
||||
std::optional<std::string> contentType;
|
||||
std::optional<int> encodedBodySize;
|
||||
std::optional<int> decodedBodySize;
|
||||
};
|
||||
|
||||
template <>
|
||||
|
||||
@@ -17,7 +17,5 @@ target_compile_options(react_networking PRIVATE -Wpedantic)
|
||||
target_include_directories(react_networking PUBLIC ${REACT_COMMON_DIR})
|
||||
target_link_libraries(react_networking
|
||||
folly_runtime
|
||||
jsinspector_network
|
||||
jsinspector_tracing
|
||||
react_performance_timeline
|
||||
react_timing)
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
#include <jsinspector-modern/network/CdpNetwork.h>
|
||||
#include <jsinspector-modern/network/NetworkHandler.h>
|
||||
#include <jsinspector-modern/tracing/PerformanceTracer.h>
|
||||
#endif
|
||||
#include <jsinspector-modern/network/HttpUtils.h>
|
||||
#include <jsinspector-modern/network/NetworkHandler.h>
|
||||
#endif
|
||||
#include <react/featureflags/ReactNativeFeatureFlags.h>
|
||||
#include <react/performance/timeline/PerformanceEntryReporter.h>
|
||||
|
||||
@@ -36,30 +35,31 @@ void NetworkReporter::reportRequestStart(
|
||||
const RequestInfo& requestInfo,
|
||||
int encodedDataLength,
|
||||
const std::optional<ResponseInfo>& redirectResponse) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
|
||||
// All builds: Annotate PerformanceResourceTiming metadata
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
||||
perfTimingsBuffer_.emplace(
|
||||
requestId,
|
||||
ResourceTimingData{
|
||||
.url = requestInfo.url,
|
||||
.fetchStart = now,
|
||||
.requestStart = now,
|
||||
});
|
||||
// All builds: Annotate PerformanceResourceTiming metadata
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
||||
perfTimingsBuffer_.emplace(
|
||||
requestId,
|
||||
ResourceTimingData{
|
||||
.url = requestInfo.url,
|
||||
.requestMethod = requestInfo.httpMethod,
|
||||
.fetchStart = now,
|
||||
.requestStart = now,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
auto headers = requestInfo.headers.value_or(Headers{});
|
||||
|
||||
// Debugger enabled: CDP event handling
|
||||
// Debug build: CDP event handling
|
||||
jsinspector_modern::NetworkHandler::getInstance().onRequestWillBeSent(
|
||||
requestId,
|
||||
{
|
||||
.url = requestInfo.url,
|
||||
.method = requestInfo.httpMethod,
|
||||
.headers = headers,
|
||||
.headers = requestInfo.headers,
|
||||
.postData = requestInfo.httpBody,
|
||||
},
|
||||
redirectResponse.has_value()
|
||||
@@ -67,34 +67,30 @@ void NetworkReporter::reportRequestStart(
|
||||
jsinspector_modern::cdp::network::Response::fromInputParams(
|
||||
redirectResponse->url,
|
||||
redirectResponse->statusCode,
|
||||
redirectResponse->headers.value_or(Headers{}),
|
||||
redirectResponse->headers,
|
||||
encodedDataLength))
|
||||
: std::nullopt);
|
||||
|
||||
// Debugger enabled: Add trace events to Performance timeline
|
||||
auto& performanceTracer =
|
||||
jsinspector_modern::tracing::PerformanceTracer::getInstance();
|
||||
performanceTracer.reportResourceSendRequest(
|
||||
requestId, now, requestInfo.url, requestInfo.httpMethod, headers);
|
||||
#endif
|
||||
}
|
||||
|
||||
void NetworkReporter::reportConnectionTiming(
|
||||
const std::string& requestId,
|
||||
const std::optional<Headers>& headers) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
|
||||
// All builds: Annotate PerformanceResourceTiming metadata
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
||||
auto it = perfTimingsBuffer_.find(requestId);
|
||||
if (it != perfTimingsBuffer_.end()) {
|
||||
it->second.connectStart = now;
|
||||
// All builds: Annotate PerformanceResourceTiming metadata
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
||||
auto it = perfTimingsBuffer_.find(requestId);
|
||||
if (it != perfTimingsBuffer_.end()) {
|
||||
it->second.connectStart = now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
// Debugger enabled: CDP event handling
|
||||
// Debug build: CDP event handling
|
||||
jsinspector_modern::NetworkHandler::getInstance()
|
||||
.onRequestWillBeSentExtraInfo(requestId, headers.value_or(Headers{}));
|
||||
#endif
|
||||
@@ -104,63 +100,37 @@ void NetworkReporter::reportResponseStart(
|
||||
const std::string& requestId,
|
||||
const ResponseInfo& responseInfo,
|
||||
int encodedDataLength) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
auto headers = responseInfo.headers.value_or(Headers{});
|
||||
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
|
||||
// All builds: Annotate PerformanceResourceTiming metadata
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
||||
auto it = perfTimingsBuffer_.find(requestId);
|
||||
if (it != perfTimingsBuffer_.end()) {
|
||||
auto contentType = jsinspector_modern::mimeTypeFromHeaders(headers);
|
||||
it->second.connectEnd = now;
|
||||
it->second.responseStart = now;
|
||||
it->second.responseStatus = responseInfo.statusCode;
|
||||
it->second.contentType = contentType;
|
||||
it->second.encodedBodySize = encodedDataLength;
|
||||
it->second.decodedBodySize = encodedDataLength;
|
||||
// All builds: Annotate PerformanceResourceTiming metadata
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
||||
auto it = perfTimingsBuffer_.find(requestId);
|
||||
if (it != perfTimingsBuffer_.end()) {
|
||||
it->second.connectEnd = now;
|
||||
it->second.responseStart = now;
|
||||
it->second.responseStatus = responseInfo.statusCode;
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
// Debug build: Compute additional fields to send in CDP trace events
|
||||
it->second.resourceType =
|
||||
jsinspector_modern::cdp::network::resourceTypeFromMimeType(
|
||||
jsinspector_modern::mimeTypeFromHeaders(
|
||||
responseInfo.headers.value_or(Headers{})));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
// Debugger enabled: CDP event handling
|
||||
// Debug build: CDP event handling
|
||||
jsinspector_modern::NetworkHandler::getInstance().onResponseReceived(
|
||||
requestId,
|
||||
jsinspector_modern::cdp::network::Response::fromInputParams(
|
||||
responseInfo.url,
|
||||
responseInfo.statusCode,
|
||||
headers,
|
||||
responseInfo.headers,
|
||||
encodedDataLength));
|
||||
|
||||
// Debugger enabled: Add trace event to Performance timeline
|
||||
{
|
||||
folly::dynamic timingData = folly::dynamic::object();
|
||||
|
||||
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
||||
auto it = perfTimingsBuffer_.find(requestId);
|
||||
if (it != perfTimingsBuffer_.end()) {
|
||||
// TODO(T238364329): All relative values in timingData should be based on
|
||||
// fetchStart, once implemented.
|
||||
auto requestStart = it->second.requestStart;
|
||||
timingData["requestTime"] = requestStart.toDOMHighResTimeStamp() / 1000;
|
||||
timingData["sendStart"] = 0;
|
||||
timingData["sendEnd"] =
|
||||
(*it->second.connectStart - requestStart).toDOMHighResTimeStamp();
|
||||
timingData["receiveHeadersStart"] =
|
||||
(*it->second.connectStart - requestStart).toDOMHighResTimeStamp();
|
||||
timingData["receiveHeadersEnd"] =
|
||||
(now - requestStart).toDOMHighResTimeStamp();
|
||||
}
|
||||
|
||||
jsinspector_modern::tracing::PerformanceTracer::getInstance()
|
||||
.reportResourceReceiveResponse(
|
||||
requestId,
|
||||
now,
|
||||
responseInfo.statusCode,
|
||||
headers,
|
||||
encodedDataLength,
|
||||
std::move(timingData));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -169,7 +139,7 @@ void NetworkReporter::reportDataReceived(
|
||||
int dataLength,
|
||||
const std::optional<int>& encodedDataLength) {
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
// Debugger enabled: CDP event handling
|
||||
// Debug build: CDP event handling
|
||||
jsinspector_modern::NetworkHandler::getInstance().onDataReceived(
|
||||
requestId, dataLength, encodedDataLength.value_or(dataLength));
|
||||
#endif
|
||||
@@ -178,9 +148,9 @@ void NetworkReporter::reportDataReceived(
|
||||
void NetworkReporter::reportResponseEnd(
|
||||
const std::string& requestId,
|
||||
int encodedDataLength) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
|
||||
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
|
||||
// All builds: Report PerformanceResourceTiming event
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
||||
@@ -196,34 +166,18 @@ void NetworkReporter::reportResponseEnd(
|
||||
eventData.responseStart.value_or(now),
|
||||
now,
|
||||
eventData.responseStatus,
|
||||
eventData.contentType,
|
||||
eventData.encodedBodySize,
|
||||
eventData.decodedBodySize);
|
||||
requestId,
|
||||
eventData.requestMethod,
|
||||
eventData.resourceType);
|
||||
perfTimingsBuffer_.erase(requestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
// Debugger enabled: CDP event handling
|
||||
// Debug build: CDP event handling
|
||||
jsinspector_modern::NetworkHandler::getInstance().onLoadingFinished(
|
||||
requestId, encodedDataLength);
|
||||
|
||||
// Debugger enabled: Add trace event to Performance timeline
|
||||
{
|
||||
int decodedBodyLength = 0;
|
||||
|
||||
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
||||
auto it = perfTimingsBuffer_.find(requestId);
|
||||
if (it != perfTimingsBuffer_.end() &&
|
||||
it->second.contentType.starts_with("image/")) {
|
||||
decodedBodyLength = it->second.decodedBodySize;
|
||||
}
|
||||
|
||||
jsinspector_modern::tracing::PerformanceTracer::getInstance()
|
||||
.reportResourceFinish(
|
||||
requestId, now, encodedDataLength, decodedBodyLength);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -231,7 +185,7 @@ void NetworkReporter::reportRequestFailed(
|
||||
const std::string& requestId,
|
||||
bool cancelled) const {
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
// Debugger enabled: CDP event handling
|
||||
// Debug build: CDP event handling
|
||||
jsinspector_modern::NetworkHandler::getInstance().onLoadingFailed(
|
||||
requestId, cancelled);
|
||||
#endif
|
||||
@@ -242,7 +196,7 @@ void NetworkReporter::storeResponseBody(
|
||||
std::string_view body,
|
||||
bool base64Encoded) {
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
// Debugger enabled: Store fetched response body for later CDP retrieval
|
||||
// Debug build: Store fetched response body for later CDP retrieval
|
||||
jsinspector_modern::NetworkHandler::getInstance().storeResponseBody(
|
||||
requestId, body, base64Encoded);
|
||||
#endif
|
||||
|
||||
@@ -28,15 +28,14 @@ namespace facebook::react {
|
||||
*/
|
||||
struct ResourceTimingData {
|
||||
std::string url;
|
||||
std::string requestMethod;
|
||||
std::optional<std::string> resourceType;
|
||||
HighResTimeStamp fetchStart;
|
||||
HighResTimeStamp requestStart;
|
||||
std::optional<HighResTimeStamp> connectStart;
|
||||
std::optional<HighResTimeStamp> connectEnd;
|
||||
std::optional<HighResTimeStamp> responseStart;
|
||||
int responseStatus = 0;
|
||||
std::string contentType;
|
||||
int encodedBodySize = 0;
|
||||
int decodedBodySize = 0;
|
||||
std::optional<int> responseStatus;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -57,8 +56,7 @@ class NetworkReporter {
|
||||
/**
|
||||
* Report a network request that is about to be sent.
|
||||
*
|
||||
* - Corresponds to `Network.requestWillBeSent` and the
|
||||
* "ResourceWillSendRequest" trace event in CDP.
|
||||
* - Corresponds to `Network.requestWillBeSent` in CDP.
|
||||
* - Corresponds to `PerformanceResourceTiming.requestStart` (specifically,
|
||||
* marking when the native request was initiated).
|
||||
*
|
||||
@@ -74,8 +72,7 @@ class NetworkReporter {
|
||||
* Report timestamp for sending the network request, and (in a debug build)
|
||||
* provide final headers to be reported via CDP.
|
||||
*
|
||||
* - Corresponds to `Network.requestWillBeSentExtraInfo` and the
|
||||
* "ResourceSendRequest" trace event in CDP.
|
||||
* - Corresponds to `Network.requestWillBeSentExtraInfo` in CDP.
|
||||
* - Corresponds to `PerformanceResourceTiming.domainLookupStart`,
|
||||
* `PerformanceResourceTiming.connectStart`. Defined as "immediately before
|
||||
* the browser starts to establish the connection to the server".
|
||||
@@ -90,8 +87,7 @@ class NetworkReporter {
|
||||
* Report when HTTP response headers have been received, corresponding to
|
||||
* when the first byte of the response is available.
|
||||
*
|
||||
* - Corresponds to `Network.responseReceived` and the
|
||||
* "ResourceReceiveResponse" trace event in CDP.
|
||||
* - Corresponds to `Network.responseReceived` in CDP.
|
||||
* - Corresponds to `PerformanceResourceTiming.responseStart`.
|
||||
*
|
||||
* https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-responsestart
|
||||
@@ -116,8 +112,7 @@ class NetworkReporter {
|
||||
* Report when a network request is complete and we are no longer receiving
|
||||
* response data.
|
||||
*
|
||||
* - Corresponds to `Network.loadingFinished` and the "ResourceFinish" trace
|
||||
* event in CDP.
|
||||
* - Corresponds to `Network.loadingFinished` in CDP.
|
||||
* - Corresponds to `PerformanceResourceTiming.responseEnd`.
|
||||
*
|
||||
* https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-responseend
|
||||
|
||||
@@ -43,7 +43,6 @@ Pod::Spec.new do |s|
|
||||
end
|
||||
add_dependency(s, "React-featureflags")
|
||||
add_dependency(s, "React-jsinspectornetwork", :framework_name => 'jsinspector_modernnetwork')
|
||||
add_dependency(s, "React-jsinspectortracing", :framework_name => 'jsinspector_moderntracing')
|
||||
s.dependency "React-performancetimeline"
|
||||
s.dependency "React-timing"
|
||||
|
||||
|
||||
@@ -69,10 +69,7 @@ struct PerformanceResourceTiming : AbstractPerformanceEntry {
|
||||
std::optional<HighResTimeStamp> responseStart;
|
||||
/** Aligns with `duration`. */
|
||||
std::optional<HighResTimeStamp> responseEnd;
|
||||
int responseStatus;
|
||||
std::string contentType;
|
||||
int encodedBodySize;
|
||||
int decodedBodySize;
|
||||
std::optional<int> responseStatus;
|
||||
};
|
||||
|
||||
using PerformanceEntry = std::variant<
|
||||
|
||||
+33
-7
@@ -307,10 +307,10 @@ void PerformanceEntryReporter::reportResourceTiming(
|
||||
std::optional<HighResTimeStamp> connectEnd,
|
||||
HighResTimeStamp responseStart,
|
||||
HighResTimeStamp responseEnd,
|
||||
int responseStatus,
|
||||
const std::string& contentType,
|
||||
int encodedBodySize,
|
||||
int decodedBodySize) {
|
||||
const std::optional<int>& responseStatus,
|
||||
const std::optional<std::string>& devtoolsRequestId,
|
||||
const std::optional<std::string>& requestMethod,
|
||||
const std::optional<std::string>& resourceType) {
|
||||
const auto entry = PerformanceResourceTiming{
|
||||
{.name = url, .startTime = fetchStart},
|
||||
fetchStart,
|
||||
@@ -320,11 +320,10 @@ void PerformanceEntryReporter::reportResourceTiming(
|
||||
responseStart,
|
||||
responseEnd,
|
||||
responseStatus,
|
||||
contentType,
|
||||
encodedBodySize,
|
||||
decodedBodySize,
|
||||
};
|
||||
|
||||
traceResourceTiming(entry, devtoolsRequestId, requestMethod, resourceType);
|
||||
|
||||
// Add to buffers & notify observers
|
||||
{
|
||||
std::unique_lock lock(buffersMutex_);
|
||||
@@ -376,4 +375,31 @@ void PerformanceEntryReporter::traceMeasure(
|
||||
}
|
||||
}
|
||||
|
||||
void PerformanceEntryReporter::traceResourceTiming(
|
||||
const PerformanceResourceTiming& entry,
|
||||
const std::optional<std::string>& devtoolsRequestId,
|
||||
const std::optional<std::string>& requestMethod,
|
||||
const std::optional<std::string>& resourceType) const {
|
||||
if (!entry.responseStart.has_value() || !entry.responseEnd.has_value() ||
|
||||
!entry.responseStatus.has_value() || !devtoolsRequestId.has_value() ||
|
||||
!requestMethod.has_value() || !resourceType.has_value()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto& performanceTracer =
|
||||
jsinspector_modern::tracing::PerformanceTracer::getInstance();
|
||||
|
||||
if (performanceTracer.isTracing()) {
|
||||
performanceTracer.reportResourceTiming(
|
||||
*devtoolsRequestId,
|
||||
entry.name,
|
||||
entry.fetchStart,
|
||||
*entry.responseStart,
|
||||
*entry.responseEnd,
|
||||
*entry.responseStatus,
|
||||
*requestMethod,
|
||||
*resourceType);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
+4
-4
@@ -118,10 +118,10 @@ class PerformanceEntryReporter {
|
||||
std::optional<HighResTimeStamp> connectEnd,
|
||||
HighResTimeStamp responseStart,
|
||||
HighResTimeStamp responseEnd,
|
||||
int responseStatus,
|
||||
const std::string& contentType,
|
||||
int encodedBodySize,
|
||||
int decodedBodySize);
|
||||
const std::optional<int>& responseStatus,
|
||||
const std::optional<std::string>& devtoolsRequestId,
|
||||
const std::optional<std::string>& requestMethod,
|
||||
const std::optional<std::string>& resourceType);
|
||||
|
||||
private:
|
||||
std::unique_ptr<PerformanceObserverRegistry> observerRegistry_;
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
// NOLINTNEXTLINE(modernize-avoid-c-arrays)
|
||||
extern const char RawTextComponentName[] = "RawText";
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
-9
@@ -112,13 +112,4 @@ void BaseViewEventEmitter::onLayout(const LayoutMetrics& layoutMetrics) const {
|
||||
});
|
||||
}
|
||||
|
||||
#pragma mark - Focus
|
||||
void BaseViewEventEmitter::onFocus() const {
|
||||
dispatchEvent("focus");
|
||||
}
|
||||
|
||||
void BaseViewEventEmitter::onBlur() const {
|
||||
dispatchEvent("blur");
|
||||
}
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
-4
@@ -32,10 +32,6 @@ class BaseViewEventEmitter : public TouchEventEmitter {
|
||||
|
||||
void onLayout(const LayoutMetrics& layoutMetrics) const;
|
||||
|
||||
#pragma mark - Focus
|
||||
void onFocus() const;
|
||||
void onBlur() const;
|
||||
|
||||
private:
|
||||
/*
|
||||
* Contains the most recent `frame` and a `mutex` protecting access to it.
|
||||
|
||||
@@ -19,8 +19,7 @@ namespace facebook::react {
|
||||
*/
|
||||
template <size_t N>
|
||||
struct TemplateStringLiteral {
|
||||
/* implicit */ constexpr TemplateStringLiteral(
|
||||
const char (&str)[N]) { // NOLINT(modernize-avoid-c-arrays)
|
||||
/* implicit */ constexpr TemplateStringLiteral(const char (&str)[N]) {
|
||||
std::copy_n(str, N, value.data());
|
||||
}
|
||||
|
||||
|
||||
+69
-23
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<575e58047a8edf6bbc016768775a258f>>
|
||||
* @generated SignedSource<<4ccde3daef50fa7522f10bc7146c0cc6>>
|
||||
*
|
||||
* This file was generated by scripts/js-api/build-types/index.js.
|
||||
*/
|
||||
@@ -77,6 +77,7 @@ declare const $$AnimatedView: AnimatedComponentType<
|
||||
React.ComponentRef<typeof View>
|
||||
>
|
||||
declare const $$flattenStyle: typeof flattenStyle_default
|
||||
declare const $$ImageViewNativeComponent: typeof ImageViewNativeComponent_default
|
||||
declare const $$index: {
|
||||
keyExtractor: typeof keyExtractor
|
||||
get FillRateHelper(): FillRateHelperT
|
||||
@@ -91,6 +92,7 @@ declare const $$ProgressBarAndroidNativeComponent: HostComponent<AndroidProgress
|
||||
declare const $$ScrollViewContext: typeof ScrollViewContext_default
|
||||
declare const $$ScrollViewNativeComponent: typeof ScrollViewNativeComponent_default
|
||||
declare const $$SwitchNativeComponent: ComponentType
|
||||
declare const $$TextInlineImageNativeComponent: typeof TextInlineImage_default
|
||||
declare const $$ViewNativeComponent: typeof ViewNativeComponent_default
|
||||
declare const absoluteFill: AbsoluteFillStyle
|
||||
declare const absoluteFillObject: AbsoluteFillStyle
|
||||
@@ -252,6 +254,7 @@ declare const I18nManager: {
|
||||
swapLeftAndRightInRTL: (flipStyles: boolean) => void
|
||||
}
|
||||
declare const Image: ImageType
|
||||
declare const ImageViewNativeComponent_default: HostComponent<ImageHostComponentProps>
|
||||
declare const InputAccessoryView: typeof InputAccessoryView_default
|
||||
declare const InputAccessoryView_default: React.ComponentType<InputAccessoryViewProps>
|
||||
declare const InteractionManager: typeof InteractionManagerStub_default
|
||||
@@ -462,6 +465,7 @@ declare const TextImpl_default: (
|
||||
ref?: React.Ref<TextForwardRef>
|
||||
},
|
||||
) => React.ReactNode
|
||||
declare const TextInlineImage_default: HostComponent<RCTTextInlineImageNativeProps>
|
||||
declare const TextInput: TextInputType
|
||||
declare const timing: typeof $$AnimatedImplementation.timing
|
||||
declare const timingImpl: (
|
||||
@@ -569,7 +573,7 @@ declare const VirtualizedSectionListComponent_default: <
|
||||
> = DefaultVirtualizedSectionT,
|
||||
>(
|
||||
props: Omit<VirtualizedSectionListProps<ItemT, SectionT>, "ref"> & {
|
||||
ref?: React.Ref<{
|
||||
ref: React.Ref<{
|
||||
getListRef(): undefined | VirtualizedList_default
|
||||
scrollToLocation(params: ScrollToLocationParamsType): void
|
||||
}>
|
||||
@@ -1009,6 +1013,7 @@ declare type $$AnimatedSectionList = typeof $$AnimatedSectionList
|
||||
declare type $$AnimatedText = typeof $$AnimatedText
|
||||
declare type $$AnimatedView = typeof $$AnimatedView
|
||||
declare type $$flattenStyle = typeof $$flattenStyle
|
||||
declare type $$ImageViewNativeComponent = typeof $$ImageViewNativeComponent
|
||||
declare type $$index = typeof $$index
|
||||
declare type $$NativeDeviceInfo = typeof $$NativeDeviceInfo
|
||||
declare type $$NativeDialogManagerAndroid = typeof $$NativeDialogManagerAndroid
|
||||
@@ -1017,6 +1022,8 @@ declare type $$ProgressBarAndroidNativeComponent =
|
||||
declare type $$ScrollViewContext = typeof $$ScrollViewContext
|
||||
declare type $$ScrollViewNativeComponent = typeof $$ScrollViewNativeComponent
|
||||
declare type $$SwitchNativeComponent = typeof $$SwitchNativeComponent
|
||||
declare type $$TextInlineImageNativeComponent =
|
||||
typeof $$TextInlineImageNativeComponent
|
||||
declare type $$ViewNativeComponent = typeof $$ViewNativeComponent
|
||||
declare type absoluteFill = typeof absoluteFill
|
||||
declare type absoluteFillObject = typeof absoluteFillObject
|
||||
@@ -1029,12 +1036,15 @@ declare type AbsoluteFillStyle = {
|
||||
}
|
||||
declare type AbstractImageAndroid = (
|
||||
props: ImageProps & {
|
||||
ref?: React.Ref<HostInstance>
|
||||
ref?: React.Ref<
|
||||
| React.ComponentRef<ImageViewNativeComponent>
|
||||
| React.ComponentRef<TextInlineImageNativeComponent>
|
||||
>
|
||||
},
|
||||
) => React.ReactNode
|
||||
declare type AbstractImageIOS = (
|
||||
props: ImageProps & {
|
||||
ref?: React.Ref<HostInstance>
|
||||
ref?: React.Ref<React.ComponentRef<ImageViewNativeComponent>>
|
||||
},
|
||||
) => React.ReactNode
|
||||
declare type AccessibilityActionEvent = NativeSyntheticEvent<{
|
||||
@@ -1494,15 +1504,11 @@ declare class AnimatedNode_default {
|
||||
declare type AnimatedNodeConfig = {
|
||||
readonly debugID?: string
|
||||
}
|
||||
declare type AnimatedProps<Props extends {}> = LooseOmit<
|
||||
{
|
||||
[K in keyof Props]: K extends NonAnimatedProps
|
||||
? Props[K]
|
||||
: WithAnimatedValue<Props[K]>
|
||||
},
|
||||
"ref"
|
||||
> &
|
||||
PassThroughProps
|
||||
declare type AnimatedProps<Props extends {}> = {
|
||||
[K in keyof Props]: K extends NonAnimatedProps
|
||||
? Props[K]
|
||||
: WithAnimatedValue<Props[K]>
|
||||
} & PassThroughProps
|
||||
declare type AnimatedScrollViewInstance = React.ComponentRef<typeof ScrollView>
|
||||
declare class AnimatedSubtraction_default extends AnimatedWithChildren_default {
|
||||
constructor(
|
||||
@@ -1893,7 +1899,7 @@ declare type ContentAvailable = 1 | null | void
|
||||
declare type Context = {
|
||||
readonly cellKey: string | undefined
|
||||
readonly horizontal: boolean | undefined
|
||||
readonly getOutermostParentListRef: () => VirtualizedList_default
|
||||
readonly getOutermostParentListRef: () => React.ComponentRef<VirtualizedListT_2>
|
||||
readonly getScrollMetrics: () => {
|
||||
contentLength: number
|
||||
dOffset: number
|
||||
@@ -1906,10 +1912,10 @@ declare type Context = {
|
||||
}
|
||||
readonly registerAsNestedChild: ($$PARAM_0$$: {
|
||||
cellKey: string
|
||||
ref: VirtualizedList_default
|
||||
ref: React.ComponentRef<VirtualizedListT_2>
|
||||
}) => void
|
||||
readonly unregisterAsNestedChild: ($$PARAM_0$$: {
|
||||
ref: VirtualizedList_default
|
||||
ref: React.ComponentRef<VirtualizedListT_2>
|
||||
}) => void
|
||||
}
|
||||
declare function counterEvent(eventName: EventName, value: number): void
|
||||
@@ -1934,6 +1940,7 @@ declare function createPublicTextInstance(
|
||||
): ReadOnlyText_default
|
||||
declare type createPublicTextInstanceT = typeof createPublicTextInstance
|
||||
declare type CursorValue = "auto" | "pointer"
|
||||
declare type DangerouslyImpreciseStyle = ____DangerouslyImpreciseStyle_Internal
|
||||
declare type DataDetectorTypesType =
|
||||
| "address"
|
||||
| "all"
|
||||
@@ -2587,6 +2594,30 @@ declare type ImageErrorEvent = NativeSyntheticEvent<
|
||||
declare type ImageErrorEventData = {
|
||||
error: string
|
||||
}
|
||||
declare type ImageHostComponentProps = Readonly<
|
||||
ImageProps &
|
||||
Omit<ViewProps, "style"> & {
|
||||
defaultSource?: (ImageSource | undefined) | (string | undefined)
|
||||
headers?: {
|
||||
[$$Key$$: string]: string
|
||||
}
|
||||
loadingIndicatorSrc?: string
|
||||
shouldNotifyLoadEvents?: boolean
|
||||
src?:
|
||||
| (
|
||||
| ReadonlyArray<
|
||||
| undefined
|
||||
| {
|
||||
readonly uri?: string
|
||||
}
|
||||
>
|
||||
| undefined
|
||||
)
|
||||
| (ResolvedAssetSource | undefined)
|
||||
style?: DangerouslyImpreciseStyle | ImageStyleProp
|
||||
tintColor?: ColorValue
|
||||
}
|
||||
>
|
||||
declare type ImageIOS = AbstractImageIOS & ImageComponentStaticsIOS
|
||||
declare type ImageLoadEvent = NativeSyntheticEvent<Readonly<ImageLoadEventData>>
|
||||
declare type ImageLoadEventData = {
|
||||
@@ -2701,6 +2732,7 @@ declare interface ImageURISource {
|
||||
readonly uri?: string
|
||||
readonly width?: number
|
||||
}
|
||||
declare type ImageViewNativeComponent = typeof $$ImageViewNativeComponent
|
||||
declare type IndeterminateProgressBarAndroidStyleAttrProp = {
|
||||
indeterminate: true
|
||||
styleAttr:
|
||||
@@ -3079,10 +3111,6 @@ declare type LoopAnimationConfig = {
|
||||
iterations: number
|
||||
resetBeforeIteration?: boolean
|
||||
}
|
||||
declare type LooseOmit<O extends {}, K extends keyof any> = Pick<
|
||||
O,
|
||||
Exclude<keyof O, K>
|
||||
>
|
||||
declare type MacOSPlatform = {
|
||||
OS: "macos"
|
||||
select: <T>(spec: PlatformSelectSpec<T>) => T
|
||||
@@ -3943,6 +3971,21 @@ declare type RCTNetworkingEventDefinitions = {
|
||||
]
|
||||
readonly didSendNetworkData: [[number, number, number]]
|
||||
}
|
||||
declare type RCTTextInlineImageNativeProps = Readonly<
|
||||
ViewProps & {
|
||||
headers?: {
|
||||
[$$Key$$: string]: string
|
||||
}
|
||||
resizeMode?: ImageResizeMode
|
||||
src?: ReadonlyArray<
|
||||
| undefined
|
||||
| {
|
||||
readonly uri?: string
|
||||
}
|
||||
>
|
||||
tintColor?: ColorValue
|
||||
}
|
||||
>
|
||||
declare class ReactNativeDocument_default extends ReadOnlyNode_default {
|
||||
get childElementCount(): number
|
||||
get children(): HTMLCollection_default<ReadOnlyElement_default>
|
||||
@@ -5118,6 +5161,8 @@ declare type TextContentType =
|
||||
declare type TextForwardRef = React.ComponentRef<
|
||||
typeof NativeText | typeof NativeVirtualText
|
||||
>
|
||||
declare type TextInlineImageNativeComponent =
|
||||
typeof $$TextInlineImageNativeComponent
|
||||
declare type TextInput = typeof TextInput
|
||||
declare type TextInputAndroidProps = {
|
||||
readonly cursorColor?: ColorValue
|
||||
@@ -5811,6 +5856,7 @@ declare type VirtualizedListProps = ScrollViewProps &
|
||||
RequiredVirtualizedListProps &
|
||||
OptionalVirtualizedListProps
|
||||
declare type VirtualizedListT = typeof VirtualizedList_default
|
||||
declare type VirtualizedListT_2 = typeof VirtualizedList_default
|
||||
declare type VirtualizedListType = typeof $$index.VirtualizedList
|
||||
declare type VirtualizedSectionList = typeof VirtualizedSectionList
|
||||
declare type VirtualizedSectionListProps<
|
||||
@@ -5921,7 +5967,7 @@ export {
|
||||
AlertOptions, // a0cdac0f
|
||||
AlertType, // 5ab91217
|
||||
AndroidKeyboardEvent, // e03becc8
|
||||
Animated, // 6b6a0b2e
|
||||
Animated, // 6ad7a14c
|
||||
AppConfig, // ebddad4b
|
||||
AppRegistry, // 6cdee1d6
|
||||
AppState, // f7097b1b
|
||||
@@ -5980,8 +6026,8 @@ export {
|
||||
IOSKeyboardEvent, // e67bfe3a
|
||||
IgnorePattern, // ec6f6ece
|
||||
Image, // 04474205
|
||||
ImageBackground, // 489b1c17
|
||||
ImageBackgroundProps, // 1b209e36
|
||||
ImageBackground, // e74abb26
|
||||
ImageBackgroundProps, // cadc2fba
|
||||
ImageErrorEvent, // b7b2ae63
|
||||
ImageLoadEvent, // 5baae813
|
||||
ImageProgressEventIOS, // adb35052
|
||||
|
||||
Vendored
-6
@@ -230,12 +230,6 @@ module.exports = {
|
||||
* @deprecated
|
||||
*/
|
||||
get InteractionManager() {
|
||||
warnOnce(
|
||||
'interaction-manager-deprecated',
|
||||
'InteractionManager has been deprecated and will be removed in a ' +
|
||||
'future release. Please refactor long tasks into smaller ones, and ' +
|
||||
" use 'requestIdleCallback' instead.",
|
||||
);
|
||||
return require('./Libraries/Interaction/InteractionManager').default;
|
||||
},
|
||||
get Keyboard() {
|
||||
|
||||
+1
-2
@@ -28,8 +28,7 @@ export default function mockComponent<
|
||||
instanceMethods: ?interface {},
|
||||
isESModule: TIsESModule,
|
||||
): TIsESModule extends true
|
||||
? // $FlowFixMe[incompatible-use]
|
||||
ModuleDefault<TComponentModule & typeof instanceMethods>
|
||||
? ModuleDefault<TComponentModule & typeof instanceMethods>
|
||||
: TComponentModule & typeof instanceMethods {
|
||||
const RealComponent: TComponentType = isESModule
|
||||
? // $FlowFixMe[prop-missing]
|
||||
|
||||
@@ -336,17 +336,6 @@ const definitions: FeatureFlagDefinitions = {
|
||||
},
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
enableImperativeFocus: {
|
||||
defaultValue: false,
|
||||
metadata: {
|
||||
dateAdded: '2024-09-13',
|
||||
description:
|
||||
'Enable ref.focus() and ref.blur() for all views, not just TextInput.',
|
||||
expectedReleaseValue: true,
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
enableInteropViewManagerClassLookUpOptimizationIOS: {
|
||||
defaultValue: false,
|
||||
metadata: {
|
||||
@@ -460,7 +449,7 @@ const definitions: FeatureFlagDefinitions = {
|
||||
expectedReleaseValue: true,
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
ossReleaseStage: 'experimental',
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
enableViewCulling: {
|
||||
defaultValue: false,
|
||||
|
||||
@@ -80,7 +80,7 @@ Pod::Spec.new do |spec|
|
||||
)
|
||||
|
||||
spec.user_target_xcconfig = {
|
||||
'HERMES_CLI_PATH' => "#{hermes_compiler_path}/hermesc/osx-bin/hermesc"
|
||||
'HERMES_CLI_PATH' => "#{hermes_compiler_path}/osx-bin/hermesc"
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -228,8 +228,8 @@ def release_tarball_url(version, build_type)
|
||||
if hermes_v1_enabled()
|
||||
namespace = "com/facebook/hermes"
|
||||
# Sample url from Maven:
|
||||
# https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/0.14.0/hermes-ios-0.14.0-hermes-ios-debug.tar.gz
|
||||
return "#{maven_repo_url}/#{namespace}/hermes-ios/#{version}/hermes-ios-#{version}-hermes-ios-#{build_type.to_s}.tar.gz"
|
||||
# https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/0.14.0/hermes-ios-0.14.0-debug.tar.gz
|
||||
return "#{maven_repo_url}/#{namespace}/hermes-ios/#{version}/hermes-ios-#{version}-#{build_type.to_s}.tar.gz"
|
||||
else
|
||||
namespace = "com/facebook/react"
|
||||
# Sample url from Maven:
|
||||
|
||||
@@ -38,26 +38,3 @@ project(":packages:react-native:ReactAndroid:hermes-engine").projectDir =
|
||||
project(":packages").projectDir = file("/tmp")
|
||||
|
||||
project(":packages:react-native").projectDir = file("/tmp")
|
||||
|
||||
// Gradle properties defined in `gradle.properties` are not inherited by
|
||||
// included builds, see https://github.com/gradle/gradle/issues/2534.
|
||||
// This is a workaround to read the configuration from the consuming project,
|
||||
// and apply relevant properties to the :react-native project.
|
||||
buildscript {
|
||||
val properties = java.util.Properties()
|
||||
val propertiesToInherit = listOf("hermesV1Enabled", "react.hermesV1Enabled")
|
||||
|
||||
try {
|
||||
file("../../android/gradle.properties").inputStream().use { properties.load(it) }
|
||||
|
||||
gradle.rootProject {
|
||||
propertiesToInherit.forEach { property ->
|
||||
if (properties.containsKey(property)) {
|
||||
gradle.rootProject.extra.set(property, properties.getProperty(property))
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
// fail silently
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<e460eec2e7fe00ccc67bfef14f07b8c5>>
|
||||
* @generated SignedSource<<054add14ea0c9a96d3c3e32af8995437>>
|
||||
* @flow strict
|
||||
* @noformat
|
||||
*/
|
||||
@@ -77,7 +77,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
||||
enableImagePrefetchingAndroid: Getter<boolean>,
|
||||
enableImagePrefetchingOnUiThreadAndroid: Getter<boolean>,
|
||||
enableImmediateUpdateModeForContentOffsetChanges: Getter<boolean>,
|
||||
enableImperativeFocus: Getter<boolean>,
|
||||
enableInteropViewManagerClassLookUpOptimizationIOS: Getter<boolean>,
|
||||
enableLayoutAnimationsOnAndroid: Getter<boolean>,
|
||||
enableLayoutAnimationsOnIOS: Getter<boolean>,
|
||||
@@ -313,10 +312,6 @@ export const enableImagePrefetchingOnUiThreadAndroid: Getter<boolean> = createNa
|
||||
* Dispatches state updates for content offset changes synchronously on the main thread.
|
||||
*/
|
||||
export const enableImmediateUpdateModeForContentOffsetChanges: Getter<boolean> = createNativeFlagGetter('enableImmediateUpdateModeForContentOffsetChanges', false);
|
||||
/**
|
||||
* Enable ref.focus() and ref.blur() for all views, not just TextInput.
|
||||
*/
|
||||
export const enableImperativeFocus: Getter<boolean> = createNativeFlagGetter('enableImperativeFocus', false);
|
||||
/**
|
||||
* This is to fix the issue with interop view manager where component descriptor lookup is causing ViewManager to preload.
|
||||
*/
|
||||
|
||||
+1
-2
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<a132956fa9481beddb6d94e7d6acfd7c>>
|
||||
* @generated SignedSource<<ae5e2e1799601c6f630a465ec8e64ef6>>
|
||||
* @flow strict
|
||||
* @noformat
|
||||
*/
|
||||
@@ -52,7 +52,6 @@ export interface Spec extends TurboModule {
|
||||
+enableImagePrefetchingAndroid?: () => boolean;
|
||||
+enableImagePrefetchingOnUiThreadAndroid?: () => boolean;
|
||||
+enableImmediateUpdateModeForContentOffsetChanges?: () => boolean;
|
||||
+enableImperativeFocus?: () => boolean;
|
||||
+enableInteropViewManagerClassLookUpOptimizationIOS?: () => boolean;
|
||||
+enableLayoutAnimationsOnAndroid?: () => boolean;
|
||||
+enableLayoutAnimationsOnIOS?: () => boolean;
|
||||
|
||||
@@ -25,10 +25,7 @@ export type PerformanceResourceTimingJSON = {
|
||||
connectEnd: DOMHighResTimeStamp,
|
||||
responseStart: DOMHighResTimeStamp,
|
||||
responseEnd: DOMHighResTimeStamp,
|
||||
responseStatus: number,
|
||||
contentType: string,
|
||||
encodedBodySize: number,
|
||||
decodedBodySize: number,
|
||||
responseStatus: ?number,
|
||||
...
|
||||
};
|
||||
|
||||
@@ -42,10 +39,7 @@ export interface PerformanceResourceTimingInit {
|
||||
+connectEnd: DOMHighResTimeStamp;
|
||||
+responseStart: DOMHighResTimeStamp;
|
||||
+responseEnd: DOMHighResTimeStamp;
|
||||
+responseStatus: number;
|
||||
+contentType: string;
|
||||
+encodedBodySize: number;
|
||||
+decodedBodySize: number;
|
||||
+responseStatus?: number;
|
||||
}
|
||||
|
||||
export class PerformanceResourceTiming extends PerformanceEntry {
|
||||
@@ -55,10 +49,7 @@ export class PerformanceResourceTiming extends PerformanceEntry {
|
||||
#connectEnd: DOMHighResTimeStamp;
|
||||
#responseStart: DOMHighResTimeStamp;
|
||||
#responseEnd: DOMHighResTimeStamp;
|
||||
#responseStatus: number;
|
||||
#contentType: string;
|
||||
#encodedBodySize: number;
|
||||
#decodedBodySize: number;
|
||||
#responseStatus: ?number;
|
||||
|
||||
constructor(init: PerformanceResourceTimingInit) {
|
||||
super('resource', init);
|
||||
@@ -70,9 +61,6 @@ export class PerformanceResourceTiming extends PerformanceEntry {
|
||||
this.#responseStart = init.responseStart;
|
||||
this.#responseEnd = init.responseEnd;
|
||||
this.#responseStatus = init.responseStatus;
|
||||
this.#contentType = init.contentType;
|
||||
this.#encodedBodySize = init.encodedBodySize;
|
||||
this.#decodedBodySize = init.decodedBodySize;
|
||||
}
|
||||
|
||||
get fetchStart(): DOMHighResTimeStamp {
|
||||
@@ -99,22 +87,10 @@ export class PerformanceResourceTiming extends PerformanceEntry {
|
||||
return this.#responseEnd;
|
||||
}
|
||||
|
||||
get responseStatus(): number {
|
||||
get responseStatus(): ?number {
|
||||
return this.#responseStatus;
|
||||
}
|
||||
|
||||
get contentType(): string {
|
||||
return this.#contentType;
|
||||
}
|
||||
|
||||
get encodedBodySize(): number {
|
||||
return this.#encodedBodySize;
|
||||
}
|
||||
|
||||
get decodedBodySize(): number {
|
||||
return this.#decodedBodySize;
|
||||
}
|
||||
|
||||
toJSON(): PerformanceResourceTimingJSON {
|
||||
return {
|
||||
...super.toJSON(),
|
||||
@@ -125,9 +101,6 @@ export class PerformanceResourceTiming extends PerformanceEntry {
|
||||
responseStart: this.#responseStart,
|
||||
responseEnd: this.#responseEnd,
|
||||
responseStatus: this.#responseStatus,
|
||||
contentType: this.contentType,
|
||||
encodedBodySize: this.encodedBodySize,
|
||||
decodedBodySize: this.decodedBodySize,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user