From ce2e8ed1c6e83892fd6c243926873461c7d4c2a6 Mon Sep 17 00:00:00 2001 From: cedric Date: Fri, 13 Jul 2012 09:15:17 +0000 Subject: [PATCH] edje: stop compilation when clipping to a non RECT part. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@73801 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- ChangeLog | 2 +- NEWS | 1 + src/bin/edje_cc_out.c | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 969d850..508d904 100644 --- a/ChangeLog +++ b/ChangeLog @@ -526,4 +526,4 @@ 2012-07-12 Cedric Bail * Warn at compile time about forgotten image definition. - + * Stop compilation when clipping to a non RECT part. diff --git a/NEWS b/NEWS index 1bb829e..a7fc6f4 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ Additions: * Add accessibility flags and API to retrieve the relevant part. * Emit signal when flagged part size get to zero. * Warn at compile time about forgotten image. + * Stop compilation when clipping to a non RECT part. Improvements: * Allocate once and reuse Evas_Map. diff --git a/src/bin/edje_cc_out.c b/src/bin/edje_cc_out.c index f5580f9..f89cfed 100644 --- a/src/bin/edje_cc_out.c +++ b/src/bin/edje_cc_out.c @@ -289,6 +289,12 @@ check_part(Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef) else if ((ep->type == EDJE_PART_TYPE_BOX) || (ep->type == EDJE_PART_TYPE_TABLE)) check_packed_items(pc, ep, ef); + + /* FIXME: When mask are supported remove this check */ + if (ep->clip_to_id != -1 && + pc->parts[ep->clip_to_id]->type != EDJE_PART_TYPE_RECTANGLE) + error_and_abort(ef, "Collection %i: clip_to point to a non RECT part '%s' !\n", + pc->id, pc->parts[ep->clip_to_id]->name); } static void -- 2.7.4