Check layout instead of style before setting height and width to whatever is set in layout
This commit is contained in:
@@ -34,6 +34,7 @@ __forceinline const float fminf(const float a, const float b) {
|
||||
#define SMALL_TEXT "small"
|
||||
#define LONG_TEXT "loooooooooong with space"
|
||||
#define MEASURE_WITH_RATIO_2 "measureWithRatio2"
|
||||
#define MEASURE_WITH_MATCH_PARENT "measureWithMatchParent"
|
||||
/** END_GENERATED **/
|
||||
|
||||
typedef struct failed_test_t {
|
||||
@@ -115,6 +116,12 @@ css_dim_t measure(void *context, float width, float height) {
|
||||
return dim;
|
||||
}
|
||||
|
||||
if (strcmp(text, MEASURE_WITH_MATCH_PARENT) == 0) {
|
||||
dim.dimensions[CSS_WIDTH] = width;
|
||||
dim.dimensions[CSS_HEIGHT] = height;
|
||||
return dim;
|
||||
}
|
||||
|
||||
// Should not go here
|
||||
dim.dimensions[CSS_WIDTH] = CSS_UNDEFINED;
|
||||
dim.dimensions[CSS_HEIGHT] = CSS_UNDEFINED;
|
||||
|
Reference in New Issue
Block a user