diff options
author | Youngbok Shin <youngb.shin@samsung.com> | 2017-11-06 11:06:41 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-11-06 11:06:41 +0900 |
commit | de9f0aff5764ff42368c0e5164d439aba19d4e0c (patch) | |
tree | 2c9e4cecb0a09b009dbea3f0376d6ce5030290e8 /src/lib/edje/edje_util.c | |
parent | 9e98ddb63b2795e38ad2873455ebc3b0295f36f9 (diff) |
edje: don't return negative width and height from _parts_extends
Summary:
It should return width and height with positive values or zero.
@fix
Test Plan: make check
Reviewers: raster, jpeg, cedric
Reviewed By: raster
Subscribers: jiin.moon
Differential Revision: https://phab.enlightenment.org/D5422
Diffstat (limited to '')
-rw-r--r-- | src/lib/edje/edje_util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index 8db4ffd9a3..1b772d4be7 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c | |||
@@ -3274,7 +3274,7 @@ EOLIAN Eina_Rectangle | |||
3274 | _edje_object_efl_canvas_layout_calc_calc_parts_extends(Eo *obj EINA_UNUSED, Edje *ed) | 3274 | _edje_object_efl_canvas_layout_calc_calc_parts_extends(Eo *obj EINA_UNUSED, Edje *ed) |
3275 | { | 3275 | { |
3276 | Evas_Coord xx1 = INT_MAX, yy1 = INT_MAX; | 3276 | Evas_Coord xx1 = INT_MAX, yy1 = INT_MAX; |
3277 | Evas_Coord xx2 = 0, yy2 = 0; | 3277 | Evas_Coord xx2 = 0, yy2 = 0, w = 0, h = 0; |
3278 | unsigned short i; | 3278 | unsigned short i; |
3279 | 3279 | ||
3280 | ed->calc_only = EINA_TRUE; | 3280 | ed->calc_only = EINA_TRUE; |
@@ -3304,7 +3304,10 @@ _edje_object_efl_canvas_layout_calc_calc_parts_extends(Eo *obj EINA_UNUSED, Edje | |||
3304 | 3304 | ||
3305 | ed->calc_only = EINA_FALSE; | 3305 | ed->calc_only = EINA_FALSE; |
3306 | 3306 | ||
3307 | return (Eina_Rectangle) { xx1, yy1, xx2 - xx1, yy2 - yy1 }; | 3307 | if ((xx2 - xx1) > 0) w = xx2 - xx1; |
3308 | if ((yy2 - yy1) > 0) h = yy2 - yy1; | ||
3309 | |||
3310 | return (Eina_Rectangle) { xx1, yy1, w, h }; | ||
3308 | } | 3311 | } |
3309 | 3312 | ||
3310 | EOLIAN Eina_Size2D | 3313 | EOLIAN Eina_Size2D |