Java bindings for setAlwaysFormsContainingBlock (#1540)
Summary: X-link: https://github.com/facebook/react-native/pull/42192 Pull Request resolved: https://github.com/facebook/yoga/pull/1540 tsia Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D52608259 fbshipit-source-id: 647ec4e2fe180ace8d6b641e17cd610fa53fe845
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5425107246
commit
47e9f33eb4
@@ -114,4 +114,5 @@ public class YogaNative {
|
||||
static native void jni_YGNodePrintJNI(long nativePointer);
|
||||
static native void jni_YGNodeSetStyleInputsJNI(long nativePointer, float[] styleInputsArray, int size);
|
||||
static native long jni_YGNodeCloneJNI(long nativePointer);
|
||||
static native void jni_YGNodeSetAlwaysFormsContainingBlockJNI(long nativePointer, boolean alwaysFormContainingBlock);
|
||||
}
|
||||
|
@@ -226,4 +226,6 @@ public abstract class YogaNode implements YogaProps {
|
||||
public abstract YogaNode cloneWithoutChildren();
|
||||
|
||||
public abstract YogaNode cloneWithChildren();
|
||||
|
||||
public abstract void setAlwaysFormsContainingBlock(boolean alwaysFormsContainingBlock);
|
||||
}
|
||||
|
@@ -504,6 +504,11 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
YogaNative.jni_YGNodeSetHasMeasureFuncJNI(mNativePointer, measureFunction != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAlwaysFormsContainingBlock(boolean alwaysFormsContainingBlock) {
|
||||
YogaNative.jni_YGNodeSetAlwaysFormsContainingBlockJNI(mNativePointer, alwaysFormsContainingBlock);
|
||||
}
|
||||
|
||||
// Implementation Note: Why this method needs to stay final
|
||||
//
|
||||
// We cache the jmethodid for this method in Yoga code. This means that even if a subclass
|
||||
|
@@ -681,6 +681,15 @@ static void jni_YGNodeSetHasBaselineFuncJNI(
|
||||
hasBaselineFunc ? YGJNIBaselineFunc : nullptr);
|
||||
}
|
||||
|
||||
static void jni_YGNodeSetAlwaysFormsContainingBlockJNI(
|
||||
JNIEnv* /*env*/,
|
||||
jobject /*obj*/,
|
||||
jlong nativePointer,
|
||||
jboolean alwaysFormsContainingBlock) {
|
||||
YGNodeSetAlwaysFormsContainingBlock(
|
||||
_jlong2YGNodeRef(nativePointer), alwaysFormsContainingBlock);
|
||||
}
|
||||
|
||||
static void
|
||||
jni_YGNodePrintJNI(JNIEnv* /*env*/, jobject /*obj*/, jlong nativePointer) {
|
||||
#ifdef DEBUG
|
||||
@@ -958,6 +967,9 @@ static JNINativeMethod methods[] = {
|
||||
{"jni_YGNodeSetHasBaselineFuncJNI",
|
||||
"(JZ)V",
|
||||
(void*)jni_YGNodeSetHasBaselineFuncJNI},
|
||||
{"jni_YGNodeSetAlwaysFormsContainingBlockJNI",
|
||||
"(JZ)V",
|
||||
(void*)jni_YGNodeSetAlwaysFormsContainingBlockJNI},
|
||||
{"jni_YGNodePrintJNI", "(J)V", (void*)jni_YGNodePrintJNI},
|
||||
{"jni_YGNodeCloneJNI", "(J)J", (void*)jni_YGNodeCloneJNI},
|
||||
};
|
||||
|
Reference in New Issue
Block a user