mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-07 22:40:55 +08:00
backout update of css-layout. breaks ios <9
Summary: Backed out changeset 29fa5aef3dbcc12d63c01d211b32bb598caadd0d and 56cc13ffbc4805aa0789df62a04e19f23a438bd3. Reviewed By: javache Differential Revision: D3164127
This commit is contained in:
committed by
Ahmed El-Helw
parent
72eb547f22
commit
cd06228f7a
@@ -18,7 +18,6 @@ import android.text.StaticLayout;
|
||||
import android.text.TextPaint;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.facebook.csslayout.CSSMeasureMode;
|
||||
import com.facebook.csslayout.CSSNode;
|
||||
import com.facebook.csslayout.MeasureOutput;
|
||||
import com.facebook.csslayout.Spacing;
|
||||
@@ -68,13 +67,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void measure(
|
||||
CSSNode node,
|
||||
float width,
|
||||
CSSMeasureMode widthMode,
|
||||
float height,
|
||||
CSSMeasureMode heightMode,
|
||||
MeasureOutput measureOutput) {
|
||||
public void measure(CSSNode node, float width, float height, MeasureOutput measureOutput) {
|
||||
CharSequence text = getText();
|
||||
if (TextUtils.isEmpty(text)) {
|
||||
// to indicate that we don't have anything to display
|
||||
@@ -87,7 +80,8 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
mText = text;
|
||||
|
||||
// technically, width should never be negative, but there is currently a bug in
|
||||
boolean unconstrainedWidth = widthMode == CSSMeasureMode.UNDEFINED || width < 0;
|
||||
// LayoutEngine where a negative value can be passed.
|
||||
boolean unconstrainedWidth = Float.isNaN(width) || width < 0;
|
||||
|
||||
BoringLayout.Metrics metrics = BoringLayout.isBoring(text, PAINT, sBoringLayoutMetrics);
|
||||
if (metrics != null) {
|
||||
|
||||
@@ -16,7 +16,6 @@ import android.util.TypedValue;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.EditText;
|
||||
|
||||
import com.facebook.csslayout.CSSMeasureMode;
|
||||
import com.facebook.csslayout.CSSNode;
|
||||
import com.facebook.csslayout.MeasureOutput;
|
||||
import com.facebook.csslayout.Spacing;
|
||||
@@ -71,13 +70,7 @@ public class RCTTextInput extends RCTVirtualText implements AndroidView, CSSNode
|
||||
}
|
||||
|
||||
@Override
|
||||
public void measure(
|
||||
CSSNode node,
|
||||
float width,
|
||||
CSSMeasureMode widthMode,
|
||||
float height,
|
||||
CSSMeasureMode heightMode,
|
||||
MeasureOutput measureOutput) {
|
||||
public void measure(CSSNode node, float width, float height, MeasureOutput measureOutput) {
|
||||
// measure() should never be called before setThemedContext()
|
||||
EditText editText = Assertions.assertNotNull(mEditText);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user