mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-08 17:46:35 +08:00
Import css-layout measure mode changes from pull request #163
Reviewed By: lucasr Differential Revision: D3167760 fb-gh-sync-id: f4f13bcb09a2d8b2db2764bd31fa8cbd8edb484b fbshipit-source-id: f4f13bcb09a2d8b2db2764bd31fa8cbd8edb484b
This commit is contained in:
committed by
Facebook Github Bot 4
parent
2039be9d32
commit
303428ea28
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
// NOTE: this file is auto-copied from https://github.com/facebook/css-layout
|
||||
// @generated SignedSource<<1f520d46cbfddbbea0661a8fb6a00748>>
|
||||
// @generated SignedSource<<e87a0b3f12fe2e671deb259075a51dc0>>
|
||||
|
||||
package com.facebook.csslayout;
|
||||
|
||||
@@ -56,7 +56,7 @@ public class CSSNode {
|
||||
*
|
||||
* NB: measure is NOT guaranteed to be threadsafe/re-entrant safe!
|
||||
*/
|
||||
public void measure(CSSNode node, float width, float height, MeasureOutput measureOutput);
|
||||
public void measure(CSSNode node, float width, CSSMeasureMode widthMode, float height, CSSMeasureMode heightMode, MeasureOutput measureOutput);
|
||||
}
|
||||
|
||||
// VisibleForTesting
|
||||
@@ -128,13 +128,13 @@ public class CSSNode {
|
||||
return mMeasureFunction != null;
|
||||
}
|
||||
|
||||
/*package*/ MeasureOutput measure(MeasureOutput measureOutput, float width, float height) {
|
||||
/*package*/ MeasureOutput measure(MeasureOutput measureOutput, float width, CSSMeasureMode widthMode, float height, CSSMeasureMode heightMode) {
|
||||
if (!isMeasureDefined()) {
|
||||
throw new RuntimeException("Measure function isn't defined!");
|
||||
}
|
||||
measureOutput.height = CSSConstants.UNDEFINED;
|
||||
measureOutput.width = CSSConstants.UNDEFINED;
|
||||
Assertions.assertNotNull(mMeasureFunction).measure(this, width, height, measureOutput);
|
||||
Assertions.assertNotNull(mMeasureFunction).measure(this, width, widthMode, height, heightMode, measureOutput);
|
||||
return measureOutput;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user