Summary:
If there is no given pathes for image files as parameter of edje_cc,
"img_dirs" will be NULL. Then, a local variable "load_err" is always
EVAS_LOAD_ERROR_NONE. Because of this, the "if" condition just after
EINA_LIST_FOREACH() will fail. It causes memory leak from "iw".
@fix
Test Plan: N/A
Reviewers: raster, cedric, jpeg, woohyun
Differential Revision: https://phab.enlightenment.org/D5285
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
For programs without specific names edje_cc generated default names in
the form of program_$MEMORY_ADDRESS. That worked well enough for keeping
the names unique, but it causes problems if one wants to have these files
being binary reproducible due to different memory layouts, compilers,
etc. Simply using a counter as unique part should work well enough for
our use case and help people who want to verify builds.
Thanks a lot to Bernhard M. Wiedemann for review and testing.
Fixes T5113
Ref T5495
in code we importend that doesnt use eina we have warnings of
fallthroughs. all o them are commented to be fallthrough so add the
attribute there too to have fewer warnings.
This amends 8e311db414 as the logic
was badly broken. A "shadow" variable warning
clearly showed that "tmp" was not used properly.
This fixes the "IBM" logo in svg-test (the only one
using polygon/polyline, it seems).
analysers like PVS studio dont know the eina_list_free returning NULL
design pattern for consistency and so dislike the var being set twice
in a row. this will make them happy without any skin off our backs.
not a bug at all.
found by PVS studio
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
Summary:
Although user use "inherit" in a state of proxy part,
the inherit function does not copy the source_visible and
the source_clip value of parent to the state.
Test Plan: {F1751132}sample
Reviewers: jpeg, cedric
Differential Revision: https://phab.enlightenment.org/D5017
@fix
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
Summary:
efl_version will be used to figure out which version of EFL lib
is used to develop a edje file.
If there is no property of efl_version, it will be 1.19 as default.
This feature is needed to fix T5548.
Example:
efl_version: 1 20
@feature
Test Plan: N/A
Reviewers: cedric, jpeg, herdsman, zmike, raster
Reviewed By: cedric
Maniphest Tasks: T5548
Differential Revision: https://phab.enlightenment.org/D4961
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
PVS sudio thought this was odd and it was a bit. not a real issue as a
mem alloc failure herw would still be fatal and simply a crash... as
opposed to a clean "out of mem" and fatal exit then...
error out eally was not finding originally allocated color and the
malloc should have been a mem_alloc() that guarantees a valid memory
return (or termintion of the process).
@fix
The function parse_str returns allocated memory which should be freed
before we exit this function.
Fix Coverity CID1374644
Signed-off-by: Chris Michael <cp.michael@samsung.com>
The function parse_str returns allocated memory which should be freed
before we exit this function.
Fix Coverity CID1374647
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Currently, script block is removed when an edje group inherits from other group
after defining its own script block.
group { "somegroup";
script {
...
}
parts {
...
}
inherit: "othergroup"; // <= previous script block is removed here.
}
If parent group doesn't have script block, it doesn't need to overwrite previous
one. This will keep script block and print warning when script block is overwritten.
Summary:
part.clip_to statement has short handler named "part.clip"
while part.description.clip_to does not.
Its short handler name should be "part.description.clip"
in order to have same experience with "part.clip".
Reviewers: cedric, Hermet, jpeg, conr2d
Reviewed By: conr2d
Subscribers: conr2d
Differential Revision: https://phab.enlightenment.org/D4789
Reviewers: jpeg, jypark
This could lead to a crash as we were checking against NULL on
the wrong pointer.
@fix
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4762
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Previously, edje_cc in a path containing space character was not
supported. (e.g. "/usr/local/s p a c e/bin/edje_cc")
Now, to resolve above issue, edje_cc path is treated with double
quotation marks.
On Windows, if command begins with double quotation marks, then the
first and the last double quotation marks may be either deleted or not.
(See "help cmd" on Windows.)
Therefore, to preserve the string between the first and the last double
quotation marks, "cmd /S /C" and additional outer double quotation marks
are added.
Previously this functional was miss. Edje_Pick was tried to copy fonts
from data block "edje_source_fontmap" what always empty because edje_cc
never fill it.
This patch rework the fonts copy from input files.
@fix
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
This reverts commit 5ae6e1db2f.
On Windows, system() does not execute file if the argument of system()
begins with double quotation marks.
(e.g. system("\"C:\efl\lib/edje/utils/v-1.18/epp.exe\" ...");)
To resolve this issue on Windows, it has been fixed to have the argument
of system() not begin with double quotation marks.
(i.e. Do not use double quotation marks for epp.exe path in system().)
Double quotation marks convert macros to a single macro string and only
the first macro becomes valid.
So double quotation marks are not used for macros.
Summary:
Program lookups triggered by removed edje program should be removed when removing
edje program, but program lookups for removed program should be kept to check
exitence of removed program.
This patch keeps lookups for removed program.
Reviewers: cedric, jpeg
Reviewed By: jpeg
Differential Revision: https://phab.enlightenment.org/D4544
Previously, edje_cc could not compile EDC file whose path contains space
character since edje_cc interpreted the EDC file as separate 2 inputs.
(i.e. "input file.edc" was interpreted as "input" and "file.edc")
This patch enables edje_cc to interpret above case correctly.
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
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.
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'
This reverts commit 9730eb1f47.
This introduces new issues, such as:
Warning: naviframe.edc:451: couldn't find an exact match in
part 'elements_clip' when looking for 'hidden' 0.000000. Falling
back to nearest one 'hidden' 0.000000.
Because some comparison was not done properly, and changed
float != 0 to float == 0.
Get it right if you insist on "fixing" those floating point
comparisons.
collections.group.parts.part.allowed_seats keeps a list
of seat names to be used for events filter.
So when evas devices of seat type are added, filters
may be applied for each part.
If no seat is listed, every seat may interact with such
part.
collections.group.use_custom_seat_names should be set to '1'
to use seat names on signals as provided by Evas.
By default just follow Edje naming approach
("seat1", "seat2", ...)
If not provided, FOCUS_OBJECT action will keep acting
over default seat.
Also include a usage on edje-multiseat test
(actually no example was exercising this action).
Seat goes as an optional parameter for FOCUS_SET (if not
provided, act over default seat), and emit signals
with seat suffix:
* focus,in,$SEAT
* focus,out,$SEAT
* focus,part,in,$SEAT
* focus,part,out,$SEAT
A lot of cases were missed, cases that are making resulting edj file
useless.
> Now export all aliases
> If group "1" source of group "2" which is source of group "3", it will
> be imported as well!
@fix
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
Summary:
Fix parsing error which occurs when lazEDC keyword is combined
with other keyword by period. (like parts.rect)
@fix
Test Plan: Download attached file and run "make"
Reviewers: Hermet, cedric, jpeg
Subscribers: taxi2se
Differential Revision: https://phab.enlightenment.org/D4309
Summary:
When removing program, program lookups for its after programs
should be removed.
@fix
Reviewers: cedric, jpeg, Hermet
Reviewed By: Hermet
Subscribers: taxi2se
Differential Revision: https://phab.enlightenment.org/D4286
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
Previously, it was limited to the part block. It was a mistake
and should have been put in the description instead, as this
allows it to change during state transition (like visible, or
proxy_src_visible).
@feature
fill spread and angle have never been used - resevred intitially for
gradient objects, but never put into use, so remove to get rid of
junk/memory footprint etc.
@optimize
this fixes programs that inherit and play audio on specific channels.
i found that sound worked on single line entries but not multipline
beause single line inherit from multi but didnt copy this program
param - the channel number. this fixes this
@fix
Summary: We use int from 0 to 255 for color, not float
Reviewers: raster, Hermet, cedric
Reviewed By: cedric
Subscribers: jpeg, artem.popov
Differential Revision: https://phab.enlightenment.org/D4182
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary: change specular color to ambient int the function of ambient color
Reviewers: cedric, raster, Hermet
Subscribers: jpeg, artem.popov
Differential Revision: https://phab.enlightenment.org/D4169
Parts can use enother groups as source, for example textblock. If source
groups does not exist - group is not valid. This patch extend the group
copy process and copy dependend group too.
@fix
Summary:
When using EDC written by another person, developer usually
does not need to know all specified parts in EDC but editable
like swallow, text or textblock parts.
The required flag tells whether the part is intended to be used outside EDC.
Reviewers: jpeg, cedric, raster, Hermet
Reviewed By: jpeg, raster
Subscribers: raster, NikaWhite, kimcinoo, jpeg
Differential Revision: https://phab.enlightenment.org/D3579
CID 1261439
An assigned value that is never used may represent unnecessary computation,
an incorrect algorithm, or possibly the need for cleanup or refactoring.
In source_fetch_file: A value assigned to a variable is never used. (CWE-563)
Tested compilation of a few EDC files with no breakage.
Summary:
To keep consistency with Evas Textblock part in edje,
text.min has to work logically even if ellipsis is enabled.
If a Text part has minimum width, maximum width and "text.min: 1 X;",
Text part should be expanded until its width reaches to the maximum width.
Then, ellipsis will work. Singleline Textblock is also working like this.
@fix
Reviewers: cedric, herdsman, raster, tasn
Subscribers: Blackmole, z-wony, jpeg
Differential Revision: https://phab.enlightenment.org/D3587
Summary: check if the size of scene is bigger than 0x0 and build 3D scene in the edje_player in this case and use "opengl_x11"
Reviewers: Hermet, jpeg, cedric
Subscribers: NikaWhite, Oleksander, artem.popov, cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4041
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
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