evas_object_textblock: fixing white-space based wrapping + ellipsis issue.
authorWooHyun Jung <wh0705.jung@samsung.com>
Fri, 15 May 2020 03:30:43 +0000 (12:30 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Sat, 16 May 2020 03:10:11 +0000 (12:10 +0900)
1. remove _layout_line_reorder
  - This reodering should not be called becuase _layout_handle_ellipsis is
    not considering this reordering.

2. revome visually-deleted item from line items if it's added before

@tizen_fix

Change-Id: I5fa39f6ef394ba20bc7c7f16887269dde3f301c8

src/lib/evas/canvas/evas_object_textblock.c

index d338c56..d078078 100644 (file)
@@ -6853,7 +6853,10 @@ _layout_par(Ctxt *c)
                 eina_inlist_append(EINA_INLIST_GET(c->ln->items),
                       EINA_INLIST_GET(it));
 
-             _layout_line_reorder(c->ln);
+             /* TIZEN_ONLY (20200515) : fixing white-space based wrapping + ellipsis problem
+                This reodering would not be condidered by later functions (such as _layout_handle_ellipsis).
+                If there would be no problem without this function, let's remove this code. */
+             //_layout_line_reorder(c->ln);
 
              EINA_INLIST_FOREACH(c->ln->items, vis_it)
                {
@@ -7170,6 +7173,15 @@ _layout_par(Ctxt *c)
                             _layout_item_text_split_strip_white(c,
                                   _ITEM_TEXT(prev_it), eina_list_prev(i),
                                   _ITEM_TEXT(prev_it)->text_props.text_len);
+
+                            /* TIZEN_ONLY(20200515) : fixing white-space based wrapping + ellipsis problem */
+                            if (prev_it->visually_deleted)
+                              {
+                                 c->ln->items = _ITEM(eina_inlist_remove(
+                                       EINA_INLIST_GET(c->ln->items),
+                                       EINA_INLIST_GET(prev_it)));
+                              }
+                            //////
                          }
 
                        /* We didn't end up using the item, so revert the ascent