Files
yoga/java/com/facebook/csslayout/CSSExperimentalFeature.java
Emil Sjolander a0d560a24b Fixup recent fix to flex basis and put it behind an experimental flag
Summary: D4207106 previously fixed an issue where the computed flex basis was cached in between layout calculations, potentially caching wrong values. After landing we noticed that some product were implicitly relying on this behavior so this diff instead puts that behind a feature flag.

Reviewed By: gkassabli

Differential Revision: D4222910

fbshipit-source-id: d693482441fcc4d37a288e2e3529057a04f60541
2016-11-23 05:37:32 -08:00

34 lines
811 B
Java

/**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
package com.facebook.csslayout;
public enum CSSExperimentalFeature {
ROUNDING(0),
WEB_FLEX_BASIS(1);
private int mIntValue;
CSSExperimentalFeature(int intValue) {
mIntValue = intValue;
}
public int intValue() {
return mIntValue;
}
public static CSSExperimentalFeature fromInt(int value) {
switch (value) {
case 0: return ROUNDING;
case 1: return WEB_FLEX_BASIS;
default: throw new IllegalArgumentException("Unkown enum value: " + value);
}
}
}