Yeongjong Lee [Tue, 20 Aug 2019 04:43:15 +0000 (04:43 +0000)]
efl_ui_panel: remove dependency with elm_interface_scrollable
`elm_interface_scrollable` is replaced with `efl_ui_scrollable_interative`.
Legacy code related to `SCROLL` event is removed because eo `SCROLL` event have
`void` event info.
```
in lib/efl/inferfaces/efl_ui_scrollable.eo
scroll: void; [[Called when scrolling]]
```
I think we need to add new `PANEL_SCROLL` event that have `Efl_Ui_Panel_Scroll_Info`
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9637
Yeongjong Lee [Wed, 21 Aug 2019 08:44:20 +0000 (08:44 +0000)]
efl_ui_widget: correct the comparison parameter in scroll_freeze_push
I guess it is copy/paste error.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9669
Hermet Park [Wed, 21 Aug 2019 09:14:48 +0000 (18:14 +0900)]
example: replace svg resource and load it properly.
JunsuChoi [Wed, 21 Aug 2019 08:53:14 +0000 (17:53 +0900)]
elementary_test: Add the animation view test
Summary:
Add an animation view item to test vector animation on elementary_test.
If Evas Vg Json(Lottie) Loader is not supported,
use the vector class to output the svg file.
Depends {D9451}
Test Plan:
elementart_test
Animation View
Reviewers: Hermet, smohanty, kimcinoo, zmike
Subscribers: zmike, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9472
Yeongjong Lee [Wed, 21 Aug 2019 07:43:55 +0000 (07:43 +0000)]
efl_ui_widget: fix dereference null return value issues
Dereference null return value issues is reported by Coverity.
If `sd` is NULL, it will return zero values.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9668
Yeongjong Lee [Wed, 21 Aug 2019 02:52:06 +0000 (02:52 +0000)]
efl_ui_collection: use length value for even parameter of eina_spans_intersect
Parameter of `eina_spans_intersect` are pairs of point and length.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9655
Marcel Hollerbach [Sun, 18 Aug 2019 16:27:37 +0000 (18:27 +0200)]
efl_ui_position_manager_common: generalize code
move the same code to a common header file.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9630
Marcel Hollerbach [Sun, 18 Aug 2019 11:51:30 +0000 (13:51 +0200)]
replace item_container benchmark
the new one has the correct name, can test grid and list, has a
changable amount of items. Additionally, it prints the pid on startup, which is usefull for perf related debugging.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9609
Marcel Hollerbach [Sat, 17 Aug 2019 12:32:36 +0000 (14:32 +0200)]
efl_ui_position_manager_grid: start to honor group items
This commit introduces the correct placement of group items and normal
items. The gruop items are also floating on the top of there child items
in case they are not visible on theire own. Items without group items
between items with groups are right now a little bit troublesome and
might display the wrong group, we *need* to check later on if this case
is even needed or not.
The whole placement code now uses 2 different caches, one cache is
counting how many groups we have, and how many items each group has.
Additionally, the size of the header + the state of the header is
safes. The second cache does translate that into how much size one full
group needs on the screen to be placed, this makes the calculation of
the correct item placement a lot faster.
The invalidation of the caches is also quite good. The size cache only
depends on the viewport size and the group cache, which means its
*never* recaclulated on a normal scroll operation. Only if items are
added, or the widget is resized (The later case can also be more
optimized). The group cache is only invalidated when new items are
added (Which is normally not happening during rendering)
ref T8115
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9608
Marcel Hollerbach [Sat, 17 Aug 2019 13:59:54 +0000 (15:59 +0200)]
efl_ui_position_manager_common: fix buffer_id
the buffer was accessed with the wrong id, buffer_id should be used.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9607
Marcel Hollerbach [Fri, 16 Aug 2019 15:44:58 +0000 (17:44 +0200)]
efl_ui_position_manager_list: make it handle group items
this makes the group items stick at the top of the viewport, if the
corresponding items in there do have the item available.
For now items between two groups are not really handled, the group
header will still just be displayed.
The code for this feature is explicitly written in a single block, it
was said that we might want to have this able to be enabled / disabled
later on.
This commit also shuffels the code here a bit, one single method just
got too long.
ref T8115
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9587
Marcel Hollerbach [Fri, 16 Aug 2019 12:06:46 +0000 (14:06 +0200)]
efl_ui_position_manager: pass on information about group ids
every batched call will now contain the id of the first item, if the
conditions in the documentation are met.
ref T8115
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9586
Marcel Hollerbach [Fri, 16 Aug 2019 11:24:10 +0000 (13:24 +0200)]
elm_test: add group items
this is just to showcase them for now, for now they are positioned
wrong. later revisions will handle the correct positioning
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9585
Marcel Hollerbach [Fri, 16 Aug 2019 10:54:44 +0000 (12:54 +0200)]
elm_test: rename file and remove wrong names
additionally, we can just use efl_ui_list and grid class here, no need
for more complex stuff
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9584
Marcel Hollerbach [Fri, 16 Aug 2019 06:46:00 +0000 (08:46 +0200)]
introduce group item
this brings a group item in the style of genlist / gengrid group items.
The group item theme does currently not provide the signals in the theme
that would be needed for selecting it. This is kind of intended, but we
might need API to express that.
ref T8115
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9583
Marcel Hollerbach [Fri, 16 Aug 2019 07:32:28 +0000 (09:32 +0200)]
efl_ui_default_item: remove item parts
these parts are hard copies of the part implementations given from the
layouts. Replacing them with the layout implementation just works
ref T8115
Differential Revision: https://phab.enlightenment.org/D9582
Marcel Hollerbach [Fri, 16 Aug 2019 07:05:24 +0000 (09:05 +0200)]
introduce default item
default item is used as base class for all "normal style" efl items.
A "normal style" efl item does have a text,content & extra part.
- The text part is usally used to express some text in the item
- Content part is the *main* content part where the user attention is
on.
- Extra can be used to display some elements that are not directly
getting the attention of the user, it can be seen as something more than
the decoration item field.
ref T8115
Differential Revision: https://phab.enlightenment.org/D9629
Jaehyun Cho [Fri, 23 Aug 2019 08:15:21 +0000 (17:15 +0900)]
elementary: fix build error of efl_ui_animation_view.eo on tizen
fix build error of duplicate efl_ui_animation_view.eo on tizen
Change-Id: I9a9f266e323f415e77010d34beb611613a56d6c8
Yeongjong Lee [Wed, 21 Aug 2019 10:00:30 +0000 (19:00 +0900)]
efl_ui_animation_view: add document of Efl.Ui.Animation_View_State enum
Summary:
This patch will fix mono compiler error.
```
src/bindings/mono/efl_ui_animation_view.eo.cs(2809,13): error CS1591: Warning as
Error: Missing XML comment for publicly visible type or member `Efl.Ui.AnimationViewState'
```
Test Plan: meson setup -Dbindings=mono,cxx
Reviewers: Jaehyun_Cho, SanghyeonLee
Reviewed By: Jaehyun_Cho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9672
Change-Id: Id083792f1537c60d9204d93c57a556ee519ed3a7
Hermet Park [Wed, 21 Aug 2019 09:14:48 +0000 (18:14 +0900)]
example: replace svg resource and load it properly.
Change-Id: Ib47b971a2931502dc79a9633045598888caab11f
JunsuChoi [Wed, 21 Aug 2019 08:53:14 +0000 (17:53 +0900)]
elementary_test: Add the animation view test
Summary:
Add an animation view item to test vector animation on elementary_test.
If Evas Vg Json(Lottie) Loader is not supported,
use the vector class to output the svg file.
Depends {D9451}
Test Plan:
elementart_test
Animation View
Reviewers: Hermet, smohanty, kimcinoo, zmike
Subscribers: zmike, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9472
Change-Id: I6e402cc9b15fe14aebd78c88406cbb0044a6faa3
Hermet Park [Wed, 21 Aug 2019 08:39:43 +0000 (17:39 +0900)]
efl_ui_animation_view: introduce a new widget for controlling vector animation.
Summary:
This is a new convenient ui control that designed to load vector resources
-svg, json-, and control animations if it supports.
Please turn on evas-loaders-json in meson options,
if you'd like to use Lottie Animation.
Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>
@feature
Reviewers: #committers, jsuya, zmike, bu5hm4n
Reviewed By: #committers, bu5hm4n
Subscribers: zmike, bu5hm4n, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9451
Change-Id: I5afaf9e5718a9b311013e272c99170d50132e82f
Yeongjong Lee [Wed, 21 Aug 2019 06:48:14 +0000 (15:48 +0900)]
elm_focus: keep legacy focus logic
This patch disable focus manager patch and restore legacy focus code.
@TIZEN_ONLY
Change-Id: I0a6fcb54261d16393888efdc83c306ee2a66dbb7
Marcel Hollerbach [Tue, 20 Aug 2019 09:04:23 +0000 (11:04 +0200)]
efl_ui_widget: remove unused field
its not used ...
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9647
Change-Id: I9cde09bab511dd504953001867cfda3c5444ac55
Marcel Hollerbach [Tue, 20 Aug 2019 07:32:33 +0000 (09:32 +0200)]
efl_ui_widget: do not walk parent chain for none legacy cases
walking here the parent chain can be very costly, esp. if you make a lot
of widgets visible or hide them. With this commit we ensure that we only
walk the parent chain when there is a custom chain, which is only the
case in legacy. This gets us about 2-3 FPS on the rpi with the
item_container benchmark.
With earlier commits, tree_unfocusable and disabled is honoring the
whole parent chain, so checking that alone, without the parent chain, is
fine.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9645
Change-Id: I27063cbe09bc2f516fe623cf70bc3e11aacdca41
Marcel Hollerbach [Tue, 20 Aug 2019 07:20:44 +0000 (09:20 +0200)]
efl_ui_widget: make treeunfocusable state easier
Before this patch tree unfocusable set just set a simple flag, getting
this state however forced you to traverse the whole parent chain to get
the real result.
With this patch the setting of the unfocusable flag is heavier as it
walks all the children of the widget, however, the getting of the flag
is way easier now. The next revision will refactor the focus related
APIs for that.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9644
Change-Id: I135a01a484bc111856e1e26f4b082fad24694911
WooHyun Jung [Tue, 20 Aug 2019 13:09:14 +0000 (09:09 -0400)]
elm_slider: remove dependency with efl_ui_slider
Summary:
This commit includes follwoing works.
1. change parent class from EFL_UI_SLIDER_INTERVAL
to EFL_UI_LAYOUT_BASE
2. get all necessary codes from efl_ui_slider and
efl_ui_slider_interval to elm_slider
3. add callbacks to slider test code
ref T7893
Test Plan:
1. elementary_test
2. slider
3. operate sliders on the window
Reviewers: bu5hm4n, segfaultxavi, eagleeye, zmike
Reviewed By: zmike
Subscribers: zmike, cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7893
Differential Revision: https://phab.enlightenment.org/D9623
Change-Id: Id878176ddbb842951fc422f465559e087ee358ac
subhransu mohanty [Mon, 12 Aug 2019 23:18:39 +0000 (23:18 +0000)]
edje/optimization: keep a style hash for fast retrival of styles
As edje mostly deals with style string. to get the style data each time
it linearly search through list to find out the style which is not very
cache friendly so keep a hash to do first lookup with less impact on cache.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9547
Change-Id: Iaea70dd61e54e85b83ac75a073f4ea2951f8dee7
subhransu mohanty [Tue, 20 Aug 2019 06:21:10 +0000 (06:21 +0000)]
edje/style: optimize updation of styles for a given text_style
Currently we do 2 pass updation. first we scan through all the styles
and check if they have text_style which matches the test_style we need to update
then we mark them dirty. then we call style_all_update() to go through the list
again and update those styles.
By combining them both in a single function we avoid scanning through the whole
list again.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9639
Change-Id: I28ee8aa29b64759116ed45c17905a0ed4a00dba2
subhransu mohanty [Tue, 20 Aug 2019 05:36:22 +0000 (14:36 +0900)]
edje/style: refactor style parsing to remove temporary dynamic string creation.
Summary:
pass a buffer to reparse() function for reuse.
create fontsource once and reuse.
Reviewers: ali.alzyod, Hermet, cedric, raster
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9636
subhransu mohanty [Mon, 19 Aug 2019 10:21:47 +0000 (19:21 +0900)]
edje/styles: keep an escaped string of font_set. As eina_ecaped_string() creates a new string just make it once and use when needed.
Reviewers: Hermet, ali.alzyod
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9615
subhransu mohanty [Tue, 13 Aug 2019 03:11:30 +0000 (03:11 +0000)]
edje/optimization: keep a readonly flag on edje_style.
Just to check if the edje style has text_class tag we do
lot of pointer hopping by linearly scan through the tags in the
style which is not very cache efficient.
by keeping a readonly flag we can avoid those acess if the style dosen't
have any text_class tags. and if we have those tags then we can start
updating the style straight away.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9546
Change-Id: Ib25e40d70cfed1e41a92d2e6b09619ce7eb6f9bc
Mike Blumenkrantz [Tue, 20 Aug 2019 12:12:35 +0000 (08:12 -0400)]
efl_ui/popup: watch for hint change (safely) on popup object
ensure that setting user hints on this object triggers a recalc
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9651
Marcel Hollerbach [Tue, 20 Aug 2019 09:02:39 +0000 (11:02 +0200)]
efl_ui_widget: remove x,y,w,h
this is used for storing the position and size of the widget. However,
just in elm_test this eats 2KB of ram, just for saving them. The cases
where they have been used do not seem like a great performance hotspot,
additionally, in the panel cases the privat data of the widget is
achived anyways, so eo is involved and we are spending some time there
anyways.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9646
Marcel Hollerbach [Tue, 20 Aug 2019 07:14:43 +0000 (09:14 +0200)]
efl_ui_widget: skip custom focus parent logic
asking for a parent provider only makes sense if we are having a custom
focus parent provider, otherwise this will just result in the normal
parent relation. Not doing this safes us a lot of time that we spent for
nothing in the focus evalulation code.
The gengrid change is needed as the parent provider should be applied
after the constructor is called, otherwise there is no garantee that
shared_win_data is not NULL.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9643
Marcel Hollerbach [Tue, 20 Aug 2019 06:58:52 +0000 (08:58 +0200)]
efl_ui_widget: add a place to share data
this introduces a shared place to all widgets. The shared pointer is
allocated in the window, as the window outlifes every widget that is
part of it.
This struct will be later used for further optimizations like:
1. There are really heavy focus operations which are only needed for
gengrid/genlst, there is no point in executing them if there is no
gen**** added to the window object. So we can skip the custom
parent_provider logic that is only introduced for gengrid / genlist.
2. Legacy focus APIs must do list walks, which means, on every focus
operation we always have to walk the full list up to the parent, which
is annoying and slow, as we *most of the time* do not use legacy focus
API.
This list can be continued, the above two cases are fixed in the next
revisions.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9642
Mike Blumenkrantz [Tue, 20 Aug 2019 13:11:18 +0000 (09:11 -0400)]
efl_ui/scroller: process edje signals during group calc
Summary:
scrollbars (and other parts) can have min sizes which affect sizing calcs,
so it's necessary to ensure that these signals are processed before trying
to size in order to get the correct size
Depends on D9593
Reviewers: bu5hm4n
Reviewed By: bu5hm4n
Subscribers: cedric, #reviewers, #committers
Tags: #efl_widgets
Differential Revision: https://phab.enlightenment.org/D9594
Mike Blumenkrantz [Tue, 20 Aug 2019 13:11:12 +0000 (09:11 -0400)]
efl_ui/popup: replace legacy image use with efl_ui_image
Summary: new widgets should not use legacy widgets internally
Reviewers: bu5hm4n
Reviewed By: bu5hm4n
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9590
Mike Blumenkrantz [Tue, 20 Aug 2019 13:11:07 +0000 (09:11 -0400)]
tests/popup: make text alert sizing test even more strict
Summary:
ensure that the internal label size is not wider than the scroller
text alerts should never need to scroll horizontally, so ensure that this
does not break
Reviewers: bu5hm4n
Reviewed By: bu5hm4n
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9589
Yeongjong Lee [Tue, 20 Aug 2019 13:07:07 +0000 (09:07 -0400)]
efl_ui_scroll_util: set drag_step of parent edje object
Summary: Depends on D9649
Test Plan: elementary_test -to 'efl.ui.scroller'
Reviewers: eagleeye, bu5hm4n, zmike
Reviewed By: zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9650
Yeongjong Lee [Tue, 20 Aug 2019 13:07:02 +0000 (09:07 -0400)]
efl_ui_scroll_util: emit edc signal that fix scroll arrow visibility
Summary:
"efl,action,scroll" signal will update arrow state.
ref T8051
Test Plan: elementary_test -to 'efl.ui.scroller'
Reviewers: eagleeye, bu5hm4n, zmike
Reviewed By: zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8051
Differential Revision: https://phab.enlightenment.org/D9649
Hermet Park [Tue, 20 Aug 2019 11:24:27 +0000 (20:24 +0900)]
Revert "ector: code refactoring."
This reverts commit
dad166f84a02cfffc2a07bc804e7b7e35ed4a40d.
Ector is not public, this breaks enlightenment compilation,
Hermet Park [Tue, 20 Aug 2019 09:18:31 +0000 (18:18 +0900)]
ector: code refactoring.
Current vector drawing requires several methods for compositing,
it's shouldnt have only masking but other blending functions
such as matte in lottie, porter&duff in android, etc.
Previously we didn't specify this method name,
just reserved the options and now we started to define the methods
with ector_renderer_composite_method() instead of mask_set().
Marcel Hollerbach [Mon, 19 Aug 2019 08:23:40 +0000 (10:23 +0200)]
efl_ui_widget: optimize size / position setting
calling geometry set here is again calling the API in canvas object that
splits this call to size_set and position_set which means we spent quite
a bit of time in eo, just to call the same APIs we could call directly.
With this commit here, the calls are directly going to the right
objects, with the right API.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9619
Marcel Hollerbach [Mon, 19 Aug 2019 08:18:45 +0000 (10:18 +0200)]
efl_ui_focus_manager_calc: use a mempool instead of calloc / free
if we are heaving a streak of showing / hiding a lot of widgets we free
and calloc the same nodes all the time. This now lowers the amount of
callocs / frees that we are doing
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9618
Marcel Hollerbach [Mon, 19 Aug 2019 08:17:50 +0000 (10:17 +0200)]
efl_ui_focus_manager_calc: safe if this is root in a flag
otherwise we would need to get the private data of the focus manager
which is quite a heavy operation. This is slowing down enormously the
visibility setting of widgets.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9617
Marcel Hollerbach [Wed, 7 Aug 2019 15:20:38 +0000 (17:20 +0200)]
efl_ui_focus_manager_calc: optimize item deletion
if there is high frequency adding and deleting of items, the deletion
here can be quite heavy, this makes freeing a little bit faster.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9616
Hermet Park [Tue, 20 Aug 2019 02:23:59 +0000 (11:23 +0900)]
canvas svg: fix to apply premultipled color.
fill colors should be premultiplied with fill opcaity.
Hermet Park [Tue, 20 Aug 2019 01:54:32 +0000 (10:54 +0900)]
evas vg: code refactoring.
try reduce code section size,
no logical changes.
Lauro Moura [Tue, 20 Aug 2019 00:31:20 +0000 (21:31 -0300)]
csharp: MVVM parts support
Summary:
Parts binding will follow a similar approach to regular property
binding:
`var error = factory.PartName().PropertyName().Bind(modelProperty);`
* Changed both `Bind()` overloads to return the error code from
`efl_ui_property_bind`
* Also properties from interfaces implemented didn't have their `Bindable`
wrapper methds available.
Depends on D9563
Reviewers: felipealmeida, cedric, SanghyeonLee, woohyun
Reviewed By: cedric
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9564
Shinwoo Kim [Mon, 19 Aug 2019 08:38:44 +0000 (08:38 +0000)]
evas: fix png regression issue
Accidentally commit "382c580 evas: add support for .9.png file to PNG loader."
adding the 9 patch feature with small code refactoring missed a line calling
eina_file_map_all taking EINA_FILE_SEQUENTIAL for data decoding.
You can see the previous change adding the line from the following commit.
e60baa0 evas: change mapping policy to be less agressive into loading file
in memory.
This is a response to the request of @cedric on D9580
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9614
Mike Blumenkrantz [Fri, 16 Aug 2019 19:12:25 +0000 (15:12 -0400)]
efl_ui/text: attempt to size more accurately in non-scroll mode
the internal text object provides a min size based on its current geometry,
so temporarily match the geometry of the overall object in order to provide
a somewhat more accurate calculation sooner for this object
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9598
Mike Blumenkrantz [Fri, 16 Aug 2019 19:10:48 +0000 (15:10 -0400)]
efl_ui/popups: convert from elm_scroller to efl_ui_scroller internally
efl_ui widgets should not use legacy widgets internally
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9596
Mike Blumenkrantz [Fri, 16 Aug 2019 19:08:14 +0000 (15:08 -0400)]
efl_ui/scroller: create scroll manager in constructor
this fixes setting scroller properties during construction
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9593
Mike Blumenkrantz [Fri, 16 Aug 2019 19:07:04 +0000 (15:07 -0400)]
efl_ui/scroller: directly trigger group_calc if pan is resized during canvas calc
this is the time when all calculations need to be handled, so ensure that the
widget directly updates itself here instead of deferring in order to avoid
infinite recalc loops
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9592
Mike Blumenkrantz [Fri, 16 Aug 2019 19:06:16 +0000 (15:06 -0400)]
efl_ui/scroll_util: don't trigger group_calc again on size changes
this is already handled elsewhere and can cause infinite recalc loops
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9591
Mike Blumenkrantz [Mon, 19 Aug 2019 12:59:14 +0000 (08:59 -0400)]
tests/scroller: start unit tests for efl.ui.scroller
same layout as elm_test case, start by checking scroll events after wheel
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9634
Mike Blumenkrantz [Mon, 19 Aug 2019 18:31:57 +0000 (14:31 -0400)]
tests/elm: add util functions for triggering wheel events
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9633
Mike Blumenkrantz [Mon, 19 Aug 2019 17:39:11 +0000 (13:39 -0400)]
elm/hoversel: manually trigger group_calc for internal objects
hoversel doesn't implement group calc or do any sane type of sizing
so just manually call these on demand to ensure the correct size is used
fix T8127
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9632
Mike Blumenkrantz [Mon, 19 Aug 2019 17:38:15 +0000 (13:38 -0400)]
elm/hoversel: avoid calling api functions on null hoversel objects
the hoversel must be created before it can be shown, and its internal
hover object may be destroyed when it is hidden
@fix
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9631
Cedric BAIL [Fri, 16 Aug 2019 03:41:58 +0000 (20:41 -0700)]
elementary: properly refcount the key of the hash used by Efl.Ui.Layout_Factory property bind.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9578
ali [Sat, 3 Aug 2019 09:19:20 +0000 (09:19 +0000)]
evas_textblock: markup text: improve handling invalide escape characters
Improve handling invalid escape characters.
(*) When '&' character founded in Markup text.
Old Behavior : Any text after '&' (if it is not escape), all text will be discarded
New Behavior : Any text after '&' (if it is not escape), will be processes as normal plain text.
Example:
Markup Text : Hello X & Y & Z 1 2 3
Old output : Hello
New output : Hello X & Y & Z 1 2 3
This is related to T8077
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9489
ali [Thu, 1 Aug 2019 23:00:07 +0000 (23:00 +0000)]
evas_common: parse color in rgb()/rgba() format
evas_common_format_color_parse: support rgb()/rgba() format
efl user can now specify colors in text formats and styles as rgb(0-255,0-255,0-255) & rgba(0-255,0-255,0-255,0-255) format.
This is related to task: T8068
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9309
Ali Alzyod [Mon, 22 Jul 2019 15:25:17 +0000 (15:25 +0000)]
evas_textblock: reduce _evas_textblock_changed calls with markup_text_append
**_evas_textblock_changed** is internal function that mark that the textblock has changed.
When make call for
evas_object_textblock_text_markup_set(txtblock,"This is Line<br>THis is other Line<br>");
Old behaviour:
multible calles for _evas_textblock_changed will happend, for each text/format appended.
New behaviour:
Single call for _evas_textblock_changed will happend.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9376
Lauro Moura [Mon, 19 Aug 2019 14:23:21 +0000 (14:23 +0000)]
elm: avoid clash in Collection.Focus_Manager
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9627
Vincent Torri [Mon, 19 Aug 2019 13:55:12 +0000 (09:55 -0400)]
make mman.h private
Summary:
integrate mman.h to make Evil private to the EFL, as mman.h does not exist on Windows. After a discussion with raster, i include sys/mman.h only on non Windows platform.
One issue, though, is that src/modules/emotion/generic/Emotion_Generic_Plugin.h has inlined functions using mmap()
Test Plan: compilation on Windows
Reviewers: cedric, raster, zmike
Subscribers: #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9542
subhransu mohanty [Mon, 19 Aug 2019 10:38:35 +0000 (19:38 +0900)]
edje/style: refactor to avoid creating temporary strings.
Summary: param_parse() was creating unnecessary 2 temporary string and destroying it.
Reviewers: ali.alzyod, cedric, Hermet, raster
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9610
subhransu mohanty [Mon, 19 Aug 2019 10:33:56 +0000 (19:33 +0900)]
edje/styles: avoid redundant style tag addition by providing extra checks.
Summary:
we should only add font_size tag if the new size is different.
we should only add font tag if there is a new font.
Reviewers: ali.alzyod, Hermet, cedric, raster
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9613
Hermet Park [Mon, 19 Aug 2019 09:04:38 +0000 (18:04 +0900)]
edje: fix compatibility issue.
Obviously previous edje object file set would try reload file
even though the file is already loaded.
This brings different result if the file data has been modified or changed.
Marcel Hollerbach [Thu, 15 Aug 2019 16:49:51 +0000 (18:49 +0200)]
meson: there is no need for checking ecore here
fix T7768
Differential Revision: https://phab.enlightenment.org/D9574
Felipe Magno de Almeida [Fri, 16 Aug 2019 18:16:50 +0000 (18:16 +0000)]
eo-cxx: Add second NULL sentinel to avoid buffer overrun by efl_check.h
efl_check.h assumes at least one element exists when checking
parallelization and accesses the second element of the array without
checking its size first. Adding a second NULL sentinel fixes the problem.
T8141
Differential Revision: https://phab.enlightenment.org/D9588
Carsten Haitzler (Rasterman) [Sun, 18 Aug 2019 09:28:51 +0000 (10:28 +0100)]
elm slider - delete timers on destruction that should be deleted
also use safe free to set to null
Carsten Haitzler (Rasterman) [Sun, 18 Aug 2019 08:57:42 +0000 (09:57 +0100)]
evas - loader - rsvg generic - install svg symlink
svg loading broke as we didnt have the right symlink installed after a
binary file name change. this fixes that.
Carsten Haitzler (Rasterman) [Sat, 17 Aug 2019 23:25:39 +0000 (00:25 +0100)]
elm hoversel - avoid crash when items modified while popping down
this fixes a crash i saw with asan on pop down if items change at that
time. @fix
Daniel Kolesa [Fri, 16 Aug 2019 14:32:13 +0000 (16:32 +0200)]
eolian: rename is_class api for functions to is_static
Still needs restriction to classes only etc to be done later.
Ref https://phab.enlightenment.org/T8118
Ref https://phab.enlightenment.org/T7675
Daniel Kolesa [Fri, 16 Aug 2019 14:27:00 +0000 (16:27 +0200)]
eolian: rename @class on methods to @static
Ref https://phab.enlightenment.org/T8118
Ref https://phab.enlightenment.org/T7675
Felipe Magno de Almeida [Thu, 15 Aug 2019 20:48:01 +0000 (20:48 +0000)]
eolian-mono: Use correct allocator to free with free, and not delete
T8137
Differential Revision: https://phab.enlightenment.org/D9576
Daniel Kolesa [Fri, 16 Aug 2019 11:33:27 +0000 (13:33 +0200)]
eolian: fix function pointer leak as reported by asan
Ref T8140.
Shinwoo Kim [Fri, 16 Aug 2019 07:54:50 +0000 (16:54 +0900)]
evas: fix png regression issue
Summary:
The evas_image_load_file_data_png had called png_set_tRNS_to_alpha
from following commit.
6988a38 evas: fix png loader to actually produce lower resolution
content when asked.
You could refer to following information regarding png_set_tRNS_to_alpha
which is available on page http://www.libpng.org/pub/png/libpng-manual.txt
The following code transforms grayscale images of less than 8 to 8 bits,
changes paletted images to RGB, and adds a full alpha channel if there is
transparency information in a tRNS chunk. This is most useful on
grayscale images with bit depths of 2 or 4 or if there is a multiple-image
viewing application that wishes to treat all images in the same way.
if (color_type == PNG_COLOR_TYPE_PALETTE)
png_set_palette_to_rgb(png_ptr);
if (png_get_valid(png_ptr, info_ptr,
PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr);
if (color_type == PNG_COLOR_TYPE_GRAY &&
bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr)
Accidentally commit "382c580 evas: add support for .9.png file to PNG loader."
adding a new feature with small code refactoring missed the line calling
png_set_tRNS_to_alpha.
So we got a rendering issue. It made around 75% size white rectangle
using a grayscale and transparent image. I'd like to attach the image
which has following type information for test purpose.
$ identify -verbose ./grayscale_transparent.png | grep type -i
Mime type: image/png
Type: Bilevel
png:IHDR.color-type-orig: 0
png:IHDR.color_type: 0 (Grayscale)
Test Plan:
This is the sample image file grayscale_transparent.png
{
F3748665}
Reviewers: cedric, Hermet, jsuya
Reviewed By: Hermet
Subscribers: #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9580
Felipe Magno de Almeida [Thu, 15 Aug 2019 20:47:23 +0000 (20:47 +0000)]
eolian-cxx: Fix use after free for base variable
T8137
Differential Revision: https://phab.enlightenment.org/D9575
Marcel Hollerbach [Thu, 15 Aug 2019 19:36:29 +0000 (15:36 -0400)]
meson: add xkbcommon to the build deps
Summary: fix T8064
Reviewers: cedric, zmike, devilhorns
Reviewed By: devilhorns
Subscribers: #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8064
Differential Revision: https://phab.enlightenment.org/D9573
Christopher Michael [Thu, 15 Aug 2019 19:35:17 +0000 (15:35 -0400)]
tests/ecore_wl2: Add ecore_wl2_surface tests to build order
ref T8016
Carsten Haitzler (Rasterman) [Thu, 15 Aug 2019 18:17:35 +0000 (19:17 +0100)]
ethumb - fix short alloc on stack not including nul char space
fix space for nul byte with alloca.
Carsten Haitzler (Rasterman) [Thu, 15 Aug 2019 12:27:54 +0000 (13:27 +0100)]
elm - dnd - fix drop target del to not nuke handler all the time
this broke dnd if u have multiple drop targets in a window... keep the
functions there if we still have drop targets... especially in x11.
@fix
Carsten Haitzler (Rasterman) [Wed, 14 Aug 2019 23:08:57 +0000 (00:08 +0100)]
elm entry - respect plain text newlines on paste again...
make this work like it used to... fixes T8135
Lauro Moura [Wed, 14 Aug 2019 18:45:38 +0000 (18:45 +0000)]
elementary: Avoid segfault when part is not set.
Check whether we called `efl_part_get` before.
This was happening to C# bindings (maybe a bug there?) but in any case a
failure is safer than a segfault.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9563
Mike Blumenkrantz [Mon, 12 Aug 2019 15:28:25 +0000 (11:28 -0400)]
efl_ui/text_scroller: remove erroneous max size hint setting
this makes no sense
ref T8122
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9554
Mike Blumenkrantz [Mon, 12 Aug 2019 15:14:49 +0000 (11:14 -0400)]
efl/hints: add restricted and combined max size hints
these function the same as the min size hint versions and enable
distinction between internally-set max size hints and user-set max size
hints
@feature
ref T8122
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9553
SangHyeon Jade Lee [Tue, 13 Aug 2019 11:30:06 +0000 (11:30 +0000)]
efl_ui: update efl_ui_list_view example to work
seems name for the model property_name is now allowed,
so fix it to title and now it works well.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9558
Mike Blumenkrantz [Fri, 9 Aug 2019 19:13:09 +0000 (15:13 -0400)]
efl/hint: add doc note about max size hint
ref T8122
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9551
Mike Blumenkrantz [Fri, 9 Aug 2019 19:11:15 +0000 (15:11 -0400)]
efl_ui/popup: remove 'expandable' property from popup subclasses
this is more or less just the max size hint, so just set the max size
hint
ref T7902
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9550
Mike Blumenkrantz [Fri, 9 Aug 2019 16:14:46 +0000 (12:14 -0400)]
efl_ui/popup: remove popup_size property
this was more or less just a wrapper around efl_gfx_entity_size_set
and resulted in unpredictable behavior depending on when it was called
instead, simply set the min size hint on the popup object
ref T7902
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9549
Mike Blumenkrantz [Wed, 14 Aug 2019 17:26:14 +0000 (19:26 +0200)]
efl_ui/win: implement unimplemented methods
Summary:
pass through methods from inherited classes to the correct internal
object
Depends on D9562
Reviewers: q66
Reviewed By: q66
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9572
Mike Blumenkrantz [Wed, 14 Aug 2019 17:25:53 +0000 (19:25 +0200)]
efl_ui/layout: implement unimplemented methods
Summary:
add redirects to internal layout objects for these methods
Depends on D9561
Reviewers: q66
Reviewed By: q66
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9562
Mike Blumenkrantz [Wed, 14 Aug 2019 17:25:27 +0000 (19:25 +0200)]
efl_ui: mark localization methods with @empty for containers
Summary:
these classes cannot be localized
Depends on D9560
Reviewers: q66
Reviewed By: q66
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9561
Mike Blumenkrantz [Wed, 14 Aug 2019 17:25:09 +0000 (19:25 +0200)]
efl: remove Efl.Ui.I18n from canvas object inheritance
Summary:
canvas objects do not need localization because they are not directly user-facing
this should only be inherited by objects which need to be localized
Depends on D9559
Reviewers: q66
Reviewed By: q66
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9560
Mike Blumenkrantz [Wed, 14 Aug 2019 17:24:19 +0000 (19:24 +0200)]
efl: mark a couple internal eo files as @beta
Summary: these are not distributed apis so they should always remain beta
Reviewers: q66
Reviewed By: q66
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9559
Christopher Michael [Wed, 14 Aug 2019 15:03:04 +0000 (11:03 -0400)]
tests/ecore_wl2: Add start of ecore_wl2_surface tests
ref T8016
Yeongjong Lee [Wed, 14 Aug 2019 13:56:42 +0000 (09:56 -0400)]
efl_ui: remove duplicated hint_min_set code
Summary:
evas_object_size_hint_min_set call efl_gfx_hint_size_restricted_min_set
internally.
Reviewers: zmike
Reviewed By: zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9567
Shinwoo Kim [Wed, 14 Aug 2019 03:39:36 +0000 (12:39 +0900)]
evas_map: draw what map did not draw before.
Summary:
When a map property is changed, map draws it.
Before drawing, evas_object_map_update updates map->spans which is data for
actual drawing. But if changed_map is false, then evas_object_map_update does
not update map->spans.
Usually mapped object has following step.
(1) change map data (evas_map_point_coord_set)
(2) render_pre
(3) evas_object_map_update updates map->spans if changed_map is true.
(4) render
(5) render_post -> evas_object_cur_prev -> "map->prev = map->cur"
But if mapped object hides at step(1), then step(3),(4) does not happen. But
step(4) map->prev keeps changed map data. After this point, If same map data
comes, then map does not draw it. Because the new data is same with map->prev.
The issue occurs with following step.
(A) point_coord_set with point A.
(B) (2)(3)(4)(5) works.
(C) point_coord_set with point B. And hide.
(D) (2)(5) wokrs.
(E) point_coord_set with point A. still hide, so none of (2)(3)(4)(5) work.
(F) point_coord_set with point B. And show.
(G) (2)(3)(4)(5) works. BUT step(3) does not update map->spans because
changed_map is false. So you can see image of point A.
The changed_map is changed to false after updating map->spans at step(3).
So usually changed_map is false before deciding changed_map of next render.
In case of not rendering (but render_pre/post) after map data is changed, the
changed_map keeps true. So this patch was suppose to make changed_map
false if changed_map is already ture before _evas_map_calc_map_geometry
decides changed_map which occurs step(1). true changed_map indicates that
you need to draw even though new map data is same with previous map data.
Test Plan: {
F3739770}
Reviewers: Hermet, jsuya
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9476