Commit Graph

115 Commits

Author SHA1 Message Date
Carsten Haitzler 83a249baa1 edje_cc out - fix theoretical div by 0
fixes CID 1371125
2017-07-23 19:48:16 +09:00
Carsten Haitzler d62f7d72e6 edje_cc out ... fix theoretical div by zero...
if files size was 0... which would basically make a lot fail before...
it could be a divide by zero. fix and just assume minimum size of 1.

fix CID 1371127
2017-07-23 19:46:17 +09:00
Carsten Haitzler a91d0b2ea4 edje_cc out ... check more iui list element ptrs to help coverity
fix CID 1374482 ... and others i hope.
2017-07-23 19:36:41 +09:00
Carsten Haitzler 4df92f88d0 edje_cc out - double check list element ptr to make coverity happy
fix CID 1374483
2017-07-23 19:33:58 +09:00
Youngbok Shin 0735f6aa61 edje: support legacy Textblock calculation logic for 1.18 edje file
Summary:
From EFL 1.19, Edje Textblock calculation logic was fixed according to
Edje documents. But, it broke old edje files which ignored text.min
option for minimum width. Even if the old edje files were wrong,
we need to support them as discussed from T5548.

Also, this patch will change default efl_version to 1.18 from 1.19.
So, without efl_version property, edje file will run on the legacy logic.

Fixes T5548

Test Plan: Turn on/off presentation mode in Enlightenment.

Reviewers: herdsman, cedric, jpeg, zmike, raster

Subscribers: stefan_schmidt

Maniphest Tasks: T5548

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

Adjusted by @jpeg
2017-07-04 14:13:13 +09:00
Jean Guyomarc'h 9ba17f6902 edje: better error message when a po file does not exist 2017-03-09 23:16:16 +01:00
Carsten Haitzler 5b4c032fb5 edje_cc - fix potential divide by 0 in info output if file size is 0
this will realistically never happen in a sane case... but its
theoretically possible. fixes CID 1366923
2017-02-08 21:19:39 +09:00
Gustavo Sverzut Barbieri 8dc853f230 ifdef RUN_IN_TREE logic.
This logic is only needed for autotools, cmake will replicate the
installation file structure and thus eina_prefix works out of box.
2017-02-03 12:36:38 -02:00
Vyacheslav Reutskiy c3733a213b edje_cc: remove 'inherit_only' groups from result edj file
The 'inherit_only' groups are helpers and no sense to save it to edj
file.

@fix
2017-02-01 15:02:46 +02:00
Mykyta Biliavskyi 66af7d1928 edje_cc: delete unused image sets from edj file.
Delete Edje_Image_Directory_Set instance from edj file in case if image
set isn't used inside any part. This commit apply behaviour from unused
images to the unused image sets.

@fix T5109
2017-01-19 09:54:53 +02:00
Mykyta Biliavskyi 5fb595e714 Edje_cc: update images.set.image names when write edj file.
There are few image formats that converted into *.png on data writing
stage (*.svg, *.tgv). After converting image, this image entry name
changes by <name>.<vector format ext>.png. This make possible save
vector images into edj file.
Because images set could contain vector images too - after save on
disk set image entry name wasn't updated. And still have original name:
<name>.<vector format ext>. This commit update image set entries
name accordingly to the global pool of images.

@fix
2016-12-29 16:14:23 +02:00
Carsten Haitzler 4b18b472ba edje_cc - fix warning about freeing a const char ptr
yes - the type is const char * for edje runtime (the library) but in
edje_cc we strdup these strings and yes - assign them to a const char *
thus the warning and the need to cast. it's specific co edje_cc only
and so this is correct.
2016-12-28 19:01:38 +09:00
Vyacheslav Reutskiy f12a08ab15 edje_cc: add svg file name '.png' if it use as image
This path add notify for user in case when svg use in image section. It
need for clear understanding why vertor image scale like bitmap. And
add to file name new extension '.png'
2016-12-22 18:16:48 +02:00
Vyacheslav Reutskiy 715a66ed11 edje_cc: calculate and save the parts count in "edje/file" 2016-12-22 18:00:17 +02:00
Carsten Haitzler 14aca77bfc fix edje_cc segv when compiling bling bling theme
accessed parts out of range for the part table. check part count first
before checking. fixes segv. @fix

blinblng: http://enform.haxlab.org/files/blingbling_e21.tgz
2016-10-15 11:28:01 +09:00
Youngbok Shin ceb63bb202 edje_cc: don't warn when image attributes are missing in inherit_only group
Summary:
The inherit_only groups could be used for template of other groups.
So, even if it has image part, it dose not need to have image attributes.
@fix

Test Plan: N/A

Reviewers: cedric, conr2d, jpeg, raster

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D4322
2016-09-28 16:02:12 +09:00
Carsten Haitzler f4606d54eb Revert "edje edje_cc_out: use strncpy()."
This reverts commit 6de3b2c5d3.

just dismiss in coverity if the code is not actually wrong
2016-09-22 08:30:37 +09:00
Hermet Park 6de3b2c5d3 edje edje_cc_out: use strncpy().
This change is not much meaningful but avoids an annoying coverity detection.
2016-09-21 15:19:19 +09:00
Jee-Yong Um 1d2be3fc4c edje_cc: add lookup for inherited after program
Summary:
"after" program inherited from inherit_only group does not have original
program lookup, but _edje_program_copy() doesn't consider this case.
When it fails to copy program lookup, new program lookup should be appeded.

@fix

Test Plan: make attached program and run

Reviewers: cedric, jpeg, Hermet

Reviewed By: Hermet

Subscribers: taxi2se

Differential Revision: https://phab.enlightenment.org/D4253
2016-09-01 20:08:56 +09:00
Carsten Haitzler b1d9cf8d8d edje cc mo encoding leak - ensure data is freed when setting up encoding
this should fix CID 1306604
2016-07-08 18:53:11 +09:00
Subhransu Mohanty 9be9da17bf edje/svg: added _edje_svg_node_free() function
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4143
2016-07-07 16:29:21 +09:00
Shuhrat Dehkanov 9c69afd535 Fix 'maybe used uninitialized' warning
Summary:
    bin/edje/edje_cc_out.c: In function ‘data_write_images’:
    bin/edje/edje_cc_out.c:1164:7: warning: ‘f’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        if (!f) return EINA_FALSE;
           ^
    bin/edje/edje_cc_out.c:1154:15: note: ‘f’ was declared here
        Eina_File *f;
                   ^

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: seoz, jpeg

Differential Revision: https://phab.enlightenment.org/D4101
2016-06-27 16:19:43 +09:00
Subhransu Mohanty de7809a868 edje/svg: add few error message reagrding parsing and storing of svg file.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-23 10:12:23 -07:00
Subhransu Mohanty 5eca781a3b edje_cc_out : fix possible buffer overrun
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4044
2016-06-16 15:28:08 +09:00
Cedric BAIL ba0aac6909 edje: make svg support a beta feature of edje_cc.
Should we do the same with Canvas3D part ?
2016-06-13 10:58:34 -07:00
Carsten Haitzler 3f426ca519 edje cc - remove debug printf i missed. :(
oops. i removed the others but not this one. yes i did git diff etc.
2016-06-13 15:22:11 +09:00
Carsten Haitzler 2845f5eff0 edje_cc - limit embryo_cc instances in bg to something sensible
so compiling current efl theme seems to spawn 178 instances of
embryo_cc in the background (then collect results). this is a bit
excessive and may be a source of issues. this may be causing T3874
perhaps due to embryo_cc's not launching (fork failing or something
else) and we don't check if fork fails. so try limit to 8 embryo_cc's
in the bg which is more reasonable than the currently "unlimited"
which leads to 178 currently...

i hope this fixes T3874

@fix
2016-06-13 14:18:03 +09:00
Subhransu Mohanty 62c0a4ef08 edje: add new svg part to edc
Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: jpeg, cedric, Hermet

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-08 11:35:33 -07:00
Tom Hacohen 6dcc2e6cc4 Edje cc out: Make list removal slightly more efficient. 2016-05-20 16:24:06 +01:00
Tom Hacohen b7ef3bcf0d Edje cc: Rename shadowing variables. 2016-05-20 16:24:06 +01:00
Jee-Yong Um 5bb39ed43d edje_cc: cleanup queued jobs for removed program
Summary:
When a new edje program is created, some jobs like lookup part
(Part_Lookup) or compiling embryo script (Code_Program) are queued.
If program is removed, queued jobs should be removed also.

Reviewers: jpeg, cedric

Reviewed By: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-05-10 16:36:22 -07:00
Cedric BAIL 7c743b6754 Revert "Set the name for table, box items"
This reverts commit 6f7608befd.

Item in table and box do not need names as they have an index. This
is breaking ABI for edje application that rely on getting the index
properly when a signal is emitted. To be precise, this did break
elemines.
2016-04-19 11:56:17 -07:00
Jee-Yong Um 974daa5f98 edje_cc: delete anonymous lookup during program removal
Summary:
program_remove attribute allows to remove program inherited from
parent group, but if its action is EDJE_ACTION_TYPE_SCRIPT,
anonymous lookup also should be deleted.

@fix

Reviewers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-15 11:20:07 -07:00
Jee-Yong Um 984a8f7f90 edje_cc: support hexadecimal color code
Summary:
Support hexadecimal color code in EDC.

Four types of color code are acceptable.
All values below mean 'Red'. (255 0 0 255)
   color: "#F00";
   color: "#F00F";
   color: "#FF0000";
   color: "#FF0000FF";

Color code tables are usually provided with hexadecimal numbers.
Supporting hexadecimal color code will allow developers to skip
manual conversion hex to decimal.

Test Plan: Test case will provided with seperated commit.

Reviewers: cedric, jpeg, raster

Reviewed By: raster

Subscribers: raster

Differential Revision: https://phab.enlightenment.org/D3831
2016-03-28 15:43:04 +09:00
Jee-Yong Um afb49ec096 edje_cc: remove unnecessary internal function
Summary:
This internal function was made for checking non-existence of
Edje Part when handling insert_before/after attributes.
However, checking is implemented in different way and this function
is not used anywhere.

Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-03-15 11:31:33 -07:00
Jee-Yong Um a91d5e8f72 edje_cc: fix typo in error message
Summary: meaningless suffix is attached to a word in error message.

Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-03-15 11:24:31 -07:00
Chris Michael 07da0ba5d7 edje: Don't leak array source if we are going to exit function
This patch fixes a potential resource leak where we would previously
create a new eina_array and then possibly return from this function
(when checking validity of 's' parameter) without freeing the newly
created array.

Coverity CID1350291

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-10 12:13:44 -05:00
Tom Hacohen d9b5ce0192 Edje cc: Fix shadow warnings. 2016-02-16 09:38:36 +00:00
Cedric BAIL fcfa0f56a7 edje_cc: fix detecting missing part for insert_before/after
Summary:
Detecting missing part for insert_before/after is broken.
This patch makes the feature work and clarifies error message,
and removes redundant internal function.

Reviewers: cedric, jpeg

Subscribers: raster, jpeg

Maniphest Tasks: T2513

Differential Revision: https://phab.enlightenment.org/D3576
2016-02-05 08:03:18 +01:00
Jee-Yong Um 800f5d8156 edje: introduce color_tree (color_class inheritance)
Summary:
The "color_tree" block contains a list of one or more "node" blocks.
A "node" block consists of its own color class name and the list of child
color classes. At runtime, parent color class will be referred instead,
if child color class is set to part but its color values are not defined.

Reviewers: raster, Jaehyun_Cho, jpeg, cedric

Reviewed By: cedric

Subscribers: cedric, kimcinoo

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-02-05 07:55:49 +01:00
Carsten Haitzler 8b11d04ded Revert "edje_cc: fix detecting missing part for insert_before/after"
This reverts commit 2ca99b8b68.

This breaks elm compile:

  EDJ      default.edj
edje_cc: Critical. In group "genlist_arrow": Unable to find part "sel_bevel" for insert_after in part "arrow_img_l".
2016-01-20 21:23:22 +09:00
Jee-Yong Um 2ca99b8b68 edje_cc: fix detecting missing part for insert_before/after
Summary:
Detecting missing part for insert_before/after is broken.
This patch makes the feature work and clarifies error message,
and removes redundant internal function.

Reviewers: cedric, jpeg

Subscribers: jpeg

Maniphest Tasks: T2513

Differential Revision: https://phab.enlightenment.org/D3576
2016-01-20 11:45:34 +09:00
Jee-Yong Um e12456f3e7 edje_cc: abort when insert_before/after part doesn't exist
Summary:
edje_cc does not check whether insert_before/after part exists.
edje_cc will notify a compilation error to developer when insert_before
or insert_after part does not exist.

T2513

Reviewers: Hermet, NikaWhite

Subscribers: cedric, jpeg

Maniphest Tasks: T2513

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:42:59 -08:00
perepelits.m 728eff8836 edje: implementation of Edje_3d
Summary:
I have a strange feeling that I always commit the same code to edje-3d, I hope it will finish very soon.
However here are some important new keywords, descriptors for them, methods for models,
structure for providing animation in edje programs and some more changes.

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: jpeg, artem.popov

Projects: #efl

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 14:03:15 -08:00
Jean-Philippe Andre a5d0284820 Edje: Directly embed TGV files inside EDJ when possible
This checks that the ETC format is the same, and then proceeds
to simply stuff in the TGV file inside the EDJ as an "edje/image/n"

This will save a huge amount of time since now you just need
to encode an image once to TGV (ETC1 or ETC2) and you can reuse it
directly without re-encoding.

To use this, convert images with ecore_evas_convert and then
add them to EDC with the ".tgv" extension and the proper LOSSY format.
The quality argument will then be ignored.

@feature
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre 8e00403047 edje_cc: Allow PROXY as clipper (clip_to and desc.clip_to)
This arbitrary limitation can now be lifted since masking
is well supported (ie. clip_to can point to an IMAGE rather than
a RECT).

@feature
2015-10-01 22:08:46 +09:00
Jean-Philippe Andre ad268c1d94 edje_cc: Check default state as well
Strangely only the other states were checked for errors. Errors
include:
- no name for state, or "description with missing state"
- invalid clip_to

Also improve the error message a bit
2015-10-01 21:45:32 +09:00
Jean-Philippe Andre 7c8ca6b752 edje_cc: Fix TEXT part validation for aliased parts
Not 100% sure of this fix but it "works". This is just compile-time
safety checking code after all, so it won't impact any existing
application.

This fixes commit d4444bf7a0. Tested with empc.

Thanks @zmike for the report and test case.
2015-10-01 18:07:04 +09:00
Carsten Haitzler 76c854433f efl - edje_cc - fix double close of embryo script fd's to tmp files
@fix

thanks to 김낙경 <nakkyong.kim@samsung.com> for pointing this out.
indeed fclose() closes the fd adopted by fdopen(). it doesn't dup it.
so we double-closed. it seems this never caused an issue until now.
this should fix it.
2015-09-21 16:50:17 +09:00
Mykyta Biliavskyi d4444bf7a0 Edje_cc: check value for text.source attribute.
Summary:
Add additional check for description.text.source
and description.text.text_source attributes in TEXT part.
For cases when as source uses non TEXT/TEXTBLOCK part
serialization process should be stopped. This will cause
segmentation fault on runtime. (see edje_text.c line 251)

Reviewers: Hermet, raster, cedric, jpeg

Subscribers: cedric

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

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-09-08 18:41:19 +09:00