Merge commit '19174a5ec5fc4343b9a851d5fd9996efa0d0a8f8' into 0.68-merge-latest
This commit is contained in:
Коммит
92ba35285f
|
@ -0,0 +1,16 @@
|
||||||
|
load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_target", "rn_robolectric_test")
|
||||||
|
|
||||||
|
rn_robolectric_test(
|
||||||
|
name = "events",
|
||||||
|
srcs = glob(["*.java"]),
|
||||||
|
contacts = ["oncall+react_native@xmail.facebook.com"],
|
||||||
|
deps = [
|
||||||
|
react_native_dep("third-party/java/jsr-305:jsr-305"),
|
||||||
|
react_native_dep("third-party/java/junit:junit"),
|
||||||
|
react_native_target("java/com/facebook/react:react"),
|
||||||
|
react_native_target("java/com/facebook/react/bridge:bridge"),
|
||||||
|
react_native_target("java/com/facebook/react/common:common"),
|
||||||
|
react_native_target("java/com/facebook/react/touch:touch"),
|
||||||
|
react_native_target("java/com/facebook/react/fabric:fabric"),
|
||||||
|
],
|
||||||
|
)
|
|
@ -0,0 +1,616 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.facebook.react.fabric.events;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.mockito.ArgumentMatchers.anyBoolean;
|
||||||
|
import static org.mockito.ArgumentMatchers.anyInt;
|
||||||
|
import static org.mockito.ArgumentMatchers.anyString;
|
||||||
|
import static org.powermock.api.mockito.PowerMockito.doAnswer;
|
||||||
|
import static org.powermock.api.mockito.PowerMockito.mock;
|
||||||
|
|
||||||
|
import android.util.DisplayMetrics;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
import android.view.MotionEvent.PointerCoords;
|
||||||
|
import com.facebook.react.bridge.Arguments;
|
||||||
|
import com.facebook.react.bridge.JavaOnlyArray;
|
||||||
|
import com.facebook.react.bridge.JavaOnlyMap;
|
||||||
|
import com.facebook.react.bridge.ReadableMap;
|
||||||
|
import com.facebook.react.bridge.WritableMap;
|
||||||
|
import com.facebook.react.fabric.FabricUIManager;
|
||||||
|
import com.facebook.react.uimanager.DisplayMetricsHolder;
|
||||||
|
import com.facebook.react.uimanager.events.TouchEvent;
|
||||||
|
import com.facebook.react.uimanager.events.TouchEventCoalescingKeyHelper;
|
||||||
|
import com.facebook.react.uimanager.events.TouchEventType;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Rule;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.mockito.ArgumentMatchers;
|
||||||
|
import org.mockito.invocation.InvocationOnMock;
|
||||||
|
import org.mockito.stubbing.Answer;
|
||||||
|
import org.powermock.api.mockito.PowerMockito;
|
||||||
|
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
||||||
|
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||||
|
import org.powermock.core.classloader.annotations.SuppressStaticInitializationFor;
|
||||||
|
import org.powermock.modules.junit4.rule.PowerMockRule;
|
||||||
|
import org.robolectric.RobolectricTestRunner;
|
||||||
|
|
||||||
|
@PrepareForTest({Arguments.class, FabricUIManager.class})
|
||||||
|
@SuppressStaticInitializationFor("com.facebook.react.fabric.FabricUIManager")
|
||||||
|
@RunWith(RobolectricTestRunner.class)
|
||||||
|
@PowerMockIgnore({"org.mockito.*", "org.robolectric.*", "androidx.*", "android.*"})
|
||||||
|
public class TouchEventDispatchTest {
|
||||||
|
|
||||||
|
private static final int SURFACE_ID = 121;
|
||||||
|
private static final int TARGET_VIEW_ID = 42;
|
||||||
|
private static final int GESTURE_START_TIME = 1;
|
||||||
|
|
||||||
|
@Rule public PowerMockRule rule = new PowerMockRule();
|
||||||
|
|
||||||
|
private final TouchEventCoalescingKeyHelper mTouchEventCoalescingKeyHelper =
|
||||||
|
new TouchEventCoalescingKeyHelper();
|
||||||
|
|
||||||
|
/** Events (1 pointer): START -> MOVE -> MOVE -> UP */
|
||||||
|
private final TouchEvent[] mStartMoveEndSequence =
|
||||||
|
new TouchEvent[] {
|
||||||
|
createTouchEvent(
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
MotionEvent.ACTION_DOWN,
|
||||||
|
0,
|
||||||
|
new int[] {0},
|
||||||
|
new PointerCoords[] {pointerCoords(1f, 1f)}),
|
||||||
|
createTouchEvent(
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
MotionEvent.ACTION_MOVE,
|
||||||
|
0,
|
||||||
|
new int[] {0},
|
||||||
|
new PointerCoords[] {pointerCoords(1f, 2f)}),
|
||||||
|
createTouchEvent(
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
MotionEvent.ACTION_MOVE,
|
||||||
|
0,
|
||||||
|
new int[] {0},
|
||||||
|
new PointerCoords[] {pointerCoords(1f, 3f)}),
|
||||||
|
createTouchEvent(
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
MotionEvent.ACTION_UP,
|
||||||
|
0,
|
||||||
|
new int[] {0},
|
||||||
|
new PointerCoords[] {pointerCoords(1f, 3f)})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Expected values for {@link #mStartMoveEndSequence} */
|
||||||
|
private final List<ReadableMap> mStartMoveEndExpectedSequence =
|
||||||
|
listOf(
|
||||||
|
/*
|
||||||
|
* START event for touch 1:
|
||||||
|
* {
|
||||||
|
* touches: [touch1],
|
||||||
|
* changed: [touch1]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
1f,
|
||||||
|
1f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
0,
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 1f, GESTURE_START_TIME, 0)),
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 1f, GESTURE_START_TIME, 0))),
|
||||||
|
/*
|
||||||
|
* MOVE event for touch 1:
|
||||||
|
* {
|
||||||
|
* touches: [touch1],
|
||||||
|
* changed: [touch1]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
1f,
|
||||||
|
2f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
0,
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 2f, GESTURE_START_TIME, 0)),
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 2f, GESTURE_START_TIME, 0))),
|
||||||
|
/*
|
||||||
|
* MOVE event for touch 1:
|
||||||
|
* {
|
||||||
|
* touches: [touch1],
|
||||||
|
* changed: [touch1]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
1f,
|
||||||
|
3f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
0,
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 3f, GESTURE_START_TIME, 0)),
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 3f, GESTURE_START_TIME, 0))),
|
||||||
|
/*
|
||||||
|
* END event for touch 1:
|
||||||
|
* {
|
||||||
|
* touches: [],
|
||||||
|
* changed: [touch1]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
1f,
|
||||||
|
3f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
0,
|
||||||
|
Collections.<WritableMap>emptyList(),
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 3f, GESTURE_START_TIME, 0))));
|
||||||
|
|
||||||
|
/** Events (2 pointer): START 1st -> START 2nd -> MOVE 1st -> UP 2st -> UP 1st */
|
||||||
|
private final TouchEvent[] mStartPointerMoveUpSequence =
|
||||||
|
new TouchEvent[] {
|
||||||
|
createTouchEvent(
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
MotionEvent.ACTION_DOWN,
|
||||||
|
0,
|
||||||
|
new int[] {0},
|
||||||
|
new PointerCoords[] {pointerCoords(1f, 1f)}),
|
||||||
|
createTouchEvent(
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
MotionEvent.ACTION_POINTER_DOWN,
|
||||||
|
1,
|
||||||
|
new int[] {0, 1},
|
||||||
|
new PointerCoords[] {pointerCoords(1f, 1f), pointerCoords(2f, 1f)}),
|
||||||
|
createTouchEvent(
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
MotionEvent.ACTION_MOVE,
|
||||||
|
0,
|
||||||
|
new int[] {0, 1},
|
||||||
|
new PointerCoords[] {pointerCoords(1f, 2f), pointerCoords(2f, 1f)}),
|
||||||
|
createTouchEvent(
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
MotionEvent.ACTION_POINTER_UP,
|
||||||
|
1,
|
||||||
|
new int[] {0, 1},
|
||||||
|
new PointerCoords[] {pointerCoords(1f, 2f), pointerCoords(2f, 1f)}),
|
||||||
|
createTouchEvent(
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
MotionEvent.ACTION_POINTER_UP,
|
||||||
|
0,
|
||||||
|
new int[] {0},
|
||||||
|
new PointerCoords[] {pointerCoords(1f, 2f)})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Expected values for {@link #mStartPointerMoveUpSequence} */
|
||||||
|
private final List<ReadableMap> mStartPointerMoveUpExpectedSequence =
|
||||||
|
listOf(
|
||||||
|
/*
|
||||||
|
* START event for touch 1:
|
||||||
|
* {
|
||||||
|
* touch: 0,
|
||||||
|
* touches: [touch1],
|
||||||
|
* changed: [touch1]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
1f,
|
||||||
|
1f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
0,
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 1f, GESTURE_START_TIME, 0)),
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 1f, GESTURE_START_TIME, 0))),
|
||||||
|
/*
|
||||||
|
* START event for touch 2:
|
||||||
|
* {
|
||||||
|
* touch: 1,
|
||||||
|
* touches: [touch0, touch1],
|
||||||
|
* changed: [touch1]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
2f,
|
||||||
|
1f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
1,
|
||||||
|
listOf(
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 1f, GESTURE_START_TIME, 0),
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1)),
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1))),
|
||||||
|
/*
|
||||||
|
* MOVE event for touch 1:
|
||||||
|
* {
|
||||||
|
* touch: 0,
|
||||||
|
* touches: [touch0, touch1],
|
||||||
|
* changed: [touch0, touch1]
|
||||||
|
* }
|
||||||
|
* {
|
||||||
|
* touch: 1,
|
||||||
|
* touches: [touch0, touch1],
|
||||||
|
* changed: [touch0, touch1]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
1f,
|
||||||
|
2f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
0,
|
||||||
|
listOf(
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 2f, GESTURE_START_TIME, 0),
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1)),
|
||||||
|
listOf(
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 2f, GESTURE_START_TIME, 0),
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1))),
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
2f,
|
||||||
|
1f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
1,
|
||||||
|
listOf(
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 2f, GESTURE_START_TIME, 0),
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1)),
|
||||||
|
listOf(
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 2f, GESTURE_START_TIME, 0),
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1))),
|
||||||
|
/*
|
||||||
|
* UP event pointer 1:
|
||||||
|
* {
|
||||||
|
* touch: 1,
|
||||||
|
* touches: [touch0],
|
||||||
|
* changed: [touch1]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
2f,
|
||||||
|
1f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
1,
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 2f, GESTURE_START_TIME, 0)),
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1))),
|
||||||
|
/*
|
||||||
|
* UP event pointer 0:
|
||||||
|
* {
|
||||||
|
* touch: 0,
|
||||||
|
* touches: [],
|
||||||
|
* changed: [touch0]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
1f,
|
||||||
|
2f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
0,
|
||||||
|
Collections.<WritableMap>emptyList(),
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 2f, GESTURE_START_TIME, 0))));
|
||||||
|
|
||||||
|
/** Events (2 pointer): START 1st -> START 2nd -> MOVE 1st -> CANCEL */
|
||||||
|
private final TouchEvent[] mStartMoveCancelSequence =
|
||||||
|
new TouchEvent[] {
|
||||||
|
createTouchEvent(
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
MotionEvent.ACTION_DOWN,
|
||||||
|
0,
|
||||||
|
new int[] {0},
|
||||||
|
new PointerCoords[] {pointerCoords(1f, 1f)}),
|
||||||
|
createTouchEvent(
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
MotionEvent.ACTION_POINTER_DOWN,
|
||||||
|
1,
|
||||||
|
new int[] {0, 1},
|
||||||
|
new PointerCoords[] {pointerCoords(1f, 1f), pointerCoords(2f, 1f)}),
|
||||||
|
createTouchEvent(
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
MotionEvent.ACTION_MOVE,
|
||||||
|
0,
|
||||||
|
new int[] {0, 1},
|
||||||
|
new PointerCoords[] {pointerCoords(1f, 2f), pointerCoords(2f, 1f)}),
|
||||||
|
createTouchEvent(
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
MotionEvent.ACTION_CANCEL,
|
||||||
|
0,
|
||||||
|
new int[] {0, 1},
|
||||||
|
new PointerCoords[] {pointerCoords(1f, 3f), pointerCoords(2f, 1f)})
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Expected values for {@link #mStartMoveCancelSequence} */
|
||||||
|
private final List<ReadableMap> mStartMoveCancelExpectedSequence =
|
||||||
|
listOf(
|
||||||
|
/*
|
||||||
|
* START event for touch 1:
|
||||||
|
* {
|
||||||
|
* touch: 0,
|
||||||
|
* touches: [touch1],
|
||||||
|
* changed: [touch1]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
1f,
|
||||||
|
1f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
0,
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 1f, GESTURE_START_TIME, 0)),
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 1f, GESTURE_START_TIME, 0))),
|
||||||
|
/*
|
||||||
|
* START event for touch 2:
|
||||||
|
* {
|
||||||
|
* touch: 1,
|
||||||
|
* touches: [touch0, touch1],
|
||||||
|
* changed: [touch1]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
2f,
|
||||||
|
1f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
1,
|
||||||
|
listOf(
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 1f, GESTURE_START_TIME, 0),
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1)),
|
||||||
|
listOf(buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1))),
|
||||||
|
/*
|
||||||
|
* MOVE event for touch 1:
|
||||||
|
* {
|
||||||
|
* touch: 0,
|
||||||
|
* touches: [touch0, touch1],
|
||||||
|
* changed: [touch0, touch1]
|
||||||
|
* }
|
||||||
|
* {
|
||||||
|
* touch: 1,
|
||||||
|
* touches: [touch0, touch1],
|
||||||
|
* changed: [touch0, touch1]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
1f,
|
||||||
|
2f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
0,
|
||||||
|
listOf(
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 2f, GESTURE_START_TIME, 0),
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1)),
|
||||||
|
listOf(
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 2f, GESTURE_START_TIME, 0),
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1))),
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
2f,
|
||||||
|
1f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
1,
|
||||||
|
listOf(
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 2f, GESTURE_START_TIME, 0),
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1)),
|
||||||
|
listOf(
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 2f, GESTURE_START_TIME, 0),
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1))),
|
||||||
|
/*
|
||||||
|
* CANCEL event:
|
||||||
|
* {
|
||||||
|
* touch: 0,
|
||||||
|
* touches: [],
|
||||||
|
* changed: [touch0, touch1]
|
||||||
|
* }
|
||||||
|
* {
|
||||||
|
* touch: 1,
|
||||||
|
* touches: [],
|
||||||
|
* changed: [touch0, touch1]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
1f,
|
||||||
|
3f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
0,
|
||||||
|
Collections.<WritableMap>emptyList(),
|
||||||
|
listOf(
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 3f, GESTURE_START_TIME, 0),
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1))),
|
||||||
|
buildGestureEvent(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
2f,
|
||||||
|
1f,
|
||||||
|
GESTURE_START_TIME,
|
||||||
|
1,
|
||||||
|
Collections.<WritableMap>emptyList(),
|
||||||
|
listOf(
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 1f, 3f, GESTURE_START_TIME, 0),
|
||||||
|
buildGesture(SURFACE_ID, TARGET_VIEW_ID, 2f, 1f, GESTURE_START_TIME, 1))));
|
||||||
|
|
||||||
|
List<ReadableMap> mDispatchedEvents;
|
||||||
|
FabricEventEmitter mEventEmitter;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setUp() {
|
||||||
|
PowerMockito.mockStatic(Arguments.class);
|
||||||
|
PowerMockito.mockStatic(FabricUIManager.class);
|
||||||
|
PowerMockito.when(Arguments.createArray())
|
||||||
|
.thenAnswer(
|
||||||
|
new Answer<Object>() {
|
||||||
|
@Override
|
||||||
|
public Object answer(InvocationOnMock invocation) {
|
||||||
|
return new JavaOnlyArray();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
PowerMockito.when(Arguments.createMap())
|
||||||
|
.thenAnswer(
|
||||||
|
new Answer<Object>() {
|
||||||
|
@Override
|
||||||
|
public Object answer(InvocationOnMock invocation) {
|
||||||
|
return new JavaOnlyMap();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
DisplayMetrics metrics = new DisplayMetrics();
|
||||||
|
metrics.xdpi = 1f;
|
||||||
|
metrics.ydpi = 1f;
|
||||||
|
metrics.density = 1f;
|
||||||
|
DisplayMetricsHolder.setWindowDisplayMetrics(metrics);
|
||||||
|
|
||||||
|
FabricUIManager fabricUIManager = mock(FabricUIManager.class);
|
||||||
|
mDispatchedEvents = new ArrayList<>();
|
||||||
|
doAnswer(
|
||||||
|
new Answer<Void>() {
|
||||||
|
@Override
|
||||||
|
public Void answer(InvocationOnMock invocation) {
|
||||||
|
mDispatchedEvents.add(invocation.<ReadableMap>getArgument(5));
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.when(fabricUIManager)
|
||||||
|
.receiveEvent(
|
||||||
|
anyInt(),
|
||||||
|
anyInt(),
|
||||||
|
anyString(),
|
||||||
|
anyBoolean(),
|
||||||
|
anyInt(),
|
||||||
|
ArgumentMatchers.<WritableMap>any(),
|
||||||
|
anyInt());
|
||||||
|
mEventEmitter = new FabricEventEmitter(fabricUIManager);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testFabric_startMoveEnd() {
|
||||||
|
for (TouchEvent event : mStartMoveEndSequence) {
|
||||||
|
event.dispatchModern(mEventEmitter);
|
||||||
|
}
|
||||||
|
|
||||||
|
assertEquals(mStartMoveEndExpectedSequence, mDispatchedEvents);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testFabric_startMoveCancel() {
|
||||||
|
for (TouchEvent event : mStartMoveCancelSequence) {
|
||||||
|
event.dispatchModern(mEventEmitter);
|
||||||
|
}
|
||||||
|
|
||||||
|
assertEquals(mStartMoveCancelExpectedSequence, mDispatchedEvents);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testFabric_startPointerUpCancel() {
|
||||||
|
for (TouchEvent event : mStartPointerMoveUpSequence) {
|
||||||
|
event.dispatchModern(mEventEmitter);
|
||||||
|
}
|
||||||
|
|
||||||
|
assertEquals(mStartPointerMoveUpExpectedSequence, mDispatchedEvents);
|
||||||
|
}
|
||||||
|
|
||||||
|
private TouchEvent createTouchEvent(
|
||||||
|
int gestureTime, int action, int pointerId, int[] pointerIds, PointerCoords[] pointerCoords) {
|
||||||
|
mTouchEventCoalescingKeyHelper.addCoalescingKey(gestureTime);
|
||||||
|
action |= pointerId << MotionEvent.ACTION_POINTER_INDEX_SHIFT;
|
||||||
|
return TouchEvent.obtain(
|
||||||
|
SURFACE_ID,
|
||||||
|
TARGET_VIEW_ID,
|
||||||
|
getType(action),
|
||||||
|
MotionEvent.obtain(
|
||||||
|
gestureTime,
|
||||||
|
gestureTime,
|
||||||
|
action,
|
||||||
|
pointerIds.length,
|
||||||
|
pointerIds,
|
||||||
|
pointerCoords,
|
||||||
|
0,
|
||||||
|
0f,
|
||||||
|
0f,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0),
|
||||||
|
gestureTime,
|
||||||
|
pointerCoords[0].x,
|
||||||
|
pointerCoords[0].y,
|
||||||
|
mTouchEventCoalescingKeyHelper);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static TouchEventType getType(int action) {
|
||||||
|
action &= ~MotionEvent.ACTION_POINTER_INDEX_MASK;
|
||||||
|
switch (action) {
|
||||||
|
case MotionEvent.ACTION_DOWN:
|
||||||
|
case MotionEvent.ACTION_POINTER_DOWN:
|
||||||
|
return TouchEventType.START;
|
||||||
|
case MotionEvent.ACTION_UP:
|
||||||
|
case MotionEvent.ACTION_POINTER_UP:
|
||||||
|
return TouchEventType.END;
|
||||||
|
case MotionEvent.ACTION_MOVE:
|
||||||
|
return TouchEventType.MOVE;
|
||||||
|
case MotionEvent.ACTION_CANCEL:
|
||||||
|
return TouchEventType.CANCEL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TouchEventType.START;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ReadableMap buildGestureEvent(
|
||||||
|
int surfaceId,
|
||||||
|
int viewTag,
|
||||||
|
float locationX,
|
||||||
|
float locationY,
|
||||||
|
int time,
|
||||||
|
int pointerId,
|
||||||
|
List<WritableMap> touches,
|
||||||
|
List<WritableMap> changedTouches) {
|
||||||
|
WritableMap gesture = buildGesture(surfaceId, viewTag, locationX, locationY, time, pointerId);
|
||||||
|
gesture.putArray("changedTouches", JavaOnlyArray.from(changedTouches));
|
||||||
|
gesture.putArray("touches", JavaOnlyArray.from(touches));
|
||||||
|
return gesture;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static WritableMap buildGesture(
|
||||||
|
int surfaceId, int viewTag, float locationX, float locationY, int time, int pointerId) {
|
||||||
|
WritableMap map = new JavaOnlyMap();
|
||||||
|
map.putInt("targetSurface", surfaceId);
|
||||||
|
map.putInt("target", viewTag);
|
||||||
|
map.putDouble("locationX", locationX);
|
||||||
|
map.putDouble("locationY", locationY);
|
||||||
|
map.putDouble("pageX", locationX);
|
||||||
|
map.putDouble("pageY", locationY);
|
||||||
|
map.putDouble("identifier", pointerId);
|
||||||
|
map.putDouble("timestamp", time);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SafeVarargs
|
||||||
|
private static <E> List<E> listOf(E... args) {
|
||||||
|
return Arrays.asList(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static PointerCoords pointerCoords(float x, float y) {
|
||||||
|
PointerCoords pointerCoords = new PointerCoords();
|
||||||
|
pointerCoords.x = x;
|
||||||
|
pointerCoords.y = y;
|
||||||
|
return pointerCoords;
|
||||||
|
}
|
||||||
|
}
|
|
@ -47,10 +47,10 @@ void LayoutAnimationDriver::animationMutationsForFrame(
|
||||||
: layoutAnimationConfig.updateConfig));
|
: layoutAnimationConfig.updateConfig));
|
||||||
|
|
||||||
// Interpolate
|
// Interpolate
|
||||||
std::pair<double, double> progress =
|
auto progress =
|
||||||
calculateAnimationProgress(now, animation, mutationConfig);
|
calculateAnimationProgress(now, animation, mutationConfig);
|
||||||
double animationTimeProgressLinear = progress.first;
|
auto animationTimeProgressLinear = progress.first;
|
||||||
double animationInterpolationFactor = progress.second;
|
auto animationInterpolationFactor = progress.second;
|
||||||
|
|
||||||
auto mutatedShadowView = createInterpolatedShadowView(
|
auto mutatedShadowView = createInterpolatedShadowView(
|
||||||
animationInterpolationFactor, baselineShadowView, finalShadowView);
|
animationInterpolationFactor, baselineShadowView, finalShadowView);
|
||||||
|
|
|
@ -85,8 +85,8 @@ void PrintMutationInstructionRelative(
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline float
|
static inline Float
|
||||||
interpolateFloats(float coefficient, float oldValue, float newValue) {
|
interpolateFloats(Float coefficient, Float oldValue, Float newValue) {
|
||||||
return oldValue + (newValue - oldValue) * coefficient;
|
return oldValue + (newValue - oldValue) * coefficient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1114,7 +1114,7 @@ LayoutAnimationKeyFrameManager::getComponentDescriptorForShadowView(
|
||||||
}
|
}
|
||||||
|
|
||||||
ShadowView LayoutAnimationKeyFrameManager::createInterpolatedShadowView(
|
ShadowView LayoutAnimationKeyFrameManager::createInterpolatedShadowView(
|
||||||
double progress,
|
Float progress,
|
||||||
ShadowView const &startingView,
|
ShadowView const &startingView,
|
||||||
ShadowView const &finalView) const {
|
ShadowView const &finalView) const {
|
||||||
react_native_assert(startingView.tag > 0);
|
react_native_assert(startingView.tag > 0);
|
||||||
|
|
|
@ -120,7 +120,7 @@ class LayoutAnimationKeyFrameManager : public UIManagerAnimationDelegate,
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ShadowView createInterpolatedShadowView(
|
ShadowView createInterpolatedShadowView(
|
||||||
double progress,
|
Float progress,
|
||||||
ShadowView const &startingView,
|
ShadowView const &startingView,
|
||||||
ShadowView const &finalView) const;
|
ShadowView const &finalView) const;
|
||||||
|
|
||||||
|
|
|
@ -115,8 +115,8 @@ static inline better::optional<AnimationConfig> parseAnimationConfig(
|
||||||
|
|
||||||
double duration = defaultDuration;
|
double duration = defaultDuration;
|
||||||
double delay = 0;
|
double delay = 0;
|
||||||
double springDamping = 0.5;
|
Float springDamping = 0.5;
|
||||||
double initialVelocity = 0;
|
Float initialVelocity = 0;
|
||||||
|
|
||||||
auto const durationIt = config.find("duration");
|
auto const durationIt = config.find("duration");
|
||||||
if (durationIt != config.items().end()) {
|
if (durationIt != config.items().end()) {
|
||||||
|
@ -144,7 +144,7 @@ static inline better::optional<AnimationConfig> parseAnimationConfig(
|
||||||
if (springDampingIt != config.items().end() &&
|
if (springDampingIt != config.items().end() &&
|
||||||
springDampingIt->second.isDouble()) {
|
springDampingIt->second.isDouble()) {
|
||||||
if (springDampingIt->second.isDouble()) {
|
if (springDampingIt->second.isDouble()) {
|
||||||
springDamping = springDampingIt->second.asDouble();
|
springDamping = (Float)springDampingIt->second.asDouble();
|
||||||
} else {
|
} else {
|
||||||
LOG(ERROR)
|
LOG(ERROR)
|
||||||
<< "Error parsing animation config: field `springDamping` must be a number";
|
<< "Error parsing animation config: field `springDamping` must be a number";
|
||||||
|
@ -155,7 +155,7 @@ static inline better::optional<AnimationConfig> parseAnimationConfig(
|
||||||
auto const initialVelocityIt = config.find("initialVelocity");
|
auto const initialVelocityIt = config.find("initialVelocity");
|
||||||
if (initialVelocityIt != config.items().end()) {
|
if (initialVelocityIt != config.items().end()) {
|
||||||
if (initialVelocityIt->second.isDouble()) {
|
if (initialVelocityIt->second.isDouble()) {
|
||||||
initialVelocity = initialVelocityIt->second.asDouble();
|
initialVelocity = (Float)initialVelocityIt->second.asDouble();
|
||||||
} else {
|
} else {
|
||||||
LOG(ERROR)
|
LOG(ERROR)
|
||||||
<< "Error parsing animation config: field `initialVelocity` must be a number";
|
<< "Error parsing animation config: field `initialVelocity` must be a number";
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include <react/renderer/animations/LayoutAnimationCallbackWrapper.h>
|
#include <react/renderer/animations/LayoutAnimationCallbackWrapper.h>
|
||||||
#include <react/renderer/core/ReactPrimitives.h>
|
#include <react/renderer/core/ReactPrimitives.h>
|
||||||
|
#include <react/renderer/graphics/Float.h>
|
||||||
#include <react/renderer/mounting/ShadowView.h>
|
#include <react/renderer/mounting/ShadowView.h>
|
||||||
#include <react/renderer/mounting/ShadowViewMutation.h>
|
#include <react/renderer/mounting/ShadowViewMutation.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -43,8 +44,8 @@ struct AnimationConfig {
|
||||||
0; // these are perhaps better represented as uint64_t, but they
|
0; // these are perhaps better represented as uint64_t, but they
|
||||||
// come from JS as doubles
|
// come from JS as doubles
|
||||||
double delay = 0;
|
double delay = 0;
|
||||||
double springDamping = 0;
|
Float springDamping = 0;
|
||||||
double initialVelocity = 0;
|
Float initialVelocity = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
// This corresponds exactly with JS.
|
// This corresponds exactly with JS.
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
namespace facebook {
|
namespace facebook {
|
||||||
namespace react {
|
namespace react {
|
||||||
|
|
||||||
std::pair<double, double> calculateAnimationProgress(
|
std::pair<Float, Float> calculateAnimationProgress(
|
||||||
uint64_t now,
|
uint64_t now,
|
||||||
LayoutAnimation const &animation,
|
LayoutAnimation const &animation,
|
||||||
AnimationConfig const &mutationConfig) {
|
AnimationConfig const &mutationConfig) {
|
||||||
|
@ -20,8 +20,8 @@ std::pair<double, double> calculateAnimationProgress(
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t startTime = animation.startTime;
|
uint64_t startTime = animation.startTime;
|
||||||
uint64_t delay = mutationConfig.delay;
|
uint64_t delay = (uint64_t)mutationConfig.delay;
|
||||||
uint64_t endTime = startTime + delay + mutationConfig.duration;
|
uint64_t endTime = startTime + delay + (uint64_t)mutationConfig.duration;
|
||||||
|
|
||||||
if (now >= endTime) {
|
if (now >= endTime) {
|
||||||
return {1, 1};
|
return {1, 1};
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <react/renderer/animations/primitives.h>
|
#include <react/renderer/animations/primitives.h>
|
||||||
|
#include <react/renderer/graphics/Float.h>
|
||||||
#include <react/renderer/mounting/ShadowViewMutation.h>
|
#include <react/renderer/mounting/ShadowViewMutation.h>
|
||||||
|
|
||||||
namespace facebook {
|
namespace facebook {
|
||||||
|
@ -71,7 +72,7 @@ static inline bool shouldFirstComeBeforeSecondMutation(
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<double, double> calculateAnimationProgress(
|
std::pair<Float, Float> calculateAnimationProgress(
|
||||||
uint64_t now,
|
uint64_t now,
|
||||||
LayoutAnimation const &animation,
|
LayoutAnimation const &animation,
|
||||||
AnimationConfig const &mutationConfig);
|
AnimationConfig const &mutationConfig);
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <react/renderer/core/ShadowNode.h>
|
#include <react/renderer/core/ShadowNode.h>
|
||||||
#include <react/renderer/core/State.h>
|
#include <react/renderer/core/State.h>
|
||||||
#include <react/renderer/core/StateData.h>
|
#include <react/renderer/core/StateData.h>
|
||||||
|
#include <react/renderer/graphics/Float.h>
|
||||||
#include <react/utils/ContextContainer.h>
|
#include <react/utils/ContextContainer.h>
|
||||||
|
|
||||||
namespace facebook {
|
namespace facebook {
|
||||||
|
@ -112,7 +113,7 @@ class ComponentDescriptor {
|
||||||
*/
|
*/
|
||||||
virtual SharedProps interpolateProps(
|
virtual SharedProps interpolateProps(
|
||||||
const PropsParserContext &context,
|
const PropsParserContext &context,
|
||||||
float animationProgress,
|
Float animationProgress,
|
||||||
const SharedProps &props,
|
const SharedProps &props,
|
||||||
const SharedProps &newProps) const = 0;
|
const SharedProps &newProps) const = 0;
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <react/renderer/core/ShadowNode.h>
|
#include <react/renderer/core/ShadowNode.h>
|
||||||
#include <react/renderer/core/ShadowNodeFragment.h>
|
#include <react/renderer/core/ShadowNodeFragment.h>
|
||||||
#include <react/renderer/core/State.h>
|
#include <react/renderer/core/State.h>
|
||||||
|
#include <react/renderer/graphics/Float.h>
|
||||||
|
|
||||||
namespace facebook {
|
namespace facebook {
|
||||||
namespace react {
|
namespace react {
|
||||||
|
@ -113,7 +114,7 @@ class ConcreteComponentDescriptor : public ComponentDescriptor {
|
||||||
|
|
||||||
SharedProps interpolateProps(
|
SharedProps interpolateProps(
|
||||||
const PropsParserContext &context,
|
const PropsParserContext &context,
|
||||||
float animationProgress,
|
Float animationProgress,
|
||||||
const SharedProps &props,
|
const SharedProps &props,
|
||||||
const SharedProps &newProps) const override {
|
const SharedProps &newProps) const override {
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
|
|
|
@ -0,0 +1,105 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "SurfaceRegistryBinding.h"
|
||||||
|
#include <react/renderer/debug/SystraceSection.h>
|
||||||
|
#include <react/renderer/uimanager/bindingUtils.h>
|
||||||
|
#include <react/renderer/uimanager/primitives.h>
|
||||||
|
#include "bindingUtils.h"
|
||||||
|
|
||||||
|
namespace facebook::react {
|
||||||
|
|
||||||
|
void SurfaceRegistryBinding::startSurface(
|
||||||
|
jsi::Runtime &runtime,
|
||||||
|
SurfaceId surfaceId,
|
||||||
|
std::string const &moduleName,
|
||||||
|
folly::dynamic const &initalProps,
|
||||||
|
DisplayMode displayMode) {
|
||||||
|
SystraceSection s("SurfaceRegistryBinding::startSurface");
|
||||||
|
folly::dynamic parameters = folly::dynamic::object();
|
||||||
|
parameters["rootTag"] = surfaceId;
|
||||||
|
parameters["initialProps"] = initalProps;
|
||||||
|
parameters["fabric"] = true;
|
||||||
|
|
||||||
|
if (moduleName != "LogBox" &&
|
||||||
|
runtime.global().hasProperty(runtime, "RN$SurfaceRegistry")) {
|
||||||
|
auto registry =
|
||||||
|
runtime.global().getPropertyAsObject(runtime, "RN$SurfaceRegistry");
|
||||||
|
auto method = registry.getPropertyAsFunction(runtime, "renderSurface");
|
||||||
|
|
||||||
|
method.call(
|
||||||
|
runtime,
|
||||||
|
{jsi::String::createFromUtf8(runtime, moduleName),
|
||||||
|
jsi::valueFromDynamic(runtime, parameters),
|
||||||
|
jsi::Value(runtime, displayModeToInt(displayMode))});
|
||||||
|
} else {
|
||||||
|
callMethodOfModule(
|
||||||
|
runtime,
|
||||||
|
"AppRegistry",
|
||||||
|
"runApplication",
|
||||||
|
{jsi::String::createFromUtf8(runtime, moduleName),
|
||||||
|
jsi::valueFromDynamic(runtime, parameters),
|
||||||
|
jsi::Value(runtime, displayModeToInt(displayMode))});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SurfaceRegistryBinding::setSurfaceProps(
|
||||||
|
jsi::Runtime &runtime,
|
||||||
|
SurfaceId surfaceId,
|
||||||
|
std::string const &moduleName,
|
||||||
|
folly::dynamic const &initalProps,
|
||||||
|
DisplayMode displayMode) {
|
||||||
|
SystraceSection s("UIManagerBinding::setSurfaceProps");
|
||||||
|
folly::dynamic parameters = folly::dynamic::object();
|
||||||
|
parameters["rootTag"] = surfaceId;
|
||||||
|
parameters["initialProps"] = initalProps;
|
||||||
|
parameters["fabric"] = true;
|
||||||
|
|
||||||
|
if (moduleName != "LogBox" &&
|
||||||
|
runtime.global().hasProperty(runtime, "RN$SurfaceRegistry")) {
|
||||||
|
auto registry =
|
||||||
|
runtime.global().getPropertyAsObject(runtime, "RN$SurfaceRegistry");
|
||||||
|
auto method = registry.getPropertyAsFunction(runtime, "setSurfaceProps");
|
||||||
|
|
||||||
|
method.call(
|
||||||
|
runtime,
|
||||||
|
{jsi::String::createFromUtf8(runtime, moduleName),
|
||||||
|
jsi::valueFromDynamic(runtime, parameters),
|
||||||
|
jsi::Value(runtime, displayModeToInt(displayMode))});
|
||||||
|
} else {
|
||||||
|
callMethodOfModule(
|
||||||
|
runtime,
|
||||||
|
"AppRegistry",
|
||||||
|
"setSurfaceProps",
|
||||||
|
{jsi::String::createFromUtf8(runtime, moduleName),
|
||||||
|
jsi::valueFromDynamic(runtime, parameters),
|
||||||
|
jsi::Value(runtime, displayModeToInt(displayMode))});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SurfaceRegistryBinding::stopSurface(
|
||||||
|
jsi::Runtime &runtime,
|
||||||
|
SurfaceId surfaceId) {
|
||||||
|
auto global = runtime.global();
|
||||||
|
if (global.hasProperty(runtime, "RN$Bridgeless")) {
|
||||||
|
if (!global.hasProperty(runtime, "RN$stopSurface")) {
|
||||||
|
// ReactFabric module has not been loaded yet; there's no surface to stop.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Bridgeless mode uses a custom JSI binding instead of callable module.
|
||||||
|
global.getPropertyAsFunction(runtime, "RN$stopSurface")
|
||||||
|
.call(runtime, {jsi::Value{surfaceId}});
|
||||||
|
} else {
|
||||||
|
callMethodOfModule(
|
||||||
|
runtime,
|
||||||
|
"ReactFabric",
|
||||||
|
"unmountComponentAtNode",
|
||||||
|
{jsi::Value{surfaceId}});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace facebook::react
|
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <jsi/jsi.h>
|
||||||
|
#include <react/renderer/core/ReactPrimitives.h>
|
||||||
|
|
||||||
|
namespace facebook::react {
|
||||||
|
|
||||||
|
class SurfaceRegistryBinding final {
|
||||||
|
public:
|
||||||
|
SurfaceRegistryBinding() = delete;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Starts React Native Surface with given id, moduleName, and props.
|
||||||
|
* Thread synchronization must be enforced externally.
|
||||||
|
*/
|
||||||
|
static void startSurface(
|
||||||
|
jsi::Runtime &runtime,
|
||||||
|
SurfaceId surfaceId,
|
||||||
|
std::string const &moduleName,
|
||||||
|
folly::dynamic const &initalProps,
|
||||||
|
DisplayMode displayMode);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Updates the React Native Surface identified with surfaceId and moduleName
|
||||||
|
* with the given props.
|
||||||
|
* Thread synchronization must be enforced externally.
|
||||||
|
*/
|
||||||
|
static void setSurfaceProps(
|
||||||
|
jsi::Runtime &runtime,
|
||||||
|
SurfaceId surfaceId,
|
||||||
|
std::string const &moduleName,
|
||||||
|
folly::dynamic const &initalProps,
|
||||||
|
DisplayMode displayMode);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Stops React Native Surface with given id.
|
||||||
|
* Thread synchronization must be enforced externally.
|
||||||
|
*/
|
||||||
|
static void stopSurface(jsi::Runtime &runtime, SurfaceId surfaceId);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace facebook::react
|
|
@ -12,6 +12,7 @@
|
||||||
#include <react/renderer/core/ShadowNodeFragment.h>
|
#include <react/renderer/core/ShadowNodeFragment.h>
|
||||||
#include <react/renderer/debug/SystraceSection.h>
|
#include <react/renderer/debug/SystraceSection.h>
|
||||||
#include <react/renderer/graphics/Geometry.h>
|
#include <react/renderer/graphics/Geometry.h>
|
||||||
|
#include <react/renderer/uimanager/SurfaceRegistryBinding.h>
|
||||||
#include <react/renderer/uimanager/UIManagerBinding.h>
|
#include <react/renderer/uimanager/UIManagerBinding.h>
|
||||||
#include <react/renderer/uimanager/UIManagerCommitHook.h>
|
#include <react/renderer/uimanager/UIManagerCommitHook.h>
|
||||||
|
|
||||||
|
@ -169,12 +170,7 @@ void UIManager::startSurface(
|
||||||
|
|
||||||
runtimeExecutor_([=](jsi::Runtime &runtime) {
|
runtimeExecutor_([=](jsi::Runtime &runtime) {
|
||||||
SystraceSection s("UIManager::startSurface::onRuntime");
|
SystraceSection s("UIManager::startSurface::onRuntime");
|
||||||
auto uiManagerBinding = UIManagerBinding::getBinding(runtime);
|
SurfaceRegistryBinding::startSurface(
|
||||||
if (!uiManagerBinding) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
uiManagerBinding->startSurface(
|
|
||||||
runtime, surfaceId, moduleName, props, displayMode);
|
runtime, surfaceId, moduleName, props, displayMode);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -187,12 +183,7 @@ void UIManager::setSurfaceProps(
|
||||||
SystraceSection s("UIManager::setSurfaceProps");
|
SystraceSection s("UIManager::setSurfaceProps");
|
||||||
|
|
||||||
runtimeExecutor_([=](jsi::Runtime &runtime) {
|
runtimeExecutor_([=](jsi::Runtime &runtime) {
|
||||||
auto uiManagerBinding = UIManagerBinding::getBinding(runtime);
|
SurfaceRegistryBinding::setSurfaceProps(
|
||||||
if (!uiManagerBinding) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
uiManagerBinding->setSurfaceProps(
|
|
||||||
runtime, surfaceId, moduleName, props, displayMode);
|
runtime, surfaceId, moduleName, props, displayMode);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -212,12 +203,7 @@ ShadowTree::Unique UIManager::stopSurface(SurfaceId surfaceId) const {
|
||||||
// the JavaScript side will not be able to reference a `ShadowTree` and will
|
// the JavaScript side will not be able to reference a `ShadowTree` and will
|
||||||
// fail silently.
|
// fail silently.
|
||||||
runtimeExecutor_([=](jsi::Runtime &runtime) {
|
runtimeExecutor_([=](jsi::Runtime &runtime) {
|
||||||
auto uiManagerBinding = UIManagerBinding::getBinding(runtime);
|
SurfaceRegistryBinding::stopSurface(runtime, surfaceId);
|
||||||
if (!uiManagerBinding) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
uiManagerBinding->stopSurface(runtime, surfaceId);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (leakChecker_) {
|
if (leakChecker_) {
|
||||||
|
|
|
@ -15,49 +15,10 @@
|
||||||
#include <react/renderer/runtimescheduler/RuntimeSchedulerBinding.h>
|
#include <react/renderer/runtimescheduler/RuntimeSchedulerBinding.h>
|
||||||
#include <react/renderer/uimanager/primitives.h>
|
#include <react/renderer/uimanager/primitives.h>
|
||||||
|
|
||||||
|
#include "bindingUtils.h"
|
||||||
|
|
||||||
namespace facebook::react {
|
namespace facebook::react {
|
||||||
|
|
||||||
static jsi::Value getModule(
|
|
||||||
jsi::Runtime &runtime,
|
|
||||||
std::string const &moduleName) {
|
|
||||||
auto batchedBridge =
|
|
||||||
runtime.global().getPropertyAsObject(runtime, "__fbBatchedBridge");
|
|
||||||
auto getCallableModule =
|
|
||||||
batchedBridge.getPropertyAsFunction(runtime, "getCallableModule");
|
|
||||||
auto moduleAsValue = getCallableModule.callWithThis(
|
|
||||||
runtime,
|
|
||||||
batchedBridge,
|
|
||||||
{jsi::String::createFromUtf8(runtime, moduleName)});
|
|
||||||
if (!moduleAsValue.isObject()) {
|
|
||||||
LOG(ERROR) << "getModule of " << moduleName << " is not an object";
|
|
||||||
}
|
|
||||||
react_native_assert(moduleAsValue.isObject());
|
|
||||||
return moduleAsValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool checkBatchedBridgeIsActive(jsi::Runtime &runtime) {
|
|
||||||
if (!runtime.global().hasProperty(runtime, "__fbBatchedBridge")) {
|
|
||||||
LOG(ERROR)
|
|
||||||
<< "getPropertyAsObject: property '__fbBatchedBridge' is undefined, expected an Object";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool checkGetCallableModuleIsActive(jsi::Runtime &runtime) {
|
|
||||||
if (!checkBatchedBridgeIsActive(runtime)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
auto batchedBridge =
|
|
||||||
runtime.global().getPropertyAsObject(runtime, "__fbBatchedBridge");
|
|
||||||
if (!batchedBridge.hasProperty(runtime, "getCallableModule")) {
|
|
||||||
LOG(ERROR)
|
|
||||||
<< "getPropertyAsFunction: function 'getCallableModule' is undefined, expected a Function";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UIManagerBinding::createAndInstallIfNeeded(
|
void UIManagerBinding::createAndInstallIfNeeded(
|
||||||
jsi::Runtime &runtime,
|
jsi::Runtime &runtime,
|
||||||
RuntimeExecutor const &runtimeExecutor,
|
RuntimeExecutor const &runtimeExecutor,
|
||||||
|
@ -101,29 +62,6 @@ UIManagerBinding::~UIManagerBinding() {
|
||||||
<< this << ").";
|
<< this << ").";
|
||||||
}
|
}
|
||||||
|
|
||||||
static jsi::Value callMethodOfModule(
|
|
||||||
jsi::Runtime &runtime,
|
|
||||||
std::string const &moduleName,
|
|
||||||
std::string const &methodName,
|
|
||||||
std::initializer_list<jsi::Value> args) {
|
|
||||||
if (checkGetCallableModuleIsActive(runtime)) {
|
|
||||||
auto module = getModule(runtime, moduleName);
|
|
||||||
if (module.isObject()) {
|
|
||||||
jsi::Object object = module.asObject(runtime);
|
|
||||||
react_native_assert(object.hasProperty(runtime, methodName.c_str()));
|
|
||||||
if (object.hasProperty(runtime, methodName.c_str())) {
|
|
||||||
auto method = object.getPropertyAsFunction(runtime, methodName.c_str());
|
|
||||||
return method.callWithThis(runtime, object, args);
|
|
||||||
} else {
|
|
||||||
LOG(ERROR) << "getPropertyAsFunction: property '" << methodName
|
|
||||||
<< "' is undefined, expected a Function";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return jsi::Value::undefined();
|
|
||||||
}
|
|
||||||
|
|
||||||
jsi::Value UIManagerBinding::getInspectorDataForInstance(
|
jsi::Value UIManagerBinding::getInspectorDataForInstance(
|
||||||
jsi::Runtime &runtime,
|
jsi::Runtime &runtime,
|
||||||
EventEmitter const &eventEmitter) const {
|
EventEmitter const &eventEmitter) const {
|
||||||
|
@ -151,94 +89,6 @@ jsi::Value UIManagerBinding::getInspectorDataForInstance(
|
||||||
{std::move(instanceHandle)});
|
{std::move(instanceHandle)});
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIManagerBinding::startSurface(
|
|
||||||
jsi::Runtime &runtime,
|
|
||||||
SurfaceId surfaceId,
|
|
||||||
std::string const &moduleName,
|
|
||||||
folly::dynamic const &initalProps,
|
|
||||||
DisplayMode displayMode) const {
|
|
||||||
SystraceSection s("UIManagerBinding::startSurface");
|
|
||||||
folly::dynamic parameters = folly::dynamic::object();
|
|
||||||
parameters["rootTag"] = surfaceId;
|
|
||||||
parameters["initialProps"] = initalProps;
|
|
||||||
parameters["fabric"] = true;
|
|
||||||
|
|
||||||
if (moduleName != "LogBox" &&
|
|
||||||
runtime.global().hasProperty(runtime, "RN$SurfaceRegistry")) {
|
|
||||||
auto registry =
|
|
||||||
runtime.global().getPropertyAsObject(runtime, "RN$SurfaceRegistry");
|
|
||||||
auto method = registry.getPropertyAsFunction(runtime, "renderSurface");
|
|
||||||
|
|
||||||
method.call(
|
|
||||||
runtime,
|
|
||||||
{jsi::String::createFromUtf8(runtime, moduleName),
|
|
||||||
jsi::valueFromDynamic(runtime, parameters),
|
|
||||||
jsi::Value(runtime, displayModeToInt(displayMode))});
|
|
||||||
} else {
|
|
||||||
callMethodOfModule(
|
|
||||||
runtime,
|
|
||||||
"AppRegistry",
|
|
||||||
"runApplication",
|
|
||||||
{jsi::String::createFromUtf8(runtime, moduleName),
|
|
||||||
jsi::valueFromDynamic(runtime, parameters),
|
|
||||||
jsi::Value(runtime, displayModeToInt(displayMode))});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void UIManagerBinding::setSurfaceProps(
|
|
||||||
jsi::Runtime &runtime,
|
|
||||||
SurfaceId surfaceId,
|
|
||||||
std::string const &moduleName,
|
|
||||||
folly::dynamic const &initalProps,
|
|
||||||
DisplayMode displayMode) const {
|
|
||||||
SystraceSection s("UIManagerBinding::setSurfaceProps");
|
|
||||||
folly::dynamic parameters = folly::dynamic::object();
|
|
||||||
parameters["rootTag"] = surfaceId;
|
|
||||||
parameters["initialProps"] = initalProps;
|
|
||||||
parameters["fabric"] = true;
|
|
||||||
|
|
||||||
if (moduleName != "LogBox" &&
|
|
||||||
runtime.global().hasProperty(runtime, "RN$SurfaceRegistry")) {
|
|
||||||
auto registry =
|
|
||||||
runtime.global().getPropertyAsObject(runtime, "RN$SurfaceRegistry");
|
|
||||||
auto method = registry.getPropertyAsFunction(runtime, "setSurfaceProps");
|
|
||||||
|
|
||||||
method.call(
|
|
||||||
runtime,
|
|
||||||
{jsi::String::createFromUtf8(runtime, moduleName),
|
|
||||||
jsi::valueFromDynamic(runtime, parameters),
|
|
||||||
jsi::Value(runtime, displayModeToInt(displayMode))});
|
|
||||||
} else {
|
|
||||||
callMethodOfModule(
|
|
||||||
runtime,
|
|
||||||
"AppRegistry",
|
|
||||||
"setSurfaceProps",
|
|
||||||
{jsi::String::createFromUtf8(runtime, moduleName),
|
|
||||||
jsi::valueFromDynamic(runtime, parameters),
|
|
||||||
jsi::Value(runtime, displayModeToInt(displayMode))});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void UIManagerBinding::stopSurface(jsi::Runtime &runtime, SurfaceId surfaceId)
|
|
||||||
const {
|
|
||||||
auto global = runtime.global();
|
|
||||||
if (global.hasProperty(runtime, "RN$Bridgeless")) {
|
|
||||||
if (!global.hasProperty(runtime, "RN$stopSurface")) {
|
|
||||||
// ReactFabric module has not been loaded yet; there's no surface to stop.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Bridgeless mode uses a custom JSI binding instead of callable module.
|
|
||||||
global.getPropertyAsFunction(runtime, "RN$stopSurface")
|
|
||||||
.call(runtime, {jsi::Value{surfaceId}});
|
|
||||||
} else {
|
|
||||||
callMethodOfModule(
|
|
||||||
runtime,
|
|
||||||
"ReactFabric",
|
|
||||||
"unmountComponentAtNode",
|
|
||||||
{jsi::Value{surfaceId}});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void UIManagerBinding::dispatchEvent(
|
void UIManagerBinding::dispatchEvent(
|
||||||
jsi::Runtime &runtime,
|
jsi::Runtime &runtime,
|
||||||
EventTarget const *eventTarget,
|
EventTarget const *eventTarget,
|
||||||
|
|
|
@ -43,39 +43,10 @@ class UIManagerBinding : public jsi::HostObject {
|
||||||
|
|
||||||
~UIManagerBinding();
|
~UIManagerBinding();
|
||||||
|
|
||||||
/*
|
|
||||||
* Starts React Native Surface with given id, moduleName, and props.
|
|
||||||
* Thread synchronization must be enforced externally.
|
|
||||||
*/
|
|
||||||
void startSurface(
|
|
||||||
jsi::Runtime &runtime,
|
|
||||||
SurfaceId surfaceId,
|
|
||||||
std::string const &moduleName,
|
|
||||||
folly::dynamic const &initalProps,
|
|
||||||
DisplayMode displayMode) const;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Updates the React Native Surface identified with surfaceId and moduleName
|
|
||||||
* with the given props.
|
|
||||||
* Thread synchronization must be enforced externally.
|
|
||||||
*/
|
|
||||||
void setSurfaceProps(
|
|
||||||
jsi::Runtime &runtime,
|
|
||||||
SurfaceId surfaceId,
|
|
||||||
std::string const &moduleName,
|
|
||||||
folly::dynamic const &props,
|
|
||||||
DisplayMode displayMode) const;
|
|
||||||
|
|
||||||
jsi::Value getInspectorDataForInstance(
|
jsi::Value getInspectorDataForInstance(
|
||||||
jsi::Runtime &runtime,
|
jsi::Runtime &runtime,
|
||||||
EventEmitter const &eventEmitter) const;
|
EventEmitter const &eventEmitter) const;
|
||||||
|
|
||||||
/*
|
|
||||||
* Stops React Native Surface with given id.
|
|
||||||
* Thread synchronization must be enforced externally.
|
|
||||||
*/
|
|
||||||
void stopSurface(jsi::Runtime &runtime, SurfaceId surfaceId) const;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Delivers raw event data to JavaScript.
|
* Delivers raw event data to JavaScript.
|
||||||
* Thread synchronization must be enforced externally.
|
* Thread synchronization must be enforced externally.
|
||||||
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "bindingUtils.h"
|
||||||
|
|
||||||
|
#include <glog/logging.h>
|
||||||
|
#include <react/debug/react_native_assert.h>
|
||||||
|
|
||||||
|
namespace facebook::react {
|
||||||
|
|
||||||
|
static jsi::Value getModule(
|
||||||
|
jsi::Runtime &runtime,
|
||||||
|
std::string const &moduleName) {
|
||||||
|
auto batchedBridge =
|
||||||
|
runtime.global().getPropertyAsObject(runtime, "__fbBatchedBridge");
|
||||||
|
auto getCallableModule =
|
||||||
|
batchedBridge.getPropertyAsFunction(runtime, "getCallableModule");
|
||||||
|
auto moduleAsValue = getCallableModule.callWithThis(
|
||||||
|
runtime,
|
||||||
|
batchedBridge,
|
||||||
|
{jsi::String::createFromUtf8(runtime, moduleName)});
|
||||||
|
if (!moduleAsValue.isObject()) {
|
||||||
|
LOG(ERROR) << "getModule of " << moduleName << " is not an object";
|
||||||
|
}
|
||||||
|
react_native_assert(moduleAsValue.isObject());
|
||||||
|
return moduleAsValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool checkBatchedBridgeIsActive(jsi::Runtime &runtime) {
|
||||||
|
if (!runtime.global().hasProperty(runtime, "__fbBatchedBridge")) {
|
||||||
|
LOG(ERROR)
|
||||||
|
<< "getPropertyAsObject: property '__fbBatchedBridge' is undefined, expected an Object";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool checkGetCallableModuleIsActive(jsi::Runtime &runtime) {
|
||||||
|
if (!checkBatchedBridgeIsActive(runtime)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
auto batchedBridge =
|
||||||
|
runtime.global().getPropertyAsObject(runtime, "__fbBatchedBridge");
|
||||||
|
if (!batchedBridge.hasProperty(runtime, "getCallableModule")) {
|
||||||
|
LOG(ERROR)
|
||||||
|
<< "getPropertyAsFunction: function 'getCallableModule' is undefined, expected a Function";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
jsi::Value callMethodOfModule(
|
||||||
|
jsi::Runtime &runtime,
|
||||||
|
std::string const &moduleName,
|
||||||
|
std::string const &methodName,
|
||||||
|
std::initializer_list<jsi::Value> args) {
|
||||||
|
if (checkGetCallableModuleIsActive(runtime)) {
|
||||||
|
auto module = getModule(runtime, moduleName);
|
||||||
|
if (module.isObject()) {
|
||||||
|
jsi::Object object = module.asObject(runtime);
|
||||||
|
react_native_assert(object.hasProperty(runtime, methodName.c_str()));
|
||||||
|
if (object.hasProperty(runtime, methodName.c_str())) {
|
||||||
|
auto method = object.getPropertyAsFunction(runtime, methodName.c_str());
|
||||||
|
return method.callWithThis(runtime, object, args);
|
||||||
|
} else {
|
||||||
|
LOG(ERROR) << "getPropertyAsFunction: property '" << methodName
|
||||||
|
<< "' is undefined, expected a Function";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return jsi::Value::undefined();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace facebook::react
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <jsi/jsi.h>
|
||||||
|
|
||||||
|
namespace facebook::react {
|
||||||
|
|
||||||
|
jsi::Value callMethodOfModule(
|
||||||
|
jsi::Runtime &runtime,
|
||||||
|
std::string const &moduleName,
|
||||||
|
std::string const &methodName,
|
||||||
|
std::initializer_list<jsi::Value> args);
|
||||||
|
|
||||||
|
} // namespace facebook::react
|
|
@ -49,6 +49,7 @@
|
||||||
"scripts/launchPackager.command",
|
"scripts/launchPackager.command",
|
||||||
"scripts/node-binary.sh",
|
"scripts/node-binary.sh",
|
||||||
"scripts/packager.sh",
|
"scripts/packager.sh",
|
||||||
|
"scripts/packager-reporter.js",
|
||||||
"scripts/react_native_pods.rb",
|
"scripts/react_native_pods.rb",
|
||||||
"scripts/react-native-xcode.sh",
|
"scripts/react-native-xcode.sh",
|
||||||
"scripts/update-ruby.sh",
|
"scripts/update-ruby.sh",
|
||||||
|
|
|
@ -562,8 +562,8 @@ SPEC CHECKSUMS:
|
||||||
boost-for-react-native: 8f7c9ecfe357664c072ffbe2432569667cbf1f1b
|
boost-for-react-native: 8f7c9ecfe357664c072ffbe2432569667cbf1f1b
|
||||||
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
|
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
|
||||||
DoubleConversion: ed15e075aa758ac0e4c1f8b830bd4e4d40d669e8
|
DoubleConversion: ed15e075aa758ac0e4c1f8b830bd4e4d40d669e8
|
||||||
FBLazyVector: 0ef448d5e6a406661c1a72a494697fcabd28fb98
|
FBLazyVector: 40a4b7e554f7665b6ff12ec25158d293350d6561
|
||||||
FBReactNativeSpec: 68cfb8db5e429b02d7543f517966c6accde03c54
|
FBReactNativeSpec: 8d36d2e0cdaa4ea559b533f2e0a80b665635887b
|
||||||
Flipper: 30e8eeeed6abdc98edaf32af0cda2f198be4b733
|
Flipper: 30e8eeeed6abdc98edaf32af0cda2f198be4b733
|
||||||
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
|
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
|
||||||
Flipper-DoubleConversion: 57ffbe81ef95306cc9e69c4aa3aeeeeb58a6a28c
|
Flipper-DoubleConversion: 57ffbe81ef95306cc9e69c4aa3aeeeeb58a6a28c
|
||||||
|
@ -578,36 +578,36 @@ SPEC CHECKSUMS:
|
||||||
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
|
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
|
||||||
OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b
|
OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b
|
||||||
RCT-Folly: 24c6da766832002a4a2aac5f79ee0ca50fbe8507
|
RCT-Folly: 24c6da766832002a4a2aac5f79ee0ca50fbe8507
|
||||||
RCTRequired: be79fa3dfc48e2a57b586bfd489eec3cb7f34a59
|
RCTRequired: 717eee568b94c9d4ad66e09e940a132d1e825f45
|
||||||
RCTTypeSafety: 7fae0fa76079be03514cd40679e499cae2afc382
|
RCTTypeSafety: 65ff425174890662687f4a8ef38e3551d1a4d342
|
||||||
React: 16bea432ab8d83d32cbc979f83f5b5797df49c8e
|
React: dfcc8259d83761b6df33aa66af6b0a5873875d66
|
||||||
React-callinvoker: b4f1c7d76da4efd621ba72aa2cf5b4113afdfee5
|
React-callinvoker: 96d4cbffca7150179432495746ce0e898a907ea0
|
||||||
React-Codegen: b3fbef96f960cb15fc61250078b0700cfd4cd8a1
|
React-Codegen: b3fbef96f960cb15fc61250078b0700cfd4cd8a1
|
||||||
React-Core: 9eb724ef469952a52b0e59f648336ce0d5c71e18
|
React-Core: f4e0c9b3378b805ec587c4d6387e10ebe260921a
|
||||||
React-CoreModules: f57aacaa764279ea11c7c2add0347cf4ba55ce94
|
React-CoreModules: 94abda8a3a0b1707a4717461c4c4075bdbae080e
|
||||||
React-cxxreact: e22c8ffcec5a47fe36b8f4bc455ca17fca0387bc
|
React-cxxreact: 288329990e65432af50f599576254a35696ce907
|
||||||
React-jsi: 2f7568b4b4ac95de1924e6a7328aabdc8936b845
|
React-jsi: 95c52cc2c22e6e2ee847055534455be6f4a3be8a
|
||||||
React-jsiexecutor: 69399f4c33175b689bb9d7782f625ff54c27a58f
|
React-jsiexecutor: 78e5ff5ec5292d854adf6b21f0c3fe5bae0a389f
|
||||||
React-jsinspector: 33885daddb31800d8126d896ed4fb0b2d14c24dd
|
React-jsinspector: 0a15682a10ade9c27a4e8391cc8ea9c03f02e27c
|
||||||
React-logger: 1de5f453a04d27dda3621e0480fd0e1f9876167b
|
React-logger: 32ad0b8f9530f5b2852e1528a4b3ff4a443eaa77
|
||||||
React-perflogger: 3010d73fea3aca12cc0110c7c899c8c0ddb86143
|
React-perflogger: e7e2f2afe479f8af724b162632792c2dffc24a95
|
||||||
React-RCTActionSheet: 16e39703213bc68a27136b40e8e4c43b2a498095
|
React-RCTActionSheet: e5e91a39194a7af4caacd9ecc7fd2efcb98ecec7
|
||||||
React-RCTAnimation: ffe69bd885e46ce80f291f7a014b60aba2c650b8
|
React-RCTAnimation: 6ae95e2148365c23b9cc5c1d79ac8f94433bd9e8
|
||||||
React-RCTBlob: 84d9c97c2541a6ddc1aae3f016a05d8632e02591
|
React-RCTBlob: 517da9320b4b4c966dc9fe1924b726b3674c0bdb
|
||||||
React-RCTImage: a82b59aa6b766879caaa74626728d83955f92802
|
React-RCTImage: ee48780f716b3eab35582af44d3c467d4e8ec38c
|
||||||
React-RCTLinking: 53114e56f0a376881d55500a2dc84362fb582512
|
React-RCTLinking: 9c4e8ff9b8ce9345fbd6aebced064c66b3578ef7
|
||||||
React-RCTNetwork: 170faa0b5eea9d4f04758af8a6b96d7014862206
|
React-RCTNetwork: a60d2d99521ec5d47c8eed72bc89fada7277d0e6
|
||||||
React-RCTPushNotification: 1ecdd78ab56c8fae573bb0ccbe580458e9001496
|
React-RCTPushNotification: 3a01a3e200e9d3119c2217b68204989d372c670c
|
||||||
React-RCTSettings: 7ce3e83bdc9cb32cde3ba91648f2beca31a69d28
|
React-RCTSettings: 24dcdd91eb1a09a345265ef867831d0935b29d8a
|
||||||
React-RCTTest: d693d61018dc6ef951454833f11d220d195214cb
|
React-RCTTest: 6b68a9203f626dfe36b53acbdea51d8a48cf6c5f
|
||||||
React-RCTText: 0ecf973834cb75b684151abecab3dea89f154c28
|
React-RCTText: de57fc63781b352534ee3a79cf2810b25407ab01
|
||||||
React-RCTVibration: aaa16391dfa1d39e4db5a860d219a5287c32d533
|
React-RCTVibration: b7c2d067e582a6ac372ab19ac3150277f133eb9f
|
||||||
React-runtimeexecutor: 907366d61577faefe14df69f04968cb437dd1385
|
React-runtimeexecutor: fc46b7a525c22d75f6692cdf1bd3330554756e91
|
||||||
React-TurboModuleCxx-RNW: f2e32cbfced49190a61d66c993a8975de79a158a
|
React-TurboModuleCxx-RNW: f2e32cbfced49190a61d66c993a8975de79a158a
|
||||||
React-TurboModuleCxx-WinRTPort: 417bc3a4d760fd452fb5239e9f7286c589d4e324
|
React-TurboModuleCxx-WinRTPort: 4782b322e02ffb222d3f352ddabd4d5fa5b54e43
|
||||||
ReactCommon: 10ee2073c8b48b807e9d400021e0661c65225274
|
ReactCommon: f899c42020c3e4b19c572e1baa614b9496c32c22
|
||||||
ScreenshotManager: e46590d9272228091e9ea43ce09c0fb7147a7d60
|
ScreenshotManager: e46590d9272228091e9ea43ce09c0fb7147a7d60
|
||||||
Yoga: 6bb2dada59a99f06ccfa4fc8d80f6322b8008821
|
Yoga: fba1ea49090937104a21a5f57aa54c6fa918137d
|
||||||
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
||||||
|
|
||||||
PODFILE CHECKSUM: 1108cd29c1fc117ace6c72b171f31a4c268e5bd2
|
PODFILE CHECKSUM: 1108cd29c1fc117ace6c72b171f31a4c268e5bd2
|
||||||
|
|
Загрузка…
Ссылка в новой задаче