edje: stop compilation when clipping to a non RECT part.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 13 Jul 2012 09:15:17 +0000 (09:15 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 13 Jul 2012 09:15:17 +0000 (09:15 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@73801 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
NEWS
src/bin/edje_cc_out.c

index 969d850..508d904 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 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 (file)
--- 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.
index f5580f9..f89cfed 100644 (file)
@@ -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