Back out "[RN][JS] Remove definition of viewIsDescendantOf method in JS"

Summary:
Adding viewIsDescendantOf back again, more context 9ae7f0c7da
This method might no not be implemented in Fabric

Reviewed By: fkgozali

Differential Revision: D16186405

fbshipit-source-id: da91822845e3c7b1f48ebf8c4782f8a2ee593bfe
This commit is contained in:
David Vacca 2019-07-10 20:52:57 -07:00 коммит произвёл Facebook Github Bot
Родитель 458c06b8e7
Коммит 0fb3fb1d8e
5 изменённых файлов: 21 добавлений и 0 удалений

Просмотреть файл

@ -1473,6 +1473,10 @@ namespace facebook {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "measureInWindow", @selector(measureInWindow:callback:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeUIManagerSpecJSI_viewIsDescendantOf(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "viewIsDescendantOf", @selector(viewIsDescendantOf:ancestorReactTag:callback:), args, count);
}
static facebook::jsi::Value __hostFunction_NativeUIManagerSpecJSI_measureLayout(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "measureLayout", @selector(measureLayout:ancestorReactTag:errorCallback:callback:), args, count);
}
@ -1569,6 +1573,9 @@ namespace facebook {
methodMap_["measureInWindow"] = MethodMetadata {2, __hostFunction_NativeUIManagerSpecJSI_measureInWindow};
methodMap_["viewIsDescendantOf"] = MethodMetadata {3, __hostFunction_NativeUIManagerSpecJSI_viewIsDescendantOf};
methodMap_["measureLayout"] = MethodMetadata {4, __hostFunction_NativeUIManagerSpecJSI_measureLayout};

Просмотреть файл

@ -1641,6 +1641,9 @@ namespace JS {
callback:(RCTResponseSenderBlock)callback;
- (void)measureInWindow:(NSNumber *)reactTag
callback:(RCTResponseSenderBlock)callback;
- (void)viewIsDescendantOf:(NSNumber *)reactTag
ancestorReactTag:(NSNumber *)ancestorReactTag
callback:(RCTResponseSenderBlock)callback;
- (void)measureLayout:(NSNumber *)reactTag
ancestorReactTag:(NSNumber *)ancestorReactTag
errorCallback:(RCTResponseSenderBlock)errorCallback

Просмотреть файл

@ -61,6 +61,11 @@ module.exports = {
reactTag: ?number,
callback: (x: number, y: number, width: number, height: number) => void,
) => {},
viewIsDescendantOf: (
reactTag: ?number,
ancestorReactTag: ?number,
callback: (result: Array<boolean>) => void,
) => {},
measureLayout: (
reactTag: ?number,
ancestorReactTag: ?number,

Просмотреть файл

@ -59,6 +59,11 @@ export interface Spec extends TurboModule {
reactTag: ?number,
callback: (x: number, y: number, width: number, height: number) => void,
) => void;
+viewIsDescendantOf: (
reactTag: ?number,
ancestorReactTag: ?number,
callback: (result: Array<boolean>) => void,
) => void;
+measureLayout: (
reactTag: ?number,
ancestorReactTag: ?number,

Просмотреть файл

@ -49,6 +49,7 @@ module.exports = [
'setLayoutAnimationEnabledExperimental',
'showPopupMenu',
'updateView',
'viewIsDescendantOf',
'PopupMenu',
'LazyViewManagersEnabled',
'ViewManagerNames',