passing height to the measure function

This diff:
* adds height as another parameter passed to the measure function, computed the same way width is
* adds tests for this extension, which has involved adding a new measure function to all of js, c, java and c# tests
This commit is contained in:
Martin Kralik
2015-11-17 18:50:42 +00:00
parent 53769ccbc5
commit f2aa5ba604
29 changed files with 1139 additions and 294 deletions

View File

@@ -53,7 +53,7 @@ public class CSSNode {
*
* NB: measure is NOT guaranteed to be threadsafe/re-entrant safe!
*/
public void measure(CSSNode node, float width, MeasureOutput measureOutput);
public void measure(CSSNode node, float width, float height, MeasureOutput measureOutput);
}
// VisibleForTesting
@@ -125,13 +125,13 @@ public class CSSNode {
return mMeasureFunction != null;
}
/*package*/ MeasureOutput measure(MeasureOutput measureOutput, float width) {
/*package*/ MeasureOutput measure(MeasureOutput measureOutput, float width, float height) {
if (!isMeasureDefined()) {
throw new RuntimeException("Measure function isn't defined!");
}
measureOutput.height = CSSConstants.UNDEFINED;
measureOutput.width = CSSConstants.UNDEFINED;
Assertions.assertNotNull(mMeasureFunction).measure(this, width, measureOutput);
Assertions.assertNotNull(mMeasureFunction).measure(this, width, height, measureOutput);
return measureOutput;
}
@@ -140,7 +140,7 @@ public class CSSNode {
*/
public void calculateLayout(CSSLayoutContext layoutContext) {
layout.resetResult();
LayoutEngine.layoutNode(layoutContext, this, CSSConstants.UNDEFINED, null);
LayoutEngine.layoutNode(layoutContext, this, CSSConstants.UNDEFINED, CSSConstants.UNDEFINED, null);
}
/**

View File

@@ -18,4 +18,5 @@ public class CachedCSSLayout extends CSSLayout {
public float requestedWidth = CSSConstants.UNDEFINED;
public float requestedHeight = CSSConstants.UNDEFINED;
public float parentMaxWidth = CSSConstants.UNDEFINED;
public float parentMaxHeight = CSSConstants.UNDEFINED;
}

View File

@@ -16,7 +16,7 @@ import static com.facebook.csslayout.CSSLayout.POSITION_RIGHT;
import static com.facebook.csslayout.CSSLayout.POSITION_TOP;
/**
* Calculates layouts based on CSS style. See {@link #layoutNode(CSSNode, float)}.
* Calculates layouts based on CSS style. See {@link #layoutNode(CSSNode, float, float)}.
*/
public class LayoutEngine {
@@ -106,7 +106,7 @@ public class LayoutEngine {
return;
}
// We only run if there's a width or height defined
if (Float.isNaN(node.style.dimensions[dim[axis]]) ||
if (Float.isNaN(node.style.dimensions[dim[axis]]) ||
node.style.dimensions[dim[axis]] <= 0.0) {
return;
}
@@ -180,7 +180,7 @@ public class LayoutEngine {
return node.isMeasureDefined();
}
static boolean needsRelayout(CSSNode node, float parentMaxWidth) {
static boolean needsRelayout(CSSNode node, float parentMaxWidth, float parentMaxHeight) {
return node.isDirty() ||
!FloatUtil.floatsEqual(
node.lastLayout.requestedHeight,
@@ -188,20 +188,23 @@ public class LayoutEngine {
!FloatUtil.floatsEqual(
node.lastLayout.requestedWidth,
node.layout.dimensions[DIMENSION_WIDTH]) ||
!FloatUtil.floatsEqual(node.lastLayout.parentMaxWidth, parentMaxWidth);
!FloatUtil.floatsEqual(node.lastLayout.parentMaxWidth, parentMaxWidth) ||
!FloatUtil.floatsEqual(node.lastLayout.parentMaxHeight, parentMaxHeight);
}
/*package*/ static void layoutNode(
CSSLayoutContext layoutContext,
CSSNode node,
float parentMaxWidth,
float parentMaxHeight,
CSSDirection parentDirection) {
if (needsRelayout(node, parentMaxWidth)) {
if (needsRelayout(node, parentMaxWidth, parentMaxHeight)) {
node.lastLayout.requestedWidth = node.layout.dimensions[DIMENSION_WIDTH];
node.lastLayout.requestedHeight = node.layout.dimensions[DIMENSION_HEIGHT];
node.lastLayout.parentMaxWidth = parentMaxWidth;
node.lastLayout.parentMaxHeight = parentMaxHeight;
layoutNodeImpl(layoutContext, node, parentMaxWidth, parentDirection);
layoutNodeImpl(layoutContext, node, parentMaxWidth, parentMaxHeight, parentDirection);
node.lastLayout.copy(node.layout);
} else {
node.layout.copy(node.lastLayout);
@@ -214,6 +217,7 @@ public class LayoutEngine {
CSSLayoutContext layoutContext,
CSSNode node,
float parentMaxWidth,
float parentMaxHeight,
CSSDirection parentDirection) {
for (int i = 0, childCount = node.getChildCount(); i < childCount; i++) {
node.getChildAt(i).layout.resetResult();
@@ -248,6 +252,7 @@ public class LayoutEngine {
// invocations during the layout calculation.
int childCount = node.getChildCount();
float paddingAndBorderAxisResolvedRow = ((node.style.padding.getWithFallback(leadingSpacing[resolvedRowAxis], leading[resolvedRowAxis]) + node.style.border.getWithFallback(leadingSpacing[resolvedRowAxis], leading[resolvedRowAxis])) + (node.style.padding.getWithFallback(trailingSpacing[resolvedRowAxis], trailing[resolvedRowAxis]) + node.style.border.getWithFallback(trailingSpacing[resolvedRowAxis], trailing[resolvedRowAxis])));
float paddingAndBorderAxisColumn = ((node.style.padding.getWithFallback(leadingSpacing[CSS_FLEX_DIRECTION_COLUMN], leading[CSS_FLEX_DIRECTION_COLUMN]) + node.style.border.getWithFallback(leadingSpacing[CSS_FLEX_DIRECTION_COLUMN], leading[CSS_FLEX_DIRECTION_COLUMN])) + (node.style.padding.getWithFallback(trailingSpacing[CSS_FLEX_DIRECTION_COLUMN], trailing[CSS_FLEX_DIRECTION_COLUMN]) + node.style.border.getWithFallback(trailingSpacing[CSS_FLEX_DIRECTION_COLUMN], trailing[CSS_FLEX_DIRECTION_COLUMN])));
if (isMeasureDefined(node)) {
boolean isResolvedRowDimDefined = !Float.isNaN(node.layout.dimensions[dim[resolvedRowAxis]]);
@@ -263,6 +268,17 @@ public class LayoutEngine {
}
width -= paddingAndBorderAxisResolvedRow;
float height = CSSConstants.UNDEFINED;
if ((!Float.isNaN(node.style.dimensions[dim[CSS_FLEX_DIRECTION_COLUMN]]) && node.style.dimensions[dim[CSS_FLEX_DIRECTION_COLUMN]] >= 0.0)) {
height = node.style.dimensions[DIMENSION_HEIGHT];
} else if (!Float.isNaN(node.layout.dimensions[dim[CSS_FLEX_DIRECTION_COLUMN]])) {
height = node.layout.dimensions[dim[CSS_FLEX_DIRECTION_COLUMN]];
} else {
height = parentMaxHeight -
(node.style.margin.getWithFallback(leadingSpacing[resolvedRowAxis], leading[resolvedRowAxis]) + node.style.margin.getWithFallback(trailingSpacing[resolvedRowAxis], trailing[resolvedRowAxis]));
}
height -= ((node.style.padding.getWithFallback(leadingSpacing[CSS_FLEX_DIRECTION_COLUMN], leading[CSS_FLEX_DIRECTION_COLUMN]) + node.style.border.getWithFallback(leadingSpacing[CSS_FLEX_DIRECTION_COLUMN], leading[CSS_FLEX_DIRECTION_COLUMN])) + (node.style.padding.getWithFallback(trailingSpacing[CSS_FLEX_DIRECTION_COLUMN], trailing[CSS_FLEX_DIRECTION_COLUMN]) + node.style.border.getWithFallback(trailingSpacing[CSS_FLEX_DIRECTION_COLUMN], trailing[CSS_FLEX_DIRECTION_COLUMN])));
// We only need to give a dimension for the text if we haven't got any
// for it computed yet. It can either be from the style attribute or because
// the element is flexible.
@@ -275,7 +291,8 @@ public class LayoutEngine {
MeasureOutput measureDim = node.measure(
layoutContext.measureOutput,
width
width,
height
);
if (isRowUndefined) {
node.layout.dimensions[DIMENSION_WIDTH] = measureDim.width +
@@ -283,7 +300,7 @@ public class LayoutEngine {
}
if (isColumnUndefined) {
node.layout.dimensions[DIMENSION_HEIGHT] = measureDim.height +
((node.style.padding.getWithFallback(leadingSpacing[CSS_FLEX_DIRECTION_COLUMN], leading[CSS_FLEX_DIRECTION_COLUMN]) + node.style.border.getWithFallback(leadingSpacing[CSS_FLEX_DIRECTION_COLUMN], leading[CSS_FLEX_DIRECTION_COLUMN])) + (node.style.padding.getWithFallback(trailingSpacing[CSS_FLEX_DIRECTION_COLUMN], trailing[CSS_FLEX_DIRECTION_COLUMN]) + node.style.border.getWithFallback(trailingSpacing[CSS_FLEX_DIRECTION_COLUMN], trailing[CSS_FLEX_DIRECTION_COLUMN])));
paddingAndBorderAxisColumn;
}
}
if (childCount == 0) {
@@ -364,6 +381,7 @@ public class LayoutEngine {
float crossDim = 0;
float maxWidth;
float maxHeight;
for (i = startLine; i < childCount; ++i) {
child = node.getChildAt(i);
child.lineIndex = linesCount;
@@ -444,6 +462,8 @@ public class LayoutEngine {
} else {
maxWidth = CSSConstants.UNDEFINED;
maxHeight = CSSConstants.UNDEFINED;
if (!isMainRowDirection) {
if ((!Float.isNaN(node.style.dimensions[dim[resolvedRowAxis]]) && node.style.dimensions[dim[resolvedRowAxis]] >= 0.0)) {
maxWidth = node.layout.dimensions[dim[resolvedRowAxis]] -
@@ -453,11 +473,20 @@ public class LayoutEngine {
(node.style.margin.getWithFallback(leadingSpacing[resolvedRowAxis], leading[resolvedRowAxis]) + node.style.margin.getWithFallback(trailingSpacing[resolvedRowAxis], trailing[resolvedRowAxis])) -
paddingAndBorderAxisResolvedRow;
}
} else {
if ((!Float.isNaN(node.style.dimensions[dim[CSS_FLEX_DIRECTION_COLUMN]]) && node.style.dimensions[dim[CSS_FLEX_DIRECTION_COLUMN]] >= 0.0)) {
maxHeight = node.layout.dimensions[dim[CSS_FLEX_DIRECTION_COLUMN]] -
paddingAndBorderAxisColumn;
} else {
maxHeight = parentMaxHeight -
(node.style.margin.getWithFallback(leadingSpacing[CSS_FLEX_DIRECTION_COLUMN], leading[CSS_FLEX_DIRECTION_COLUMN]) + node.style.margin.getWithFallback(trailingSpacing[CSS_FLEX_DIRECTION_COLUMN], trailing[CSS_FLEX_DIRECTION_COLUMN])) -
paddingAndBorderAxisColumn;
}
}
// This is the main recursive call. We layout non flexible children.
if (alreadyComputedNextLayout == 0) {
layoutNode(layoutContext, child, maxWidth, direction);
layoutNode(layoutContext, child, maxWidth, maxHeight, direction);
}
// Absolute positioned elements do not take part of the layout, so we
@@ -587,9 +616,18 @@ public class LayoutEngine {
(node.style.margin.getWithFallback(leadingSpacing[resolvedRowAxis], leading[resolvedRowAxis]) + node.style.margin.getWithFallback(trailingSpacing[resolvedRowAxis], trailing[resolvedRowAxis])) -
paddingAndBorderAxisResolvedRow;
}
maxHeight = CSSConstants.UNDEFINED;
if ((!Float.isNaN(node.style.dimensions[dim[CSS_FLEX_DIRECTION_COLUMN]]) && node.style.dimensions[dim[CSS_FLEX_DIRECTION_COLUMN]] >= 0.0)) {
maxHeight = node.layout.dimensions[dim[CSS_FLEX_DIRECTION_COLUMN]] -
paddingAndBorderAxisColumn;
} else if (isMainRowDirection) {
maxHeight = parentMaxHeight -
(node.style.margin.getWithFallback(leadingSpacing[CSS_FLEX_DIRECTION_COLUMN], leading[CSS_FLEX_DIRECTION_COLUMN]) + node.style.margin.getWithFallback(trailingSpacing[CSS_FLEX_DIRECTION_COLUMN], trailing[CSS_FLEX_DIRECTION_COLUMN])) -
paddingAndBorderAxisColumn;
}
// And we recursively call the layout algorithm for this child
layoutNode(layoutContext, currentFlexChild, maxWidth, direction);
layoutNode(layoutContext, currentFlexChild, maxWidth, maxHeight, direction);
child = currentFlexChild;
currentFlexChild = currentFlexChild.nextFlexChild;

View File

@@ -223,7 +223,7 @@ public class LayoutCachingTest {
c1.setMeasureFunction(new CSSNode.MeasureFunction() {
@Override
public void measure(CSSNode node, float width, MeasureOutput measureOutput) {
public void measure(CSSNode node, float width, float height, MeasureOutput measureOutput) {
measureOutput.width = 100;
measureOutput.height = 20;
}

View File

@@ -27,20 +27,33 @@ public class LayoutEngineTest {
new CSSNode.MeasureFunction() {
@Override
public void measure(CSSNode node, float width, MeasureOutput measureOutput) {
if (CSSConstants.isUndefined(width)) {
width = 10000000;
}
public void measure(CSSNode node, float width, float height, MeasureOutput measureOutput) {
TestCSSNode testNode = (TestCSSNode) node;
if (testNode.context.equals(TestConstants.SMALL_TEXT)) {
if (CSSConstants.isUndefined(width)) {
width = 10000000;
}
measureOutput.width = Math.min(width, TestConstants.SMALL_WIDTH);
measureOutput.height = TestConstants.SMALL_HEIGHT;
} else if (testNode.context.equals(TestConstants.LONG_TEXT)) {
if (CSSConstants.isUndefined(width)) {
width = 10000000;
}
measureOutput.width = width >= TestConstants.BIG_WIDTH ?
TestConstants.BIG_WIDTH : Math.max(TestConstants.BIG_MIN_WIDTH, width);
measureOutput.height = width >= TestConstants.BIG_WIDTH ?
TestConstants.SMALL_HEIGHT : TestConstants.BIG_HEIGHT;
} else if (testNode.context.equals(TestConstants.MEASURE_WITH_RATIO_2)) {
if (width > 0) {
measureOutput.width = width;
measureOutput.height = width * 2;
} else if (height > 0) {
measureOutput.width = height * 2;
measureOutput.height = height;
} else {
measureOutput.width = 99999;
measureOutput.height = 99999;
}
} else {
throw new RuntimeException("Got unknown test: " + testNode.context);
}
@@ -4246,6 +4259,168 @@ public class LayoutEngineTest {
@Test
public void testCase95()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.dimensions[DIMENSION_WIDTH] = 100;
node_0.setMeasureFunction(sTestMeasureFunction);
node_0.context = "measureWithRatio2";
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 100;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 200;
}
test("should layout node with fixed width and custom measure function", root_node, root_layout);
}
@Test
public void testCase96()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.dimensions[DIMENSION_HEIGHT] = 100;
node_0.setMeasureFunction(sTestMeasureFunction);
node_0.context = "measureWithRatio2";
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 200;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 100;
}
test("should layout node with fixed height and custom measure function", root_node, root_layout);
}
@Test
public void testCase97()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.dimensions[DIMENSION_WIDTH] = 100;
node_0.style.dimensions[DIMENSION_HEIGHT] = 100;
node_0.setMeasureFunction(sTestMeasureFunction);
node_0.context = "measureWithRatio2";
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 100;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 100;
}
test("should layout node with fixed height and fixed width, ignoring custom measure function", root_node, root_layout);
}
@Test
public void testCase98()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.setMeasureFunction(sTestMeasureFunction);
node_0.context = "measureWithRatio2";
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 99999;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 99999;
}
test("should layout node with no fixed dimension and custom measure function", root_node, root_layout);
}
@Test
public void testCase99()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.flexDirection = CSSFlexDirection.COLUMN;
node_0.style.dimensions[DIMENSION_WIDTH] = 320;
addChildren(node_0, 2);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.setMeasureFunction(sTestMeasureFunction);
node_1.context = "measureWithRatio2";
node_1 = node_0.getChildAt(1);
node_1.style.flexDirection = CSSFlexDirection.ROW;
node_1.style.dimensions[DIMENSION_HEIGHT] = 100;
addChildren(node_1, 2);
{
TestCSSNode node_2;
node_2 = node_1.getChildAt(0);
node_2.setMeasureFunction(sTestMeasureFunction);
node_2.context = "measureWithRatio2";
node_2 = node_1.getChildAt(1);
node_2.setMeasureFunction(sTestMeasureFunction);
node_2.context = "measureWithRatio2";
}
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 320;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 740;
addChildren(node_0, 2);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 320;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 640;
node_1 = node_0.getChildAt(1);
node_1.layout.position[POSITION_TOP] = 640;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 320;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 100;
addChildren(node_1, 2);
{
TestCSSNode node_2;
node_2 = node_1.getChildAt(0);
node_2.layout.position[POSITION_TOP] = 0;
node_2.layout.position[POSITION_LEFT] = 0;
node_2.layout.dimensions[DIMENSION_WIDTH] = 200;
node_2.layout.dimensions[DIMENSION_HEIGHT] = 100;
node_2 = node_1.getChildAt(1);
node_2.layout.position[POSITION_TOP] = 0;
node_2.layout.position[POSITION_LEFT] = 200;
node_2.layout.dimensions[DIMENSION_WIDTH] = 200;
node_2.layout.dimensions[DIMENSION_HEIGHT] = 100;
}
}
}
test("should layout node with nested stacks and custom measure function", root_node, root_layout);
}
@Test
public void testCase100()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4268,7 +4443,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase96()
public void testCase101()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4290,7 +4465,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase97()
public void testCase102()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4341,7 +4516,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase98()
public void testCase103()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4394,7 +4569,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase99()
public void testCase104()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4448,7 +4623,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase100()
public void testCase105()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4501,7 +4676,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase101()
public void testCase106()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4555,7 +4730,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase102()
public void testCase107()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4594,7 +4769,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase103()
public void testCase108()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4659,7 +4834,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase104()
public void testCase109()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4702,7 +4877,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase105()
public void testCase110()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4746,7 +4921,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase106()
public void testCase111()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4784,7 +4959,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase107()
public void testCase112()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4823,7 +4998,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase108()
public void testCase113()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4881,7 +5056,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase109()
public void testCase114()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4940,7 +5115,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase110()
public void testCase115()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -4997,7 +5172,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase111()
public void testCase116()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5038,7 +5213,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase112()
public void testCase117()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5085,7 +5260,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase113()
public void testCase118()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5133,7 +5308,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase114()
public void testCase119()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5181,7 +5356,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase115()
public void testCase120()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5226,7 +5401,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase116()
public void testCase121()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5264,7 +5439,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase117()
public void testCase122()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5322,7 +5497,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase118()
public void testCase123()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5359,7 +5534,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase119()
public void testCase124()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5396,7 +5571,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase120()
public void testCase125()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5434,7 +5609,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase121()
public void testCase126()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5472,7 +5647,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase122()
public void testCase127()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5509,7 +5684,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase123()
public void testCase128()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5546,7 +5721,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase124()
public void testCase129()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5582,7 +5757,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase125()
public void testCase130()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5618,7 +5793,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase126()
public void testCase131()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5654,7 +5829,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase127()
public void testCase132()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5690,7 +5865,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase128()
public void testCase133()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5740,7 +5915,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase129()
public void testCase134()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5795,7 +5970,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase130()
public void testCase135()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5851,7 +6026,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase131()
public void testCase136()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5895,7 +6070,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase132()
public void testCase137()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5919,7 +6094,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase133()
public void testCase138()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5943,7 +6118,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase134()
public void testCase139()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5969,7 +6144,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase135()
public void testCase140()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -5995,7 +6170,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase136()
public void testCase141()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6019,7 +6194,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase137()
public void testCase142()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6043,7 +6218,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase138()
public void testCase143()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6069,7 +6244,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase139()
public void testCase144()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6095,7 +6270,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase140()
public void testCase145()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6148,7 +6323,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase141()
public void testCase146()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6202,7 +6377,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase142()
public void testCase147()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6256,7 +6431,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase143()
public void testCase148()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6311,7 +6486,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase144()
public void testCase149()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6364,7 +6539,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase145()
public void testCase150()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6418,7 +6593,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase146()
public void testCase151()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6473,7 +6648,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase147()
public void testCase152()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6529,7 +6704,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase148()
public void testCase153()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6584,7 +6759,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase149()
public void testCase154()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6640,7 +6815,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase150()
public void testCase155()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6679,7 +6854,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase151()
public void testCase156()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6717,7 +6892,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase152()
public void testCase157()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6755,7 +6930,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase153()
public void testCase158()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6803,7 +6978,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase154()
public void testCase159()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6849,7 +7024,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase155()
public void testCase160()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6895,7 +7070,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase156()
public void testCase161()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6936,7 +7111,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase157()
public void testCase162()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -6975,7 +7150,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase158()
public void testCase163()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7014,7 +7189,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase159()
public void testCase164()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7053,7 +7228,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase160()
public void testCase165()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7093,7 +7268,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase161()
public void testCase166()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7136,7 +7311,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase162()
public void testCase167()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7179,7 +7354,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase163()
public void testCase168()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7245,7 +7420,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase164()
public void testCase169()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7317,7 +7492,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase165()
public void testCase170()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7379,7 +7554,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase166()
public void testCase171()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7473,7 +7648,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase167()
public void testCase172()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7554,7 +7729,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase168()
public void testCase173()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7594,7 +7769,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase169()
public void testCase174()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7634,7 +7809,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase170()
public void testCase175()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7674,7 +7849,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase171()
public void testCase176()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7712,7 +7887,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase172()
public void testCase177()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7751,7 +7926,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase173()
public void testCase178()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7789,7 +7964,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase174()
public void testCase179()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7828,7 +8003,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase175()
public void testCase180()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7866,7 +8041,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase176()
public void testCase181()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7905,7 +8080,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase177()
public void testCase182()
{
TestCSSNode root_node = new TestCSSNode();
{
@@ -7941,7 +8116,7 @@ public class LayoutEngineTest {
}
@Test
public void testCase178()
public void testCase183()
{
TestCSSNode root_node = new TestCSSNode();
{

View File

@@ -21,5 +21,6 @@ public class TestConstants {
public static final float BIG_MIN_WIDTH = 100f;
public static final String SMALL_TEXT = "small";
public static final String LONG_TEXT = "loooooooooong with space";
public static final String MEASURE_WITH_RATIO_2 = "measureWithRatio2";
/** END_GENERATED **/
}