Added feature to use rounded values

Summary:
Added an experimental feature to allow to use only rounded values. See #184. It's not a perfect solution and definitely  can be further improved. I'm looking forward to your ideas.
Closes https://github.com/facebook/css-layout/pull/256

Reviewed By: splhack

Differential Revision: D4214168

Pulled By: emilsjolander

fbshipit-source-id: 6293352d479b7b4dad258eb3f9e0afaa11cf7236
This commit is contained in:
Lukas Woehrl
2016-11-22 05:33:36 -08:00
committed by Facebook Github Bot
parent d54f09e32b
commit b90f6e21bd
7 changed files with 890 additions and 6 deletions

View File

@@ -10,7 +10,8 @@
package com.facebook.csslayout;
public enum CSSExperimentalFeature {
__EMPTY(-1);
ROUNDING(0);
private int mIntValue;
CSSExperimentalFeature(int intValue) {
@@ -23,6 +24,7 @@ __EMPTY(-1);
public static CSSExperimentalFeature fromInt(int value) {
switch (value) {
case 0: return ROUNDING;
default: throw new IllegalArgumentException("Unkown enum value: " + value);
}
}