edje_textblock: remove duplicated textblock style properties 93/239193/1
authorBowon Ryu <bowon.ryu@samsung.com>
Wed, 22 Jul 2020 10:16:32 +0000 (19:16 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Wed, 22 Jul 2020 10:31:25 +0000 (19:31 +0900)
commit8449a03134b4607d785eedc4900f71d6e1d6d17a
treea003363b09045ac34f8a1bbaaed4916668dc8967
parent48cd155fa5e9848e95c7409fce455ac9ada4df62
edje_textblock: remove duplicated textblock style properties

Summary:
When there is "font" and "font_size" in  textblock style (already defined),
If "font" and "font_size" are set using edje_text_class_set(),
then "font" and "font_size" are defined duplicated in texblock style through eina_strbuf_append.

Duplicate properties use memory unnecessarily,
and also it is possible to cause confusion at debbuging.

This patch replaces duplicate properties "font", "font_size" using eina_strbuf_replace.

Test Plan:
* textblock style in edc
"font=Sans font_size=20 wrap=mixed text_class=TEXT_CLASS";

* edje_text_class_set in c
edje_text_class_set("TEXT_CLASS", "font=DejavuSans", 40);

* textblock style at runtime (BEFORE)
DEFAULT='font=Sans font_size=20 wrap=mixed font_size=40.0 font=DejavuSans'

* textblock style at runtime (AFTER)
DEFAULT='font=DejavuSans font_size=40 wrap=mixed'

Reviewers: subodh6129, woohyun, ali.alzyod

Reviewed By: ali.alzyod

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11962

Change-Id: I5ca923695f49dd77b9f8de487a8a294af126a29d
src/lib/edje/edje_textblock_styles.c