diff --git a/java/com/facebook/yoga/YogaNative.java b/java/com/facebook/yoga/YogaNative.java index 202e4feb..934602d8 100644 --- a/java/com/facebook/yoga/YogaNative.java +++ b/java/com/facebook/yoga/YogaNative.java @@ -40,7 +40,7 @@ public class YogaNative { static native void jni_YGNodeRemoveChildJNI(long nativePointer, long childPointer); static native void jni_YGNodeCalculateLayoutJNI(long nativePointer, float width, float height, long[] nativePointers, YogaNodeJNIBase[] nodes); static native void jni_YGNodeMarkDirtyJNI(long nativePointer); - static native void jni_YGNodeMarkDirtyAndPropogateToDescendantsJNI(long nativePointer); + static native void jni_YGNodeMarkDirtyAndPropagateToDescendantsJNI(long nativePointer); static native boolean jni_YGNodeIsDirtyJNI(long nativePointer); static native void jni_YGNodeCopyStyleJNI(long dstNativePointer, long srcNativePointer); static native int jni_YGNodeStyleGetDirectionJNI(long nativePointer); diff --git a/java/com/facebook/yoga/YogaNodeJNIBase.java b/java/com/facebook/yoga/YogaNodeJNIBase.java index ef432cf1..2420d999 100644 --- a/java/com/facebook/yoga/YogaNodeJNIBase.java +++ b/java/com/facebook/yoga/YogaNodeJNIBase.java @@ -232,7 +232,7 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable { } public void dirtyAllDescendants() { - YogaNative.jni_YGNodeMarkDirtyAndPropogateToDescendantsJNI(mNativePointer); + YogaNative.jni_YGNodeMarkDirtyAndPropagateToDescendantsJNI(mNativePointer); } public boolean isDirty() { diff --git a/java/jni/ScopedGlobalRef.h b/java/jni/ScopedGlobalRef.h index e50a5702..64ca74dc 100644 --- a/java/jni/ScopedGlobalRef.h +++ b/java/jni/ScopedGlobalRef.h @@ -37,7 +37,7 @@ namespace vanillajni { * unexpected conversions or unexpected ownership transfer. In practice, this * class acts as a unique pointer where the underying JNI reference can have one * and just one owner. Transferring ownership is allowed but it is an explicit - * operation (implemneted via move semantics and also via explicity API calls). + * operation (implemented via move semantics and also via explicitly API calls). * * Note that this class doesn't receive an explicit JNIEnv at construction time. * At destruction time it uses vanillajni::getCurrentEnv() to retrieve the diff --git a/java/jni/ScopedLocalRef.h b/java/jni/ScopedLocalRef.h index 9e127db3..56c4d101 100644 --- a/java/jni/ScopedLocalRef.h +++ b/java/jni/ScopedLocalRef.h @@ -39,7 +39,7 @@ namespace vanillajni { * unexpected conversions or unexpected ownership transfer. In practice, this * class acts as a unique pointer where the underying JNI reference can have one * and just one owner. Transferring ownership is allowed but it is an explicit - * operation (implemneted via move semantics and also via explicity API calls). + * operation (implemented via move semantics and also via explicitly API calls). * * As with standard JNI local references it is not a valid operation to keep a * reference around between different native method calls. diff --git a/java/jni/YGJNIVanilla.cpp b/java/jni/YGJNIVanilla.cpp index 88608324..b6ef83be 100644 --- a/java/jni/YGJNIVanilla.cpp +++ b/java/jni/YGJNIVanilla.cpp @@ -389,11 +389,11 @@ static void jni_YGNodeMarkDirtyJNI( YGNodeMarkDirty(_jlong2YGNodeRef(nativePointer)); } -static void jni_YGNodeMarkDirtyAndPropogateToDescendantsJNI( +static void jni_YGNodeMarkDirtyAndPropagateToDescendantsJNI( JNIEnv* env, jobject obj, jlong nativePointer) { - YGNodeMarkDirtyAndPropogateToDescendants(_jlong2YGNodeRef(nativePointer)); + YGNodeMarkDirtyAndPropagateToDescendants(_jlong2YGNodeRef(nativePointer)); } static jboolean jni_YGNodeIsDirtyJNI( @@ -785,9 +785,9 @@ static JNINativeMethod methods[] = { "(JFF[J[Lcom/facebook/yoga/YogaNodeJNIBase;)V", (void*) jni_YGNodeCalculateLayoutJNI}, {"jni_YGNodeMarkDirtyJNI", "(J)V", (void*) jni_YGNodeMarkDirtyJNI}, - {"jni_YGNodeMarkDirtyAndPropogateToDescendantsJNI", + {"jni_YGNodeMarkDirtyAndPropagateToDescendantsJNI", "(J)V", - (void*) jni_YGNodeMarkDirtyAndPropogateToDescendantsJNI}, + (void*) jni_YGNodeMarkDirtyAndPropagateToDescendantsJNI}, {"jni_YGNodeIsDirtyJNI", "(J)Z", (void*) jni_YGNodeIsDirtyJNI}, {"jni_YGNodeCopyStyleJNI", "(JJ)V", (void*) jni_YGNodeCopyStyleJNI}, {"jni_YGNodeStyleGetDirectionJNI", diff --git a/tests/YGDirtiedTest.cpp b/tests/YGDirtiedTest.cpp index 75da4c33..c3e07851 100644 --- a/tests/YGDirtiedTest.cpp +++ b/tests/YGDirtiedTest.cpp @@ -61,11 +61,11 @@ TEST(YogaTest, dirtied_propagation) { ASSERT_EQ(0, dirtiedCount); // `_dirtied` MUST be called for the first time. - root_child0->markDirtyAndPropogate(); + root_child0->markDirtyAndPropagate(); ASSERT_EQ(1, dirtiedCount); // `_dirtied` must NOT be called for the second time. - root_child0->markDirtyAndPropogate(); + root_child0->markDirtyAndPropagate(); ASSERT_EQ(1, dirtiedCount); } @@ -94,14 +94,14 @@ TEST(YogaTest, dirtied_hierarchy) { ASSERT_EQ(0, dirtiedCount); // `_dirtied` must NOT be called for descendants. - root->markDirtyAndPropogate(); + root->markDirtyAndPropagate(); ASSERT_EQ(0, dirtiedCount); // `_dirtied` must NOT be called for the sibling node. - root_child1->markDirtyAndPropogate(); + root_child1->markDirtyAndPropagate(); ASSERT_EQ(0, dirtiedCount); // `_dirtied` MUST be called in case of explicit dirtying. - root_child0->markDirtyAndPropogate(); + root_child0->markDirtyAndPropagate(); ASSERT_EQ(1, dirtiedCount); } diff --git a/yoga/Utils.h b/yoga/Utils.h index 52a0954b..82867a57 100644 --- a/yoga/Utils.h +++ b/yoga/Utils.h @@ -27,10 +27,10 @@ // the remaining space left for the flexible children. // // - totalFlexGrowFactors: total flex grow factors of flex items which are to be -// layed in the current line +// laid in the current line // // - totalFlexShrinkFactors: total flex shrink factors of flex items which are -// to be layed in the current line +// to be laid in the current line // // - endOfLineIndex: Its the end index of the last flex item which was examined // and it may or may not be part of the current line(as it may be absolutely diff --git a/yoga/YGMacros.h b/yoga/YGMacros.h index ee143c29..a73f2e73 100644 --- a/yoga/YGMacros.h +++ b/yoga/YGMacros.h @@ -32,7 +32,7 @@ #ifdef NS_ENUM // Cannot use NSInteger as NSInteger has a different size than int (which is the // default type of a enum). Therefor when linking the Yoga C library into obj-c -// the header is a missmatch for the Yoga ABI. +// the header is a mismatch for the Yoga ABI. #define YG_ENUM_BEGIN(name) NS_ENUM(int, name) #define YG_ENUM_END(name) #else diff --git a/yoga/YGNode.cpp b/yoga/YGNode.cpp index 24e68b05..b4dbf2ed 100644 --- a/yoga/YGNode.cpp +++ b/yoga/YGNode.cpp @@ -448,20 +448,20 @@ void YGNode::cloneChildrenIfNeeded(void* cloneContext) { iterChildrenAfterCloningIfNeeded([](YGNodeRef, void*) {}, cloneContext); } -void YGNode::markDirtyAndPropogate() { +void YGNode::markDirtyAndPropagate() { if (!facebook::yoga::detail::getBooleanData(flags, isDirty_)) { setDirty(true); setLayoutComputedFlexBasis(YGFloatOptional()); if (owner_) { - owner_->markDirtyAndPropogate(); + owner_->markDirtyAndPropagate(); } } } -void YGNode::markDirtyAndPropogateDownwards() { +void YGNode::markDirtyAndPropagateDownwards() { facebook::yoga::detail::setBooleanData(flags, isDirty_, true); for_each(children_.begin(), children_.end(), [](YGNodeRef childNode) { - childNode->markDirtyAndPropogateDownwards(); + childNode->markDirtyAndPropagateDownwards(); }); } diff --git a/yoga/YGNode.h b/yoga/YGNode.h index 90bc93dd..3ed2ecdd 100644 --- a/yoga/YGNode.h +++ b/yoga/YGNode.h @@ -327,7 +327,7 @@ public: const float mainSize, const float crossSize, const float ownerWidth); - void markDirtyAndPropogateDownwards(); + void markDirtyAndPropagateDownwards(); // Other methods YGValue marginLeadingValue(const YGFlexDirection axis) const; @@ -345,7 +345,7 @@ public: void removeChild(uint32_t index); void cloneChildrenIfNeeded(void*); - void markDirtyAndPropogate(); + void markDirtyAndPropagate(); float resolveFlexGrow() const; float resolveFlexShrink() const; bool isNodeFlexible(); diff --git a/yoga/YGNodePrint.cpp b/yoga/YGNodePrint.cpp index f45011a7..7e53549c 100644 --- a/yoga/YGNodePrint.cpp +++ b/yoga/YGNodePrint.cpp @@ -28,7 +28,7 @@ static bool areFourValuesEqual(const YGStyle::Edges& four) { YGValueEqual(four[0], four[3]); } -static void appendFormatedString(string& str, const char* fmt, ...) { +static void appendFormattedString(string& str, const char* fmt, ...) { va_list args; va_start(args, fmt); va_list argsCopy; @@ -46,7 +46,7 @@ static void appendFloatOptionalIfDefined( const string key, const YGFloatOptional num) { if (!num.isUndefined()) { - appendFormatedString(base, "%s: %g; ", key.c_str(), num.unwrap()); + appendFormattedString(base, "%s: %g; ", key.c_str(), num.unwrap()); } } @@ -59,7 +59,7 @@ static void appendNumberIfNotUndefined( base.append(key + ": auto; "); } else { string unit = number.unit == YGUnitPoint ? "px" : "%%"; - appendFormatedString( + appendFormattedString( base, "%s: %g%s; ", key.c_str(), number.value, unit.c_str()); } } @@ -121,46 +121,46 @@ void YGNodeToString( YGPrintOptions options, uint32_t level) { indent(str, level); - appendFormatedString(str, "