diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNode.java b/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNode.java index 4fc69668a..a5519e129 100644 --- a/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNode.java +++ b/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNode.java @@ -7,7 +7,7 @@ */ // NOTE: this file is auto-copied from https://github.com/facebook/css-layout -// @generated SignedSource<> +// @generated SignedSource<<4b95f0548441afa1e91e957a93fa6f0b>> package com.facebook.csslayout; @@ -224,6 +224,13 @@ public class CSSNode { return FloatUtil.floatsEqual(f1, f2); } + /** + * Get this node's direction, as defined in the style. + */ + public CSSDirection getStyleDirection() { + return style.direction; + } + public void setDirection(CSSDirection direction) { if (style.direction != direction) { style.direction = direction; @@ -231,6 +238,13 @@ public class CSSNode { } } + /** + * Get this node's flex direction, as defined by style. + */ + public CSSFlexDirection getFlexDirection() { + return style.flexDirection; + } + public void setFlexDirection(CSSFlexDirection flexDirection) { if (style.flexDirection != flexDirection) { style.flexDirection = flexDirection; @@ -238,6 +252,13 @@ public class CSSNode { } } + /** + * Get this node's justify content, as defined by style. + */ + public CSSJustify getJustifyContent() { + return style.justifyContent; + } + public void setJustifyContent(CSSJustify justifyContent) { if (style.justifyContent != justifyContent) { style.justifyContent = justifyContent; @@ -245,6 +266,13 @@ public class CSSNode { } } + /** + * Get this node's align items, as defined by style. + */ + public CSSAlign getAlignItems() { + return style.alignItems; + } + public void setAlignItems(CSSAlign alignItems) { if (style.alignItems != alignItems) { style.alignItems = alignItems; @@ -252,6 +280,13 @@ public class CSSNode { } } + /** + * Get this node's align items, as defined by style. + */ + public CSSAlign getAlignSelf() { + return style.alignSelf; + } + public void setAlignSelf(CSSAlign alignSelf) { if (style.alignSelf != alignSelf) { style.alignSelf = alignSelf; @@ -259,6 +294,13 @@ public class CSSNode { } } + /** + * Get this node's position type, as defined by style. + */ + public CSSPositionType getPositionType() { + return style.positionType; + } + public void setPositionType(CSSPositionType positionType) { if (style.positionType != positionType) { style.positionType = positionType; @@ -273,6 +315,13 @@ public class CSSNode { } } + /** + * Get this node's flex, as defined by style. + */ + public float getFlex() { + return style.flex; + } + public void setFlex(float flex) { if (!valuesEqual(style.flex, flex)) { style.flex = flex; @@ -280,24 +329,52 @@ public class CSSNode { } } + /** + * Get this node's margin, as defined by style + default margin. + */ + public Spacing getMargin() { + return style.margin; + } + public void setMargin(int spacingType, float margin) { if (style.margin.set(spacingType, margin)) { dirty(); } } + /** + * Get this node's padding, as defined by style + default padding. + */ + public Spacing getPadding() { + return style.padding; + } + public void setPadding(int spacingType, float padding) { if (style.padding.set(spacingType, padding)) { dirty(); } } + /** + * Get this node's border, as defined by style. + */ + public Spacing getBorder() { + return style.border; + } + public void setBorder(int spacingType, float border) { if (style.border.set(spacingType, border)) { dirty(); } } + /** + * Get this node's position top, as defined by style. + */ + public float getPositionTop() { + return style.position[POSITION_TOP]; + } + public void setPositionTop(float positionTop) { if (!valuesEqual(style.position[POSITION_TOP], positionTop)) { style.position[POSITION_TOP] = positionTop; @@ -305,6 +382,13 @@ public class CSSNode { } } + /** + * Get this node's position bottom, as defined by style. + */ + public float getPositionBottom() { + return style.position[POSITION_BOTTOM]; + } + public void setPositionBottom(float positionBottom) { if (!valuesEqual(style.position[POSITION_BOTTOM], positionBottom)) { style.position[POSITION_BOTTOM] = positionBottom; @@ -312,6 +396,13 @@ public class CSSNode { } } + /** + * Get this node's position left, as defined by style. + */ + public float getPositionLeft() { + return style.position[POSITION_LEFT]; + } + public void setPositionLeft(float positionLeft) { if (!valuesEqual(style.position[POSITION_LEFT], positionLeft)) { style.position[POSITION_LEFT] = positionLeft; @@ -319,6 +410,13 @@ public class CSSNode { } } + /** + * Get this node's position right, as defined by style. + */ + public float getPositionRight() { + return style.position[POSITION_RIGHT]; + } + public void setPositionRight(float positionRight) { if (!valuesEqual(style.position[POSITION_RIGHT], positionRight)) { style.position[POSITION_RIGHT] = positionRight; @@ -326,6 +424,13 @@ public class CSSNode { } } + /** + * Get this node's width, as defined in the style. + */ + public float getStyleWidth() { + return style.dimensions[DIMENSION_WIDTH]; + } + public void setStyleWidth(float width) { if (!valuesEqual(style.dimensions[DIMENSION_WIDTH], width)) { style.dimensions[DIMENSION_WIDTH] = width; @@ -333,6 +438,13 @@ public class CSSNode { } } + /** + * Get this node's height, as defined in the style. + */ + public float getStyleHeight() { + return style.dimensions[DIMENSION_HEIGHT]; + } + public void setStyleHeight(float height) { if (!valuesEqual(style.dimensions[DIMENSION_HEIGHT], height)) { style.dimensions[DIMENSION_HEIGHT] = height; @@ -360,34 +472,6 @@ public class CSSNode { return layout.direction; } - /** - * Get this node's padding, as defined by style + default padding. - */ - public Spacing getStylePadding() { - return style.padding; - } - - /** - * Get this node's width, as defined in the style. - */ - public float getStyleWidth() { - return style.dimensions[DIMENSION_WIDTH]; - } - - /** - * Get this node's height, as defined in the style. - */ - public float getStyleHeight() { - return style.dimensions[DIMENSION_HEIGHT]; - } - - /** - * Get this node's direction, as defined in the style. - */ - public CSSDirection getStyleDirection() { - return style.direction; - } - /** * Set a default padding (left/top/right/bottom) for this node. */ diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/README b/ReactAndroid/src/main/java/com/facebook/csslayout/README index 17aba774e..4916c2218 100644 --- a/ReactAndroid/src/main/java/com/facebook/csslayout/README +++ b/ReactAndroid/src/main/java/com/facebook/csslayout/README @@ -1,7 +1,7 @@ The source of truth for css-layout is: https://github.com/facebook/css-layout The code here should be kept in sync with GitHub. -HEAD at the time this code was synced: https://github.com/facebook/css-layout/commit/4b4cd06be2f0cd2aea476e893c60443082826fb8 +HEAD at the time this code was synced: https://github.com/facebook/css-layout/commit/d3b702e1ad0925f8683ce3039be8e493abbf179b There is generated code in: - README (this file) diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/README.facebook b/ReactAndroid/src/main/java/com/facebook/csslayout/README.facebook index 88a6140e2..b7b2a9e90 100644 --- a/ReactAndroid/src/main/java/com/facebook/csslayout/README.facebook +++ b/ReactAndroid/src/main/java/com/facebook/csslayout/README.facebook @@ -1,7 +1,7 @@ The source of truth for css-layout is: https://github.com/facebook/css-layout The code here should be kept in sync with GitHub. -HEAD at the time this code was synced: https://github.com/facebook/css-layout/commit/4b4cd06be2f0cd2aea476e893c60443082826fb8 +HEAD at the time this code was synced: https://github.com/facebook/css-layout/commit/d3b702e1ad0925f8683ce3039be8e493abbf179b There is generated code in: - README.facebook (this file) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java index 2cf434fe0..7ac6181c5 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java @@ -63,7 +63,7 @@ public class ReactTextInputShadowNode extends ReactTextShadowNode implements setDefaultPadding(Spacing.TOP, mEditText.getPaddingTop()); setDefaultPadding(Spacing.RIGHT, mEditText.getPaddingRight()); setDefaultPadding(Spacing.BOTTOM, mEditText.getPaddingBottom()); - mComputedPadding = spacingToFloatArray(getStylePadding()); + mComputedPadding = spacingToFloatArray(getPadding()); } @Override @@ -76,12 +76,12 @@ public class ReactTextInputShadowNode extends ReactTextShadowNode implements TypedValue.COMPLEX_UNIT_PX, mFontSize == UNSET ? (int) Math.ceil(PixelUtil.toPixelFromSP(ViewDefaults.FONT_SIZE_SP)) : mFontSize); - mComputedPadding = spacingToFloatArray(getStylePadding()); + mComputedPadding = spacingToFloatArray(getPadding()); editText.setPadding( - (int) Math.ceil(getStylePadding().get(Spacing.LEFT)), - (int) Math.ceil(getStylePadding().get(Spacing.TOP)), - (int) Math.ceil(getStylePadding().get(Spacing.RIGHT)), - (int) Math.ceil(getStylePadding().get(Spacing.BOTTOM))); + (int) Math.ceil(getPadding().get(Spacing.LEFT)), + (int) Math.ceil(getPadding().get(Spacing.TOP)), + (int) Math.ceil(getPadding().get(Spacing.RIGHT)), + (int) Math.ceil(getPadding().get(Spacing.BOTTOM))); if (mNumberOfLines != UNSET) { editText.setLines(mNumberOfLines); @@ -120,7 +120,7 @@ public class ReactTextInputShadowNode extends ReactTextShadowNode implements @Override public void setPadding(int spacingType, float padding) { super.setPadding(spacingType, padding); - mComputedPadding = spacingToFloatArray(getStylePadding()); + mComputedPadding = spacingToFloatArray(getPadding()); markUpdated(); }