Commit Graph

49151 Commits

Author SHA1 Message Date
Jean-Philippe Andre 9cf72fe80a gfx: Add NULL check to silence coverity
realloc() can return NULL if size is 0. It's like free().
So, the usage here is correct, and there are probably no
points to interpolate between anyway. I wonder if there
can be commands without points, though.

Fixes CID 1293004
2016-07-13 16:18:54 +09:00
Jean-Philippe Andre 1b6825d3fe edje: Fix coverity warning
CID 1355234 Logically dead code

The indicated dead code may have performed some action;
that action will never occur.
In eet_data_descriptor_element_add: Code can never be
reached because of a logical contradiction (CWE-561)

Solution: use explicit range within valid values with <= and >=
rather than excluded values with > and <
2016-07-13 15:44:58 +09:00
Jean-Philippe Andre cdc8d15a5c edje: Add missing 'break' in edje_embryo switch
Fixes CID: 1352521 1352522 1352523 1352524 1352525

See 4ed9b8325
2016-07-13 15:34:17 +09:00
Jean-Philippe Andre 3ad848f5c5 evas: Fix some CID in generic loaders
Check the return value of fwrite. There is nothing
sensible to do as the receiver needs to handle the error
gracefully.

CID 1356613, 1356614, 1356615, 1356200
2016-07-13 15:21:06 +09:00
Jean-Philippe Andre 0368adfcba pdf: Tentative implementation of mono support
No idea if it's correct, since I have no sample.
Also, simplify ARGB code.
2016-07-13 15:06:42 +09:00
Jean-Philippe Andre db27a6b940 pdf: Fix page index and
The module was not able to load any PDF with a single page (since
the index starts from 0, not 1 as it was assumed).

Also, fix a CID where Coverity was very very right.

Fixes CID 1356608:

The operaton may have an undefined behavior or yield to an
unexpected result.

In poppler_load_image(int, int): A bit shift operation has
a shift amount which is too large or has a negative value.
2016-07-13 15:04:47 +09:00
Jean-Philippe Andre 3d16cdc67e embro_cc: Shut up some coverity warning
CID 1039677 1039678 1039679

The expression's value does not depend on the operands; often,
this represents an inadvertent logic error.

In doarg: An operation with non-constant operands that
computes a result with constant value (CWE-569)

cell is defined as an int, not a long, so it can't be > INT_MAX.
2016-07-13 13:19:01 +09:00
Jean-Philippe Andre bed1e28d85 elm test: Shut up coverity warning
CID 1354839

It was non-sensical as there would be no iterator
if there are no children.
2016-07-13 12:58:43 +09:00
Jean-Philippe Andre 5871593ed1 elm test: Fix non sense check
CID 1353720 1353721
2016-07-13 12:02:20 +09:00
Jean-Philippe Andre 0106455588 edje_cc: Fix minor coverity defect
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.
2016-07-13 11:57:07 +09:00
Jean-Philippe Andre 82f546fc1f edje_pick: Fix use after free
Fixes CID 1267458 (trying again)
2016-07-13 11:16:33 +09:00
Felipe Magno de Almeida d2dd1e744a eo-cxx: Fix C++ use of new _eo_add_end signature 2016-07-12 17:28:38 -03:00
Chris Michael e0ed943936 elementary: Properly swallow wayland clients
This patch fixes an issue where wayland windows would not swallow
clients properly. Basically, we should be swallowing the elm window
layout directly rather than use a rectangle (as was previous). This
commit also waits until the internal elm theme has been applied to the
sd->edje object before adding the wayland window frame.

This commit has the added benefit of being able to remove an additional
Evas_Object from the internal data structure.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-12 09:44:14 -04:00
Chris Michael 4b67b79171 elementary: Clip window swallow clients
This commit sets up a client_clip for the windows client being
swallowed so that during resize, any window contents do not draw
outside the window.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-12 09:43:19 -04:00
Chris Michael cd1f2539fd Revert "efl theme for wayland borders - dont accept events on client swallow"
This reverts commit fdaefdbf9a. This is
being reverted because the issue of wayland borders not swallowing
clients has now been fixes and thus mouse_events work as expected wrt
client swallow.
2016-07-12 09:42:23 -04:00
Carsten Haitzler fdaefdbf9a efl theme for wayland borders - dont accept events on client swallow 2016-07-12 21:04:27 +09:00
Daniel Kolesa d70cbecc3a docs: generate more info about events 2016-07-12 11:14:03 +01:00
Tom Hacohen fdc0eef770 Eo add ref: Fix a bug causing leaks and wrong refcount in some cases.
When using eo_add_ref, it was increasing the refcount before the user
context in the addition has fully ended. This means the object had its
reference increased while still not finalized, which means it was
sometimes passed with an increased refcount to unsuspecting class code.
The correct behaviour is to increase the reference count just before
returning the object to the user at the end of eo_add so the reference
count is only increased for whoever asked for it.

Breaks ABI!

@fix
2016-07-12 11:09:40 +01:00
Tom Hacohen a5eb66edd4 Eo refcount: Split the refcount to private and public (user).
This commit changes the way refcount is dealt with internally. Before
this commit, there was one refcount shared between Eo internals and
users. Now there is a refcount for eo operations (like for example,
function calls) and one for user refcount (eo_ref).

An example bug that this protects against (which is seemingly rather
common) is:
some_eo_func(obj);

// Inside the implementation of that func:
pd->a = 1; // The object's private data
eo_unref(obj); // To delete the object
eo_unref(obj); // A big one extra unref
pd->a = 2; // Segfault, this data has already been freed

This is a feature, but really just a fix for a class of bugs.

@feature
2016-07-12 11:09:40 +01:00
Daniel Kolesa 41abda37f6 elua: event method fixes in eolian bindings 2016-07-12 11:09:05 +01:00
Carsten Haitzler 9f2ba9834e elm config - fix previous commit missing strdup
oops - accidentally removed the strcpy. fix
2016-07-12 18:23:12 +09:00
Carsten Haitzler 1ec9ee2a92 elm config - use eina_str_tolower not tolower from libc 2016-07-12 18:20:34 +09:00
Carsten Haitzler 2936834d31 elementary - fix focus switching again after break
this fixes T4053

this was due to everal widgets haveing changed their class names and
are using the new names for mapping to keybinding config that used
legacy names to match binding to widget.
2016-07-12 18:06:13 +09:00
Daniel Hirt c9787e4c38 Ui text: port more functionality to the test
- Make "Sel" button work
  - Make "Ins" button to insert emoticons
2016-07-12 11:01:45 +00:00
Daniel Hirt a7cb1eb502 Ui text: track changes made in text object
This is required when a user uses the Efl.Canvas.Text API to change the content.
2016-07-12 11:01:45 +00:00
Daniel Hirt f9deaa9be9 Canvas text: add "changed" event
We need to keep track on changes of content.
2016-07-12 11:01:45 +00:00
Daniel Hirt 0c38846e33 Canvas text: fix annotation set
The cursor position was not set correctly to the respective fnode, causing
annotation to not be applied correctly with text that has more than one
paragraph.
2016-07-12 11:01:45 +00:00
Daniel Hirt 113f828b3c Ui text: bring back selection handlers support 2016-07-12 11:01:45 +00:00
Daniel Hirt fe69830261 Ui text: cleanup some port leftovers 2016-07-12 11:01:45 +00:00
Daniel Hirt 491b323d06 Ui text: instantiate canvas text obj before smart_add 2016-07-12 11:01:45 +00:00
Daniel Hirt 51e4ec2d5c Ui text: bring back some atspi support 2016-07-12 11:01:45 +00:00
Daniel Hirt 420d9373cf Ui text: cleanup ifdef 2016-07-12 11:01:45 +00:00
Daniel Hirt 2bc943d3bb Ui text: make scroller work 2016-07-12 11:01:45 +00:00
Daniel Hirt 1032198946 Ui text: use the right clip 2016-07-12 11:01:45 +00:00
Daniel Hirt 7ff05af885 Ui text: don't null-check for free() 2016-07-12 11:01:45 +00:00
Daniel Hirt dac18347c4 Ui text: remove old edje callbacks 2016-07-12 11:01:45 +00:00
Subodh Kumar e0251ad46f Edje entry: Do not update anchors outside viewport.
Summary:
Do not update anchors outside viewport.

Problem is that when entry contains large number of anchors,
scrolling and launch performance is degraded due to lots of objects
being created and maintained, so to enhance the performance of
entry with anchors,  anchors is not  updated outside the viewport.

Test Plan:
1. Should have large number of anchors in entry
2. Observe the launch and scrolling performance.

Reviewers: tasn, raster, herdsman

Subscribers: thiepha, raster, cedric, jpeg

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D3543
2016-07-12 10:50:53 +00:00
Minkyoung Kim fd1917e90d evas/gl_generic: Recreate texture when native surface image size is changed.
Summary:
Now, if image is native, do not recreate texture when image size is changed.
Recreate next native surface set time. So during the time between image_size_set and native_surface_set, native image is fragile. Fix it.

Test Plan: Local Test

Reviewers: spacegrapher, jpeg, wonsik, dkdk, raster

Reviewed By: raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4153
2016-07-12 14:11:37 +09:00
Shinwoo Kim c52eda0bf1 edje: the repeat_events property of swallowed object probably should follow the repeat_events property of swallow part object
Summary: Need discussion about the repeat_events property

Test Plan: Swallow an object which has EINA_TRUE repeat_events to a swallow part which has EINA_FALSE repeat_events

Reviewers: Hermet, cedric, raster, jpeg

Reviewed By: raster, jpeg

Subscribers: jaehwan, seoz, woohyun

Differential Revision: https://phab.enlightenment.org/D3580
2016-07-12 10:53:32 +09:00
Youngbok Shin 982ef0b9d0 Edje calc: Fix Evas Text width calculation with ellipsis
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
2016-07-12 10:48:17 +09:00
se.osadchy f796f04aae evas: fix work of engine on macOS.
Summary: Update eng_image_free function and check of references.

Reviewers: thiepha, NikaWhite, FurryMyad, raster, cedric

Subscribers: raster, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-07-11 10:54:50 -07:00
Chris Michael 5fc4b971dc ecore-wl2: Fix issue of misleading 'if' statement
Gcc reports that this 'if' statement is misleading due to indentation.
We should only be sending the 'finish' call if the dnd version
supports it, however we should always be sending 'destroy'

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-11 11:56:17 -04:00
Chris Michael ce9379398f edje: Fix issue of null pointer dereference
Coverity reports that 'text' here is a null pointer dereference so
check for valid 'text' variable before trying to use it.

Fixes Coverity CID1267490

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-11 11:20:23 -04:00
Daniel Kolesa a8eb31f146 docs: generate proper descriptions for structs and enums 2016-07-11 16:04:06 +01:00
Daniel Hirt 0c23985626 Canvas text: fix corner case in range geometry calc
The trivial case of [pos,pos] (i.e. range of length 0) didn't work if there is a
format item in 'pos'.
The condition was fixed to not include such items. The reason it was not
apparent for text items is that these have further handling in the rest of the
code and would've been disposed of.

@fix
2016-07-11 16:39:51 +00:00
Prince Kumar Dubey 8fbb6dbbbb If there is situation when server is closed prior to client, the client pointer pointing to server must be reset and check must be there during client deletion
Summary: During mobile product testing, we got a crash with callstack which suggest server is getting deleted prior to client. On valgrind analysis we found invalid write operation with same callstack. callstack is pasted in comment section.

Test Plan: create a situation where server got deleted prior to client.

Reviewers: raster, cedric

Subscribers: govi, rajeshps, jpeg

Differential Revision: https://phab.enlightenment.org/D4152
2016-07-11 22:29:04 +09:00
Carsten Haitzler 4329a359dc edje_cc handle theoretical string overflow (not real) shhh coverity
these strings are internal fixed strings so never bigger than buffer,.
but silence coverity to avoid noise. fixes CID 1355588 , 1355589
2016-07-11 22:23:58 +09:00
Carsten Haitzler 52f752f73d evas render2 region - handle if src region is empty correctly on add
fix coverity CID 1313542
2016-07-11 22:16:06 +09:00
Carsten Haitzler 485074df3a evas engine cache - drop useless iff that assert already checked
CID 1267465 pointed this out - assert(eim) already checked this so no
need to do it again - looks confusing
2016-07-11 22:09:12 +09:00
Carsten Haitzler 2b413d3f87 evas cache - avoid possible deref of null pointer
this fixes CID 1267472
2016-07-11 22:06:16 +09:00