From: Youngbok Shin Date: Tue, 5 Jan 2016 06:45:44 +0000 (+0900) Subject: Revert "Evas Textblock: Fix ellipsis when textblock is resized to formatted h." X-Git-Tag: accepted/tizen/mobile/20160106.003529~4^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bed65fdd3ad8f9f5d8523812e1807dde819b6ee7;p=platform%2Fupstream%2Fefl.git Revert "Evas Textblock: Fix ellipsis when textblock is resized to formatted h." This reverts commit c6a4cd0963cd333f177bf1dfd4b231741ab312f3. The patch is merged in upstream. So, it will be replaced by the original patch. Change-Id: Id17e6cbf6b98e04d30332d9db262fdb799f838e1 --- diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 92736ba..2057e8c 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -4958,32 +4958,11 @@ _layout_par(Ctxt *c) * fast path. * Other values of 0.0 <= ellipsis < 1.0 are handled in * _layout_par_ellipsis_items */ - // TIZEN_ONLY(20160104): Fix ellipsis when textblock is resized to formatted h. - //if ((it->format->ellipsis == 1.0) && (c->h >= 0) && - // ((2 * it->h + c->y > - // c->h - c->o->style_pad.t - c->o->style_pad.b) || - // (!it->format->wrap_word && !it->format->wrap_char && - // !it->format->wrap_mixed))) - int ascent = 0, descent = 0, maxasc = 0, maxdesc = 0; - _layout_item_ascent_descent_adjust(c->obj, &ascent, &descent, - it, it->format); - - if (c->position == TEXTBLOCK_POSITION_START) - _layout_item_max_ascent_descent_calc(c->obj, &maxasc, &maxdesc, - it, TEXTBLOCK_POSITION_SINGLE); - else - _layout_item_max_ascent_descent_calc(c->obj, &maxasc, &maxdesc, - it, TEXTBLOCK_POSITION_END); - - if (ascent > maxasc) maxasc = ascent; - if (descent > maxdesc) maxdesc = descent; - if ((it->format->ellipsis == 1.0) && (c->h >= 0) && - ((ascent + descent + maxasc + maxdesc + c->y > + ((2 * it->h + c->y > c->h - c->o->style_pad.t - c->o->style_pad.b) || (!it->format->wrap_word && !it->format->wrap_char && !it->format->wrap_mixed))) - /////////////////////////////////////////////////////////////// { _layout_handle_ellipsis(c, it, i); ret = 1; diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c index e891995..66e19f6 100644 --- a/src/tests/evas/evas_test_textblock.c +++ b/src/tests/evas/evas_test_textblock.c @@ -1937,18 +1937,6 @@ START_TEST(evas_textblock_wrapping) ck_assert_int_eq(bret, ret); } - // TIZEN_ONLY(20160104): Fix ellipsis when textblock is resized to formatted h. - /* Check that unnecessary ellipsis is not applied */ - evas_object_textblock_text_markup_set(tb, "This is test for ellipsis with formatted height."); - evas_textblock_cursor_format_prepend(cur, "+ wrap=mixed"); - evas_object_resize(tb, 100, 100); - evas_object_textblock_size_formatted_get(tb, NULL, &bh); - evas_object_resize(tb, 100, bh); - evas_textblock_cursor_format_prepend(cur, "+ wrap=mixed ellipsis=1.0"); - evas_object_textblock_size_formatted_get(tb, NULL, &h); - ck_assert_int_ge(h, bh); - // - END_TB_TEST(); } END_TEST