summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2016-04-14 21:55:14 +0900
committerShinwoo Kim <cinoo.kim@samsung.com>2016-04-14 21:55:14 +0900
commitca225e7bf3437c7bbe52f55847e719b7468ae7c5 (patch)
treee9d161b8246cf0741600abfe8b175cce8aa55895
parenta69903e3b28973086b4d6bc468be366af48018ad (diff)
edje: fix invalid calculation to get a circular dependency
-rw-r--r--src/lib/edje/edje_calc.c42
1 files changed, 16 insertions, 26 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 3af82de724..0a8a8a27e4 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -3660,18 +3660,15 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
3660{ 3660{
3661 Edje_Real_Part *rp = NULL; 3661 Edje_Real_Part *rp = NULL;
3662 3662
3663 if (cep && !strcmp(ep->part->name, cep->part->name)) 3663 if (cep == ep) return EINA_TRUE;
3664 { 3664 if (!cep) cep = ep;
3665 return EINA_TRUE;
3666 }
3667 3665
3668 if ((ep->calculating & FLAG_X)) 3666 if ((cep->calculating & FLAG_X))
3669 { 3667 {
3670 if (ep->param1.description) 3668 if (cep->param1.description)
3671 { 3669 {
3672 if (ep->param1.description->rel1.id_x >= 0) 3670 if (cep->param1.description->rel1.id_x >= 0)
3673 { 3671 {
3674 if (!cep) cep = ep;
3675 rp = ed->table_parts[cep->param1.description->rel1.id_x]; 3672 rp = ed->table_parts[cep->param1.description->rel1.id_x];
3676 if (_circular_dependency_find(ed, ep, rp, clist)) 3673 if (_circular_dependency_find(ed, ep, rp, clist))
3677 { 3674 {
@@ -3679,9 +3676,8 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
3679 return EINA_TRUE; 3676 return EINA_TRUE;
3680 } 3677 }
3681 } 3678 }
3682 if (ep->param1.description->rel2.id_x >= 0) 3679 if (cep->param1.description->rel2.id_x >= 0)
3683 { 3680 {
3684 if (!cep) cep = ep;
3685 rp = ed->table_parts[cep->param1.description->rel2.id_x]; 3681 rp = ed->table_parts[cep->param1.description->rel2.id_x];
3686 if (_circular_dependency_find(ed, ep, rp, clist)) 3682 if (_circular_dependency_find(ed, ep, rp, clist))
3687 { 3683 {
@@ -3691,11 +3687,10 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
3691 } 3687 }
3692 } 3688 }
3693 3689
3694 if (ep->param2) 3690 if (cep->param2)
3695 { 3691 {
3696 if (ep->param2->description->rel1.id_x >= 0) 3692 if (cep->param2->description->rel1.id_x >= 0)
3697 { 3693 {
3698 if (!cep) cep = ep;
3699 rp = ed->table_parts[cep->param2->description->rel1.id_x]; 3694 rp = ed->table_parts[cep->param2->description->rel1.id_x];
3700 if (_circular_dependency_find(ed, ep, rp, clist)) 3695 if (_circular_dependency_find(ed, ep, rp, clist))
3701 { 3696 {
@@ -3703,9 +3698,8 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
3703 return EINA_TRUE; 3698 return EINA_TRUE;
3704 } 3699 }
3705 } 3700 }
3706 if (ep->param2->description->rel2.id_x >= 0) 3701 if (cep->param2->description->rel2.id_x >= 0)
3707 { 3702 {
3708 if (!cep) cep = ep;
3709 rp = ed->table_parts[cep->param2->description->rel2.id_x]; 3703 rp = ed->table_parts[cep->param2->description->rel2.id_x];
3710 if (_circular_dependency_find(ed, ep, rp, clist)) 3704 if (_circular_dependency_find(ed, ep, rp, clist))
3711 { 3705 {
@@ -3715,13 +3709,12 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
3715 } 3709 }
3716 } 3710 }
3717 } 3711 }
3718 if ((ep->calculating & FLAG_Y)) 3712 if ((cep->calculating & FLAG_Y))
3719 { 3713 {
3720 if (ep->param1.description) 3714 if (cep->param1.description)
3721 { 3715 {
3722 if (ep->param1.description->rel1.id_y >= 0) 3716 if (cep->param1.description->rel1.id_y >= 0)
3723 { 3717 {
3724 if (!cep) cep = ep;
3725 rp = ed->table_parts[cep->param1.description->rel1.id_y]; 3718 rp = ed->table_parts[cep->param1.description->rel1.id_y];
3726 if (_circular_dependency_find(ed, ep, rp, clist)) 3719 if (_circular_dependency_find(ed, ep, rp, clist))
3727 { 3720 {
@@ -3729,9 +3722,8 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
3729 return EINA_TRUE; 3722 return EINA_TRUE;
3730 } 3723 }
3731 } 3724 }
3732 if (ep->param1.description->rel2.id_y >= 0) 3725 if (cep->param1.description->rel2.id_y >= 0)
3733 { 3726 {
3734 if (!cep) cep = ep;
3735 rp = ed->table_parts[cep->param1.description->rel2.id_y]; 3727 rp = ed->table_parts[cep->param1.description->rel2.id_y];
3736 if (_circular_dependency_find(ed, ep, rp, clist)) 3728 if (_circular_dependency_find(ed, ep, rp, clist))
3737 { 3729 {
@@ -3740,11 +3732,10 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
3740 } 3732 }
3741 } 3733 }
3742 } 3734 }
3743 if (ep->param2) 3735 if (cep->param2)
3744 { 3736 {
3745 if (ep->param2->description->rel1.id_y >= 0) 3737 if (cep->param2->description->rel1.id_y >= 0)
3746 { 3738 {
3747 if (!cep) cep = ep;
3748 rp = ed->table_parts[cep->param2->description->rel1.id_y]; 3739 rp = ed->table_parts[cep->param2->description->rel1.id_y];
3749 if (_circular_dependency_find(ed, ep, rp, clist)) 3740 if (_circular_dependency_find(ed, ep, rp, clist))
3750 { 3741 {
@@ -3752,9 +3743,8 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
3752 return EINA_TRUE; 3743 return EINA_TRUE;
3753 } 3744 }
3754 } 3745 }
3755 if (ep->param2->description->rel2.id_y >= 0) 3746 if (cep->param2->description->rel2.id_y >= 0)
3756 { 3747 {
3757 if (!cep) cep = ep;
3758 rp = ed->table_parts[cep->param2->description->rel2.id_y]; 3748 rp = ed->table_parts[cep->param2->description->rel2.id_y];
3759 if (_circular_dependency_find(ed, ep, rp, clist)) 3749 if (_circular_dependency_find(ed, ep, rp, clist))
3760 { 3750 {