Use spacing for position

Summary: Use spacing for position in public api. This was already the case internally

Differential Revision: D3690235

fbshipit-source-id: 4c04952e6ded32fd5fbfdccf63736cf025ae470e
This commit is contained in:
Emil Sjolander
2016-08-10 05:08:13 -07:00
committed by Facebook Github Bot 7
parent 7f27046cc5
commit f15b563166
4 changed files with 111 additions and 255 deletions

View File

@@ -19,12 +19,6 @@ import static com.facebook.csslayout.CSSLayout.DIMENSION_HEIGHT;
import static com.facebook.csslayout.CSSLayout.DIMENSION_WIDTH; import static com.facebook.csslayout.CSSLayout.DIMENSION_WIDTH;
import static com.facebook.csslayout.CSSLayout.POSITION_LEFT; import static com.facebook.csslayout.CSSLayout.POSITION_LEFT;
import static com.facebook.csslayout.CSSLayout.POSITION_TOP; import static com.facebook.csslayout.CSSLayout.POSITION_TOP;
import static com.facebook.csslayout.Spacing.BOTTOM;
import static com.facebook.csslayout.Spacing.END;
import static com.facebook.csslayout.Spacing.LEFT;
import static com.facebook.csslayout.Spacing.RIGHT;
import static com.facebook.csslayout.Spacing.START;
import static com.facebook.csslayout.Spacing.TOP;
/** /**
* A CSS Node. It has a style object you can manipulate at {@link #style}. After calling * A CSS Node. It has a style object you can manipulate at {@link #style}. After calling
@@ -414,95 +408,17 @@ public class CSSNode implements CSSNodeAPI<CSSNode> {
* Get this node's position, as defined by style. * Get this node's position, as defined by style.
*/ */
@Override @Override
public Spacing getPositionValue() { public Spacing getPosition() {
return style.position; return style.position;
} }
@Override @Override
public void setPositionValue(int spacingType, float position) { public void setPosition(int spacingType, float position) {
if (style.position.set(spacingType, position)) { if (style.position.set(spacingType, position)) {
dirty(); dirty();
} }
} }
/**
* Get this node's position top, as defined by style.
*/
@Override
public float getPositionTop() {
return style.position.get(TOP);
}
@Override
public void setPositionTop(float positionTop) {
setPositionValue(TOP, positionTop);
}
/**
* Get this node's position bottom, as defined by style.
*/
@Override
public float getPositionBottom() {
return style.position.get(BOTTOM);
}
@Override
public void setPositionBottom(float positionBottom) {
setPositionValue(BOTTOM, positionBottom);
}
/**
* Get this node's position left, as defined by style.
*/
@Override
public float getPositionLeft() {
return style.position.get(LEFT);
}
@Override
public void setPositionLeft(float positionLeft) {
setPositionValue(LEFT, positionLeft);
}
/**
* Get this node's position right, as defined by style.
*/
@Override
public float getPositionRight() {
return style.position.get(RIGHT);
}
@Override
public void setPositionRight(float positionRight) {
setPositionValue(RIGHT, positionRight);
}
/**
* Get this node's position start, as defined by style.
*/
@Override
public float getPositionStart() {
return style.position.get(START);
}
@Override
public void setPositionStart(float positionStart) {
setPositionValue(START, positionStart);
}
/**
* Get this node's position end, as defined by style.
*/
@Override
public float getPositionEnd() {
return style.position.get(END);
}
@Override
public void setPositionEnd(float positionEnd) {
setPositionValue(END, positionEnd);
}
/** /**
* Get this node's width, as defined in the style. * Get this node's width, as defined in the style.
*/ */

View File

@@ -58,20 +58,8 @@ public interface CSSNodeAPI<CSSNodeType extends CSSNodeAPI> {
void setPadding(int spacingType, float padding); void setPadding(int spacingType, float padding);
Spacing getBorder(); Spacing getBorder();
void setBorder(int spacingType, float border); void setBorder(int spacingType, float border);
Spacing getPositionValue(); Spacing getPosition();
void setPositionValue(int spacingType, float position); void setPosition(int spacingType, float position);
float getPositionTop();
void setPositionTop(float positionTop);
float getPositionBottom();
void setPositionBottom(float positionBottom);
float getPositionLeft();
void setPositionLeft(float positionLeft);
float getPositionRight();
void setPositionRight(float positionRight);
float getPositionStart();
void setPositionStart(float positionStart);
float getPositionEnd();
void setPositionEnd(float positionEnd);
float getStyleWidth(); float getStyleWidth();
void setStyleWidth(float width); void setStyleWidth(float width);
float getStyleHeight(); float getStyleHeight();

View File

@@ -488,118 +488,72 @@ public class CSSNodeJNI implements CSSNodeAPI<CSSNodeJNI> {
} }
} }
private native float jni_CSSNodeStyleGetPositionLeft(int nativePointer);
private native float jni_CSSNodeStyleGetPositionTop(int nativePointer);
private native float jni_CSSNodeStyleGetPositionRight(int nativePointer);
private native float jni_CSSNodeStyleGetPositionBottom(int nativePointer);
private native float jni_CSSNodeStyleGetPositionStart(int nativePointer);
private native float jni_CSSNodeStyleGetPositionEnd(int nativePointer);
@Override @Override
public Spacing getPositionValue() { public Spacing getPosition() {
Spacing position = new Spacing(); Spacing position = new Spacing();
position.set(Spacing.LEFT, getPositionLeft()); position.set(Spacing.LEFT, jni_CSSNodeStyleGetPositionLeft(mNativePointer));
position.set(Spacing.TOP, getPositionTop()); position.set(Spacing.TOP, jni_CSSNodeStyleGetPositionTop(mNativePointer));
position.set(Spacing.RIGHT, getPositionRight()); position.set(Spacing.RIGHT, jni_CSSNodeStyleGetPositionRight(mNativePointer));
position.set(Spacing.BOTTOM, getPositionBottom()); position.set(Spacing.BOTTOM, jni_CSSNodeStyleGetPositionBottom(mNativePointer));
position.set(Spacing.START, jni_CSSNodeStyleGetPositionStart(mNativePointer));
position.set(Spacing.END, jni_CSSNodeStyleGetPositionEnd(mNativePointer));
return position; return position;
} }
private native void jni_CSSNodeStyleSetPositionLeft(int nativePointer, float position);
private native void jni_CSSNodeStyleSetPositionTop(int nativePointer, float position);
private native void jni_CSSNodeStyleSetPositionRight(int nativePointer, float position);
private native void jni_CSSNodeStyleSetPositionBottom(int nativePointer, float position);
private native void jni_CSSNodeStyleSetPositionStart(int nativePointer, float position);
private native void jni_CSSNodeStyleSetPositionEnd(int nativePointer, float position);
@Override @Override
public void setPositionValue(int spacingType, float position) { public void setPosition(int spacingType, float position) {
switch (spacingType) { switch (spacingType) {
case Spacing.LEFT: case Spacing.LEFT:
setPositionLeft(position); jni_CSSNodeStyleSetPositionLeft(mNativePointer, position);
break; break;
case Spacing.TOP: case Spacing.TOP:
setPositionTop(position); jni_CSSNodeStyleSetPositionTop(mNativePointer, position);
break; break;
case Spacing.RIGHT: case Spacing.RIGHT:
setPositionRight(position); jni_CSSNodeStyleSetPositionRight(mNativePointer, position);
break; break;
case Spacing.BOTTOM: case Spacing.BOTTOM:
setPositionBottom(position); jni_CSSNodeStyleSetPositionBottom(mNativePointer, position);
break;
case Spacing.START:
jni_CSSNodeStyleSetPositionStart(mNativePointer, position);
break;
case Spacing.END:
jni_CSSNodeStyleSetPositionEnd(mNativePointer, position);
break;
case Spacing.HORIZONTAL:
jni_CSSNodeStyleSetPositionLeft(mNativePointer, position);
jni_CSSNodeStyleSetPositionRight(mNativePointer, position);
jni_CSSNodeStyleSetPositionStart(mNativePointer, position);
jni_CSSNodeStyleSetPositionEnd(mNativePointer, position);
break;
case Spacing.VERTICAL:
jni_CSSNodeStyleSetPositionTop(mNativePointer, position);
jni_CSSNodeStyleSetPositionBottom(mNativePointer, position);
break;
case Spacing.ALL:
jni_CSSNodeStyleSetPositionLeft(mNativePointer, position);
jni_CSSNodeStyleSetPositionRight(mNativePointer, position);
jni_CSSNodeStyleSetPositionStart(mNativePointer, position);
jni_CSSNodeStyleSetPositionEnd(mNativePointer, position);
jni_CSSNodeStyleSetPositionTop(mNativePointer, position);
jni_CSSNodeStyleSetPositionBottom(mNativePointer, position);
break; break;
} }
} }
private native float jni_CSSNodeStyleGetPositionTop(int nativePointer);
@Override
public float getPositionTop() {
assertNativeInstance();
return jni_CSSNodeStyleGetPositionTop(mNativePointer);
}
private native void jni_CSSNodeStyleSetPositionTop(int nativePointer, float positionTop);
@Override
public void setPositionTop(float positionTop) {
assertNativeInstance();
jni_CSSNodeStyleSetPositionTop(mNativePointer, positionTop);
}
private native float jni_CSSNodeStyleGetPositionBottom(int nativePointer);
@Override
public float getPositionBottom() {
assertNativeInstance();
return jni_CSSNodeStyleGetPositionBottom(mNativePointer);
}
private native void jni_CSSNodeStyleSetPositionBottom(int nativePointer, float positionBottom);
@Override
public void setPositionBottom(float positionBottom) {
assertNativeInstance();
jni_CSSNodeStyleSetPositionBottom(mNativePointer, positionBottom);
}
private native float jni_CSSNodeStyleGetPositionLeft(int nativePointer);
@Override
public float getPositionLeft() {
assertNativeInstance();
return jni_CSSNodeStyleGetPositionLeft(mNativePointer);
}
private native void jni_CSSNodeStyleSetPositionLeft(int nativePointer, float positionLeft);
@Override
public void setPositionLeft(float positionLeft) {
assertNativeInstance();
jni_CSSNodeStyleSetPositionLeft(mNativePointer, positionLeft);
}
private native float jni_CSSNodeStyleGetPositionRight(int nativePointer);
@Override
public float getPositionRight() {
assertNativeInstance();
return jni_CSSNodeStyleGetPositionRight(mNativePointer);
}
private native void jni_CSSNodeStyleSetPositionRight(int nativePointer, float positionRight);
@Override
public void setPositionRight(float positionRight) {
assertNativeInstance();
jni_CSSNodeStyleSetPositionRight(mNativePointer, positionRight);
}
private native float jni_CSSNodeStyleGetPositionStart(int nativePointer);
@Override
public float getPositionStart() {
assertNativeInstance();
return jni_CSSNodeStyleGetPositionStart(mNativePointer);
}
private native void jni_CSSNodeStyleSetPositionStart(int nativePointer, float positionStart);
@Override
public void setPositionStart(float positionStart) {
assertNativeInstance();
jni_CSSNodeStyleSetPositionStart(mNativePointer, positionStart);
}
private native float jni_CSSNodeStyleGetPositionEnd(int nativePointer);
@Override
public float getPositionEnd() {
assertNativeInstance();
return jni_CSSNodeStyleGetPositionEnd(mNativePointer);
}
private native void jni_CSSNodeStyleSetPositionEnd(int nativePointer, float positionEnd);
@Override
public void setPositionEnd(float positionEnd) {
assertNativeInstance();
jni_CSSNodeStyleSetPositionEnd(mNativePointer, positionEnd);
}
private native float jni_CSSNodeStyleGetWidth(int nativePointer); private native float jni_CSSNodeStyleGetWidth(int nativePointer);
@Override @Override
public float getStyleWidth() { public float getStyleWidth() {

View File

@@ -14,8 +14,6 @@ import org.junit.Test;
import static com.facebook.csslayout.CSSLayout.POSITION_LEFT; import static com.facebook.csslayout.CSSLayout.POSITION_LEFT;
import static com.facebook.csslayout.CSSLayout.POSITION_TOP; import static com.facebook.csslayout.CSSLayout.POSITION_TOP;
import static com.facebook.csslayout.CSSLayout.POSITION_RIGHT;
import static com.facebook.csslayout.CSSLayout.POSITION_BOTTOM;
import static com.facebook.csslayout.CSSLayout.DIMENSION_WIDTH; import static com.facebook.csslayout.CSSLayout.DIMENSION_WIDTH;
import static com.facebook.csslayout.CSSLayout.DIMENSION_HEIGHT; import static com.facebook.csslayout.CSSLayout.DIMENSION_HEIGHT;
@@ -2957,8 +2955,8 @@ public class LayoutEngineTest {
TestCSSNode root_node = new TestCSSNode(); TestCSSNode root_node = new TestCSSNode();
{ {
TestCSSNode node_0 = root_node; TestCSSNode node_0 = root_node;
node_0.setPositionValue(Spacing.LEFT, 5); node_0.setPosition(Spacing.LEFT, 5);
node_0.setPositionValue(Spacing.TOP, 5); node_0.setPosition(Spacing.TOP, 5);
} }
TestCSSNode root_layout = new TestCSSNode(); TestCSSNode root_layout = new TestCSSNode();
@@ -3016,7 +3014,7 @@ public class LayoutEngineTest {
TestCSSNode root_node = new TestCSSNode(); TestCSSNode root_node = new TestCSSNode();
{ {
TestCSSNode node_0 = root_node; TestCSSNode node_0 = root_node;
node_0.setPositionValue(Spacing.BOTTOM, 5); node_0.setPosition(Spacing.BOTTOM, 5);
} }
TestCSSNode root_layout = new TestCSSNode(); TestCSSNode root_layout = new TestCSSNode();
@@ -3037,8 +3035,8 @@ public class LayoutEngineTest {
TestCSSNode root_node = new TestCSSNode(); TestCSSNode root_node = new TestCSSNode();
{ {
TestCSSNode node_0 = root_node; TestCSSNode node_0 = root_node;
node_0.setPositionValue(Spacing.TOP, 10); node_0.setPosition(Spacing.TOP, 10);
node_0.setPositionValue(Spacing.BOTTOM, 5); node_0.setPosition(Spacing.BOTTOM, 5);
} }
TestCSSNode root_layout = new TestCSSNode(); TestCSSNode root_layout = new TestCSSNode();
@@ -3333,8 +3331,8 @@ public class LayoutEngineTest {
node_1.style.dimensions[DIMENSION_HEIGHT] = 100; node_1.style.dimensions[DIMENSION_HEIGHT] = 100;
node_1 = node_0.getChildAt(1); node_1 = node_0.getChildAt(1);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.setPositionValue(Spacing.LEFT, 10); node_1.setPosition(Spacing.LEFT, 10);
node_1.setPositionValue(Spacing.TOP, 10); node_1.setPosition(Spacing.TOP, 10);
} }
} }
@@ -3381,7 +3379,7 @@ public class LayoutEngineTest {
TestCSSNode node_1; TestCSSNode node_1;
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.setPositionValue(Spacing.LEFT, 5); node_1.setPosition(Spacing.LEFT, 5);
} }
} }
@@ -3418,7 +3416,7 @@ public class LayoutEngineTest {
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.setMargin(Spacing.TOP, 5); node_1.setMargin(Spacing.TOP, 5);
node_1.setPositionValue(Spacing.TOP, 5); node_1.setPosition(Spacing.TOP, 5);
} }
} }
@@ -3455,7 +3453,7 @@ public class LayoutEngineTest {
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.setMargin(Spacing.LEFT, 5); node_1.setMargin(Spacing.LEFT, 5);
node_1.setPositionValue(Spacing.LEFT, 5); node_1.setPosition(Spacing.LEFT, 5);
} }
} }
@@ -4028,7 +4026,7 @@ public class LayoutEngineTest {
TestCSSNode node_1; TestCSSNode node_1;
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.setPositionValue(Spacing.TOP, -1); node_1.setPosition(Spacing.TOP, -1);
} }
} }
@@ -4070,7 +4068,7 @@ public class LayoutEngineTest {
TestCSSNode node_1; TestCSSNode node_1;
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.setPositionValue(Spacing.LEFT, 5); node_1.setPosition(Spacing.LEFT, 5);
} }
} }
@@ -5199,10 +5197,10 @@ public class LayoutEngineTest {
TestCSSNode node_1; TestCSSNode node_1;
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.setPositionValue(Spacing.LEFT, 0); node_1.setPosition(Spacing.LEFT, 0);
node_1.setPositionValue(Spacing.TOP, 0); node_1.setPosition(Spacing.TOP, 0);
node_1.setPositionValue(Spacing.RIGHT, 0); node_1.setPosition(Spacing.RIGHT, 0);
node_1.setPositionValue(Spacing.BOTTOM, 0); node_1.setPosition(Spacing.BOTTOM, 0);
} }
} }
@@ -5384,8 +5382,8 @@ public class LayoutEngineTest {
node_1.style.dimensions[DIMENSION_HEIGHT] = 100; node_1.style.dimensions[DIMENSION_HEIGHT] = 100;
node_1 = node_0.getChildAt(1); node_1 = node_0.getChildAt(1);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.setPositionValue(Spacing.LEFT, 0); node_1.setPosition(Spacing.LEFT, 0);
node_1.setPositionValue(Spacing.RIGHT, 0); node_1.setPosition(Spacing.RIGHT, 0);
} }
} }
@@ -5427,8 +5425,8 @@ public class LayoutEngineTest {
TestCSSNode node_1; TestCSSNode node_1;
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.setPositionValue(Spacing.TOP, 0); node_1.setPosition(Spacing.TOP, 0);
node_1.setPositionValue(Spacing.BOTTOM, 20); node_1.setPosition(Spacing.BOTTOM, 20);
} }
} }
@@ -5467,10 +5465,10 @@ public class LayoutEngineTest {
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.justifyContent = CSSJustify.CENTER; node_1.style.justifyContent = CSSJustify.CENTER;
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.setPositionValue(Spacing.LEFT, 0); node_1.setPosition(Spacing.LEFT, 0);
node_1.setPositionValue(Spacing.TOP, 0); node_1.setPosition(Spacing.TOP, 0);
node_1.setPositionValue(Spacing.RIGHT, 0); node_1.setPosition(Spacing.RIGHT, 0);
node_1.setPositionValue(Spacing.BOTTOM, 0); node_1.setPosition(Spacing.BOTTOM, 0);
addChildren(node_1, 1); addChildren(node_1, 1);
{ {
TestCSSNode node_2; TestCSSNode node_2;
@@ -5523,7 +5521,7 @@ public class LayoutEngineTest {
TestCSSNode node_1; TestCSSNode node_1;
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.setPositionValue(Spacing.BOTTOM, 0); node_1.setPosition(Spacing.BOTTOM, 0);
} }
} }
@@ -5560,7 +5558,7 @@ public class LayoutEngineTest {
TestCSSNode node_1; TestCSSNode node_1;
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.setPositionValue(Spacing.RIGHT, 0); node_1.setPosition(Spacing.RIGHT, 0);
} }
} }
@@ -5598,7 +5596,7 @@ public class LayoutEngineTest {
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.style.dimensions[DIMENSION_HEIGHT] = 10; node_1.style.dimensions[DIMENSION_HEIGHT] = 10;
node_1.setPositionValue(Spacing.BOTTOM, 0); node_1.setPosition(Spacing.BOTTOM, 0);
} }
} }
@@ -5636,7 +5634,7 @@ public class LayoutEngineTest {
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.style.dimensions[DIMENSION_WIDTH] = 10; node_1.style.dimensions[DIMENSION_WIDTH] = 10;
node_1.setPositionValue(Spacing.RIGHT, 0); node_1.setPosition(Spacing.RIGHT, 0);
} }
} }
@@ -5673,7 +5671,7 @@ public class LayoutEngineTest {
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.style.dimensions[DIMENSION_HEIGHT] = 10; node_1.style.dimensions[DIMENSION_HEIGHT] = 10;
node_1.setPositionValue(Spacing.BOTTOM, 0); node_1.setPosition(Spacing.BOTTOM, 0);
} }
} }
@@ -5710,7 +5708,7 @@ public class LayoutEngineTest {
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.style.dimensions[DIMENSION_WIDTH] = 10; node_1.style.dimensions[DIMENSION_WIDTH] = 10;
node_1.setPositionValue(Spacing.RIGHT, 0); node_1.setPosition(Spacing.RIGHT, 0);
} }
} }
@@ -5890,7 +5888,7 @@ public class LayoutEngineTest {
{ {
TestCSSNode node_1; TestCSSNode node_1;
node_1 = node_0.getChildAt(0); node_1 = node_0.getChildAt(0);
node_1.setPositionValue(Spacing.LEFT, 5); node_1.setPosition(Spacing.LEFT, 5);
addChildren(node_1, 1); addChildren(node_1, 1);
{ {
TestCSSNode node_2; TestCSSNode node_2;
@@ -7297,10 +7295,10 @@ public class LayoutEngineTest {
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.style.maxWidth = 500; node_1.style.maxWidth = 500;
node_1.style.maxHeight = 600; node_1.style.maxHeight = 600;
node_1.setPositionValue(Spacing.LEFT, 100); node_1.setPosition(Spacing.LEFT, 100);
node_1.setPositionValue(Spacing.TOP, 100); node_1.setPosition(Spacing.TOP, 100);
node_1.setPositionValue(Spacing.RIGHT, 100); node_1.setPosition(Spacing.RIGHT, 100);
node_1.setPositionValue(Spacing.BOTTOM, 100); node_1.setPosition(Spacing.BOTTOM, 100);
} }
} }
@@ -7340,10 +7338,10 @@ public class LayoutEngineTest {
node_1.style.positionType = CSSPositionType.ABSOLUTE; node_1.style.positionType = CSSPositionType.ABSOLUTE;
node_1.style.minWidth = 900; node_1.style.minWidth = 900;
node_1.style.minHeight = 1000; node_1.style.minHeight = 1000;
node_1.setPositionValue(Spacing.LEFT, 100); node_1.setPosition(Spacing.LEFT, 100);
node_1.setPositionValue(Spacing.TOP, 100); node_1.setPosition(Spacing.TOP, 100);
node_1.setPositionValue(Spacing.RIGHT, 100); node_1.setPosition(Spacing.RIGHT, 100);
node_1.setPositionValue(Spacing.BOTTOM, 100); node_1.setPosition(Spacing.BOTTOM, 100);
} }
} }
@@ -7478,19 +7476,19 @@ public class LayoutEngineTest {
node_1.setPadding(Spacing.BOTTOM, 10); node_1.setPadding(Spacing.BOTTOM, 10);
node_1.setPadding(Spacing.START, 10); node_1.setPadding(Spacing.START, 10);
node_1.setPadding(Spacing.END, 10); node_1.setPadding(Spacing.END, 10);
node_1.setPositionValue(Spacing.LEFT, 100); node_1.setPosition(Spacing.LEFT, 100);
node_1.setPositionValue(Spacing.TOP, 100); node_1.setPosition(Spacing.TOP, 100);
node_1.setPositionValue(Spacing.RIGHT, 100); node_1.setPosition(Spacing.RIGHT, 100);
node_1.setPositionValue(Spacing.BOTTOM, 100); node_1.setPosition(Spacing.BOTTOM, 100);
addChildren(node_1, 1); addChildren(node_1, 1);
{ {
TestCSSNode node_2; TestCSSNode node_2;
node_2 = node_1.getChildAt(0); node_2 = node_1.getChildAt(0);
node_2.style.positionType = CSSPositionType.ABSOLUTE; node_2.style.positionType = CSSPositionType.ABSOLUTE;
node_2.setPositionValue(Spacing.LEFT, 10); node_2.setPosition(Spacing.LEFT, 10);
node_2.setPositionValue(Spacing.TOP, 10); node_2.setPosition(Spacing.TOP, 10);
node_2.setPositionValue(Spacing.RIGHT, 10); node_2.setPosition(Spacing.RIGHT, 10);
node_2.setPositionValue(Spacing.BOTTOM, 10); node_2.setPosition(Spacing.BOTTOM, 10);
} }
} }
} }
@@ -7550,19 +7548,19 @@ public class LayoutEngineTest {
node_1.setBorder(Spacing.BOTTOM, 1); node_1.setBorder(Spacing.BOTTOM, 1);
node_1.setBorder(Spacing.START, 1); node_1.setBorder(Spacing.START, 1);
node_1.setBorder(Spacing.END, 1); node_1.setBorder(Spacing.END, 1);
node_1.setPositionValue(Spacing.LEFT, 100); node_1.setPosition(Spacing.LEFT, 100);
node_1.setPositionValue(Spacing.TOP, 100); node_1.setPosition(Spacing.TOP, 100);
node_1.setPositionValue(Spacing.RIGHT, 100); node_1.setPosition(Spacing.RIGHT, 100);
node_1.setPositionValue(Spacing.BOTTOM, 100); node_1.setPosition(Spacing.BOTTOM, 100);
addChildren(node_1, 1); addChildren(node_1, 1);
{ {
TestCSSNode node_2; TestCSSNode node_2;
node_2 = node_1.getChildAt(0); node_2 = node_1.getChildAt(0);
node_2.style.positionType = CSSPositionType.ABSOLUTE; node_2.style.positionType = CSSPositionType.ABSOLUTE;
node_2.setPositionValue(Spacing.LEFT, 10); node_2.setPosition(Spacing.LEFT, 10);
node_2.setPositionValue(Spacing.TOP, 10); node_2.setPosition(Spacing.TOP, 10);
node_2.setPositionValue(Spacing.RIGHT, 10); node_2.setPosition(Spacing.RIGHT, 10);
node_2.setPositionValue(Spacing.BOTTOM, 10); node_2.setPosition(Spacing.BOTTOM, 10);
} }
} }
} }
@@ -7621,10 +7619,10 @@ public class LayoutEngineTest {
TestCSSNode node_2; TestCSSNode node_2;
node_2 = node_1.getChildAt(0); node_2 = node_1.getChildAt(0);
node_2.style.positionType = CSSPositionType.ABSOLUTE; node_2.style.positionType = CSSPositionType.ABSOLUTE;
node_2.setPositionValue(Spacing.LEFT, 10); node_2.setPosition(Spacing.LEFT, 10);
node_2.setPositionValue(Spacing.TOP, 10); node_2.setPosition(Spacing.TOP, 10);
node_2.setPositionValue(Spacing.RIGHT, 10); node_2.setPosition(Spacing.RIGHT, 10);
node_2.setPositionValue(Spacing.BOTTOM, 10); node_2.setPosition(Spacing.BOTTOM, 10);
} }
} }
} }