An empty text item can be generated in the following squences.
ex) [LATIN]<preedit>[ARAB]</preedit>
1. Create a text item for LATIN script.
2. Create a text item for applying new format stage(<preedit>) to the next text.
3. Create a text item for ARAB script.
=> The text item which is created from #2 will be remained empty.
And it will have 0 length, LATIN's bidi property and
same text_pos value with the item which is created from #3.
These empty text item can ruin bidi informations that is working based on text_pos(= cursor's position).
@tizen_fix
Change-Id: Iae219918e3acb1f3c4c6a8eec1f3e12bf77ae00b
if (ln->items)
{
Evas_Object_Textblock_Item *i;
+ /* TIZEN_ONLY(20180331): Fix wrong bidi decision caused by empty text item
it = ln->items;
+ */
+ /* END */
EINA_INLIST_FOREACH(ln->items, i)
{
+ /* TIZEN_ONLY(20180331): Fix wrong bidi decision caused by empty text item */
+ if ((i->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
+ (_ITEM_TEXT(i)->text_props.text_len == 0))
+ continue;
+
+ if (it == NULL)
+ {
+ it = i;
+ continue;
+ }
+ /* END */
+
if (it->text_pos < i->text_pos)
{
it = i;
{
if (ititr == it)
break;
+
+ /* TIZEN_ONLY(20180331): Fix wrong bidi decision caused by empty text item */
+ if ((ititr->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
+ (_ITEM_TEXT(ititr)->text_props.text_len == 0))
+ continue;
+ /* END */
+
previt = ititr;
}