evas_textblock: <ps> tag respects multiline propertie

previously multi-line property does not effect  <ps> tag.
now <ps> is treated visually like <br> when multiline is set to EINA_FALSE

this issue was that each new paragraph will create new line regardless of multi line property value,  now only first paragraph will create new line if multi-line property is false, and other paragraphs will use same line

this will also fix the following patch https://phab.enlightenment.org/D8603
And both will use same test suite code

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9064
This commit is contained in:
Ali Alzyod 2019-05-31 23:34:50 +00:00 committed by Marcel Hollerbach
parent 8ec6e28b7c
commit 1b37f1504f
1 changed files with 7 additions and 3 deletions

View File

@ -4717,8 +4717,11 @@ loop_advance:
if (c->descent < 2) c->underline_extend = 2 - c->descent;
}
c->ln->line_no = c->line_no - c->ln->par->line_no;
c->line_no++;
c->y += c->ascent + c->descent;
if ( c->line_no == 0 || c->o->multiline)
{
c->line_no++;
c->y += c->ascent + c->descent;
}
if (c->w >= 0)
{
/* c->o->style_pad.r is already included in the line width, so it's
@ -6390,7 +6393,8 @@ _layout_par(Ctxt *c)
#endif
it = _ITEM(eina_list_data_get(c->par->logical_items));
_layout_line_new(c, it->format);
if (c->line_no == 0 || c->o->multiline)
_layout_line_new(c, it->format);
/* We walk on our own because we want to be able to add items from
* inside the list and then walk them on the next iteration. */