edje: Add workaround for misuses of clip_set 85/124185/1
authorjiin.moon <jiin.moon@samsung.com>
Mon, 10 Apr 2017 11:21:57 +0000 (20:21 +0900)
committerjiin.moon <jiin.moon@samsung.com>
Mon, 10 Apr 2017 11:35:28 +0000 (20:35 +0900)
commit335746527d2cc6cdc497aa304a51f88a343e76f5
tree326810922c10dd0434719d5905f679b0d8027295
parent5435a9cd2c22565f8e8b129f23604637a4064592
edje: Add workaround for misuses of clip_set

Author:     Jean-Philippe Andre <jp.andre@samsung.com>
AuthorDate: Mon Apr 10 16:01:28 2017 +0900
Commit:     Jean-Philippe Andre <jp.andre@samsung.com>
CommitDate: Mon Apr 10 16:14:45 2017 +0900

    edje: Add workaround for misuses of clip_set

    An unfortunately very common misuse of clip is as follows:

    - Layout A is created (edje object / elm_layout)
    - Object B is swallowed inside A
    - Clipper C is set to clip B

    This is a invalid usage, as layout A takes control over the clip
    property of B (just like it does for geometry, visibility, color...).

    Since 75ec3a7338c9c2406d4 edje_recalc resets the clip at every calc
    loop, as it can change between states.

    In the past, edje_recalc did not reset the clip so anyone could
    (wrongly) swallow an object and then change its clip from C to modify
    its color, mask it, blend it, etc... Even though this was not proper
    use of the API, this is not very clearly documented, and since it
    worked, it has been (ab)used a lot already.

    The result now is that a clipper set from C will become visible
    as an opaque white rectangle covering the entire UI. Booh.

    This patch is a workaround that should have no impact on well
    written applications. As a bonus this avoids an extra call to
    clip_set() from edje.

    @fix

Change-Id: I30f18a34a1812afa54b980222a51c9988374d805
src/lib/edje/edje_calc.c
src/lib/edje/edje_load.c
src/lib/edje/edje_private.h