import latest changes from github

Differential Revision: D2536028

fb-gh-sync-id: 2d28b10f06b4ab3a9113b7870e58faf6debba9b6
This commit is contained in:
Felix Oghină
2015-10-13 06:45:18 -07:00
committed by facebook-github-bot-5
parent c73ceff914
commit b721c12516
7 changed files with 180 additions and 134 deletions
@@ -7,12 +7,14 @@
*/
// NOTE: this file is auto-copied from https://github.com/facebook/css-layout
// @generated SignedSource<<fcf3439e46c4c76e42357c348a9ffe99>>
// @generated SignedSource<<3177826257fea8b5ac1fc9d1d514935a>>
package com.facebook.csslayout;
import javax.annotation.Nullable;
import java.util.Arrays;
/**
* Class representing CSS spacing (padding, margin, and borders). This is mostly necessary to
* properly implement interactions and updates for properties like margin, marginLeft, and
@@ -164,6 +166,17 @@ public class Spacing {
return mSpacing[spacingType];
}
/**
* Resets the spacing instance to its default state. This method is meant to be used when
* recycling {@link Spacing} instances.
*/
void reset() {
Arrays.fill(mSpacing, CSSConstants.UNDEFINED);
mDefaultSpacing = null;
mHasAliasesSet = false;
mValueFlags = 0;
}
/**
* Try to get start value and fallback to given type if not defined. This is used privately
* by the layout engine as a more efficient way to fetch direction-aware values by