mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Import latest css-layout
Summary: Import latest master from css-layout. This includes the following pull requests: https://github.com/facebook/css-layout/pull/192 https://github.com/facebook/css-layout/pull/193 https://github.com/facebook/css-layout/pull/195 https://github.com/facebook/css-layout/pull/196 Reviewed By: javache Differential Revision: D3411535 fbshipit-source-id: 95bee9bd0282f98f6fafa15335b910b644395ad3
This commit is contained in:
committed by
Facebook Github Bot 2
parent
97cfacb5ba
commit
8afcaa36e6
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
// NOTE: this file is auto-copied from https://github.com/facebook/css-layout
|
||||
// @generated SignedSource<<4ed6ae4c11cdd41f5db380e3b9a06f23>>
|
||||
// @generated SignedSource<<af6ef8054f37d4745903e857b95fe01f>>
|
||||
|
||||
package com.facebook.csslayout;
|
||||
|
||||
@@ -20,7 +20,7 @@ public class CSSLayout {
|
||||
// This value was chosen based on empiracle data. Even the most complicated
|
||||
// layouts should not require more than 16 entries to fit within the cache.
|
||||
public static final int MAX_CACHED_RESULT_COUNT = 16;
|
||||
|
||||
|
||||
public static final int POSITION_LEFT = 0;
|
||||
public static final int POSITION_TOP = 1;
|
||||
public static final int POSITION_RIGHT = 2;
|
||||
@@ -32,36 +32,36 @@ public class CSSLayout {
|
||||
public float[] position = new float[4];
|
||||
public float[] dimensions = new float[2];
|
||||
public CSSDirection direction = CSSDirection.LTR;
|
||||
|
||||
|
||||
public float flexBasis;
|
||||
|
||||
|
||||
public int generationCount;
|
||||
public CSSDirection lastParentDirection;
|
||||
|
||||
|
||||
public int nextCachedMeasurementsIndex;
|
||||
public CSSCachedMeasurement[] cachedMeasurements = new CSSCachedMeasurement[MAX_CACHED_RESULT_COUNT];
|
||||
public float[] measuredDimensions = new float[2];
|
||||
|
||||
|
||||
public CSSCachedMeasurement cachedLayout = new CSSCachedMeasurement();
|
||||
|
||||
|
||||
CSSLayout() {
|
||||
resetResult();
|
||||
}
|
||||
|
||||
|
||||
public void resetResult() {
|
||||
Arrays.fill(position, 0);
|
||||
Arrays.fill(dimensions, CSSConstants.UNDEFINED);
|
||||
direction = CSSDirection.LTR;
|
||||
|
||||
|
||||
flexBasis = 0;
|
||||
|
||||
|
||||
generationCount = 0;
|
||||
lastParentDirection = null;
|
||||
|
||||
|
||||
nextCachedMeasurementsIndex = 0;
|
||||
measuredDimensions[DIMENSION_WIDTH] = CSSConstants.UNDEFINED;
|
||||
measuredDimensions[DIMENSION_HEIGHT] = CSSConstants.UNDEFINED;
|
||||
|
||||
|
||||
cachedLayout.widthMeasureMode = null;
|
||||
cachedLayout.heightMeasureMode = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user