forked from enlightenment/efl
Evas textblock: Fixed issue with textblocks without fonts segfaulting.
Fixes T184 (which is a regression).
This commit is contained in:
parent
9c1ed31c76
commit
fdbc477f79
|
@ -1,3 +1,8 @@
|
|||
2013-06-25 Tom Hacohen
|
||||
|
||||
* Evas textblock: Fixed issue with textblocks without fonts
|
||||
segfaulting.
|
||||
|
||||
2013-06-24 Cedric Bail
|
||||
|
||||
* Evas: add support for asynchronously uploading GL texture.
|
||||
|
|
2
NEWS
2
NEWS
|
@ -339,4 +339,4 @@ Fixes:
|
|||
* Evas: Fix gif cannot decode alpha value correctly.
|
||||
* Evas: Fix bs if app call image object update add after call api like fileset.
|
||||
* Evas: Fix evas_gl direct rendering to support partial redraw.
|
||||
|
||||
* Evas textblock: Fixed issue with textblocks without fonts segfaulting.
|
||||
|
|
|
@ -2550,6 +2550,11 @@ _layout_item_ascent_descent_adjust(const Evas_Object *eo_obj,
|
|||
Evas_Coord *maxascent, Evas_Coord *maxdescent,
|
||||
Evas_Object_Textblock_Item *it, Textblock_Position position)
|
||||
{
|
||||
if (!it->format || !it->format->font.font)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_layout_format_ascent_descent_adjust(eo_obj, maxascent, maxdescent, it->format);
|
||||
|
||||
if ((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
|
||||
|
|
|
@ -2484,6 +2484,13 @@ START_TEST(evas_textblock_style)
|
|||
evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b);
|
||||
fail_if((l != 1) || (r != 4) || (t != 1) || (b != 4));
|
||||
|
||||
/* No font */
|
||||
evas_textblock_style_set(newst, "DEFAULT=''");
|
||||
evas_object_textblock_text_markup_set(tb, "Test");
|
||||
evas_object_textblock_size_formatted_get(tb, &nw, &nh);
|
||||
ck_assert_int_eq(nw, 0);
|
||||
ck_assert_int_eq(nw, nh);
|
||||
|
||||
END_TB_TEST();
|
||||
}
|
||||
END_TEST
|
||||
|
|
Loading…
Reference in New Issue