Merge remote-tracking branch 'origin/API8' into tizen_6.0
authoradmin <tizenapi@samsung.com>
Fri, 20 Nov 2020 08:47:51 +0000 (08:47 +0000)
committeradmin <tizenapi@samsung.com>
Fri, 20 Nov 2020 08:47:51 +0000 (08:47 +0000)
src/Tizen.NUI.Components/Controls/ScrollableBase.cs
src/Tizen.NUI/src/internal/Layouting/GridLocations.cs
src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/Layouting/AbsoluteLayout.cs
src/Tizen.NUI/src/public/Layouting/FlexLayout.cs
src/Tizen.NUI/src/public/Layouting/GridLayout.cs
src/Tizen.NUI/src/public/Layouting/LayoutGroup.cs
src/Tizen.NUI/src/public/Layouting/LayoutItem.cs
src/Tizen.NUI/src/public/Layouting/LinearLayout.cs

index 8d5b73b..f2d8869 100755 (executable)
@@ -198,7 +198,7 @@ namespace Tizen.NUI.Components
                         LayoutLength childLeft = new LayoutLength(childPosition.X);
                         LayoutLength childTop = new LayoutLength(childPosition.Y);
 
-                        childLayout.Layout(childLeft, childTop, childLeft + childWidth, childTop + childHeight, true);
+                        childLayout.Layout(childLeft, childTop, childLeft + childWidth, childTop + childHeight);
                     }
                 }
             }
@@ -433,6 +433,10 @@ namespace Tizen.NUI.Components
             set
             {
                 ContentContainer.Layout = value;
+                if (ContentContainer.Layout != null)
+                {
+                    ContentContainer.Layout.SetPositionByLayout = false;
+                }
             }
         }
 
@@ -602,9 +606,12 @@ namespace Tizen.NUI.Components
             ContentContainer = new View()
             {
                 Name = "ContentContainer",
-                ExcludeLayouting = false,
                 WidthSpecification = ScrollingDirection == Direction.Vertical ? LayoutParamPolicies.MatchParent : LayoutParamPolicies.WrapContent,
                 HeightSpecification = ScrollingDirection == Direction.Vertical ? LayoutParamPolicies.WrapContent : LayoutParamPolicies.MatchParent,
+                Layout = new AbsoluteLayout()
+                {
+                    SetPositionByLayout = false
+                },
             };
             ContentContainer.Relayout += OnScrollingChildRelayout;
             propertyNotification = ContentContainer.AddPropertyNotification("position", PropertyCondition.Step(mScrollingEventThreshold));
index 0d92415..e9299de 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -146,44 +146,26 @@ namespace Tizen.NUI
 
         private void InitChildrenData(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
         {
-            int gridChildCount = 0;
-            for (int i = 0; i < LayoutChildren.Count; i++)
-            {
-                LayoutItem item = LayoutChildren[i];
-                View view = item?.Owner;
-                if (view == null) continue;
-                if (!item.Owner.ExcludeLayouting)
-                {
-                    gridChildCount++;
-                }
-            }
+            int childCount = LayoutChildren.Count;
             bool isHorizontal = (GridOrientation == Orientation.Horizontal);
             int mainPivot = 0, subPivot = 0;
             int[] pivotStack = new int[isHorizontal ? Columns : Rows];
 
             vLocations = hLocations = null;
             vEdgeList = hEdgeList = null;
-            gridChildren = new GridChild[gridChildCount];
+            gridChildren = new GridChild[childCount];
             maxColumnConut = Columns;
             maxRowCount = Rows;
 
             totalVerticalExpand = 0;
             totalHorizontalExpand = 0;
 
-            for (int i = 0, gridChildIndex = 0; i < LayoutChildren.Count; i++, gridChildIndex++)
+            for (int i = 0; i < childCount; i++)
             {
                 LayoutItem item = LayoutChildren[i];
-
                 View view = item?.Owner;
                 if (view == null) continue;
 
-                if (view.ExcludeLayouting)
-                {
-                    MeasureChildWithoutPadding(item, widthMeasureSpec, heightMeasureSpec);
-                    gridChildIndex--;
-                    continue;
-                }
-
                 int column, columnSpan, row, rowSpan;
                 StretchFlags verticalStretch, horizontalStretch;
 
@@ -201,7 +183,7 @@ namespace Tizen.NUI
                     else
                         Tizen.Log.Error("NUI", "Row + RowSapn exceeds Grid Rows. Row + RowSapn (" + row + " + " + rowSpan + ") > Grid Rows(" + maxRowCount + ")");
 
-                    gridChildren[gridChildIndex] = new GridChild(null, new Node(0, 1, 0, 0), new Node(0, 1, 0, 0));
+                    gridChildren[i] = new GridChild(null, new Node(0, 1, 0, 0), new Node(0, 1, 0, 0));
 
                     continue;
                 }
@@ -275,7 +257,7 @@ namespace Tizen.NUI
                     maxRowCount = row + rowSpan;
 
                 MeasureChildWithMargins(item, widthMeasureSpec, new LayoutLength(0), heightMeasureSpec, new LayoutLength(0));
-                gridChildren[gridChildIndex] = new GridChild(item,
+                gridChildren[i] = new GridChild(item,
                                                 new Node(column, columnSpan, item.MeasuredWidth.Size.AsDecimal() + item.Owner.Margin.Start + item.Owner.Margin.End, horizontalStretch),
                                                 new Node(row, rowSpan, item.MeasuredHeight.Size.AsDecimal() + item.Owner.Margin.Top + item.Owner.Margin.Bottom, verticalStretch));
             }
@@ -293,7 +275,7 @@ namespace Tizen.NUI
                 edgeList[i] = isHorizontal ? gridChildren[i].Column : gridChildren[i].Row;
 
             // Add virtual edge that have no edge for connecting adjacent cells.
-            for (int i = gridChildren.Length, end = gridChildren.Length + axisCount, v = 0; i < end; i++, v++)
+            for (int i = LayoutChildren.Count, end = LayoutChildren.Count + axisCount, v = 0; i < end; i++, v++)
                 edgeList[i] = new Node(v, 1, 0, 0);
 
             Array.Sort(edgeList, (a, b) => a.Start.CompareTo(b.Start));
index be3e533..23a00b6 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -62,7 +62,6 @@ namespace Tizen.NUI.BaseComponents
         private bool controlStatePropagation = false;
         private ViewStyle viewStyle;
         private bool themeChangeSensitive = false;
-        private bool excludeLayouting = false;
 
         internal Size2D sizeSetExplicitly = new Size2D(); // Store size set by API, will be used in place of NaturalSize if not set.
         internal BackgroundExtraData backgroundExtraData;
@@ -206,25 +205,6 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-        /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool ExcludeLayouting
-        {
-            get
-            {
-                return excludeLayouting;
-            }
-            set
-            {
-                excludeLayouting = value;
-                if (Layout != null && Layout.SetPositionByLayout == value)
-                {
-                    Layout.SetPositionByLayout = !value;
-                    Layout.RequestLayout();
-                }
-            }
-        }
-
         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool IsResourcesCreated
@@ -2207,8 +2187,6 @@ namespace Tizen.NUI.BaseComponents
                 // Remove existing layout from it's parent layout group.
                 _layout?.Unparent();
 
-                value.SetPositionByLayout = !excludeLayouting;
-
                 // Set layout to this view
                 SetLayout(value);
             }
index ecb04eb..3279cd9 100755 (executable)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2020 Samsung Electronics Co., Ltd.
+/* Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -54,11 +54,6 @@ namespace Tizen.NUI
                     // Get size of child with no padding, no margin. we won't support margin, padding for AbsolutLayout.
                     MeasureChildWithoutPadding(childLayout, widthMeasureSpec, heightMeasureSpec);
 
-                    if (childLayout.Owner.ExcludeLayouting)
-                    {
-                        continue;
-                    }
-
                     // Determine the width and height needed by the children using their given position and size.
                     // Children could overlap so find the right most child.
                     Position2D childPosition = childLayout.Owner.Position2D;
@@ -102,7 +97,7 @@ namespace Tizen.NUI
             for (int i = 0; i < LayoutChildren.Count; i++)
             {
                 LayoutItem childLayout = LayoutChildren[i];
-                if (childLayout != null)
+                if ( childLayout != null )
                 {
                     LayoutLength childWidth = childLayout.MeasuredWidth.Size;
                     LayoutLength childHeight = childLayout.MeasuredHeight.Size;
@@ -112,10 +107,27 @@ namespace Tizen.NUI
                     LayoutLength childLeft = new LayoutLength(childPosition.X);
                     LayoutLength childTop = new LayoutLength(childPosition.Y);
 
-                    childLayout.Layout(childLeft, childTop, childLeft + childWidth, childTop + childHeight, true);
+                    childLayout.Layout(childLeft, childTop, childLeft + childWidth, childTop + childHeight);
                 }
             }
         }
+
+        private void MeasureChildWithoutPadding(LayoutItem child, MeasureSpecification parentWidthMeasureSpec, MeasureSpecification parentHeightMeasureSpec)
+        {
+            View childOwner = child.Owner;
+
+            MeasureSpecification childWidthMeasureSpec = GetChildMeasureSpecification(
+                        new MeasureSpecification(new LayoutLength(parentWidthMeasureSpec.Size), parentWidthMeasureSpec.Mode),
+                        new LayoutLength(0),
+                        new LayoutLength(childOwner.WidthSpecification));
+
+            MeasureSpecification childHeightMeasureSpec = GetChildMeasureSpecification(
+                        new MeasureSpecification(new LayoutLength(parentHeightMeasureSpec.Size), parentHeightMeasureSpec.Mode),
+                        new LayoutLength(0),
+                        new LayoutLength(childOwner.HeightSpecification));
+
+            child.Measure(childWidthMeasureSpec, childHeightMeasureSpec);
+        }
     }
 
 } // namespace
index 2a22439..b3ccc94 100755 (executable)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2020 Samsung Electronics Co., Ltd.
+/* Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -242,7 +242,7 @@ namespace Tizen.NUI
         public static void SetFlexGrow(View view, float value) => SetAttachedValue(view, FlexGrowProperty, value);
 
         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
-        internal delegate void ChildMeasureCallback(global::System.IntPtr child, float width, int measureModeWidth, float height, int measureModeHeight, out MeasuredSize measureSize);
+        internal delegate void ChildMeasureCallback( global::System.IntPtr child, float width, int measureModeWidth, float height, int measureModeHeight, out MeasuredSize measureSize );
 
         event ChildMeasureCallback measureChildDelegate; // Stores a delegate to the child measure callback. Used for all children of this FlexLayout.
 
@@ -672,26 +672,15 @@ namespace Tizen.NUI
                 if (childHandleRef.Handle == IntPtr.Zero || Child == null)
                     continue;
 
-                if (layoutItem.Owner.ExcludeLayouting)
-                {
-                    SetFlexPositionType(Child, PositionType.Absolute);
-                    Interop.FlexLayout.FlexLayout_SetFlexPositionType(childHandleRef, (int)PositionType.Absolute);
-                    MeasureChildWithoutPadding(layoutItem, widthMeasureSpec, heightMeasureSpec);
-                    continue;
-                }
-                else
-                {
-                    SetFlexPositionType(Child, PositionType.Relative);
-                    Interop.FlexLayout.FlexLayout_SetFlexPositionType(childHandleRef, (int)PositionType.Relative);
-                }
-
                 AlignmentType flexAlignemnt = GetFlexAlignmentSelf(Child);
+                PositionType flexPosition = GetFlexPositionType(Child);
                 float flexAspectRatio = GetFlexAspectRatio(Child);
                 float flexBasis = GetFlexBasis(Child);
                 float flexShrink = GetFlexShrink(Child);
                 float flexGrow = GetFlexGrow(Child);
 
                 Interop.FlexLayout.FlexLayout_SetFlexAlignmentSelf(childHandleRef, (int)flexAlignemnt);
+                Interop.FlexLayout.FlexLayout_SetFlexPositionType(childHandleRef, (int)flexPosition);
                 Interop.FlexLayout.FlexLayout_SetFlexAspectRatio(childHandleRef, flexAspectRatio);
                 Interop.FlexLayout.FlexLayout_SetFlexBasis(childHandleRef, flexBasis);
                 Interop.FlexLayout.FlexLayout_SetFlexShrink(childHandleRef, flexShrink);
@@ -735,15 +724,12 @@ namespace Tizen.NUI
                 LayoutItem childLayout = LayoutChildren[childIndex];
                 if (childLayout != null)
                 {
-                    if (!childLayout.Owner.ExcludeLayouting)
-                    {
-                        // Get the frame for the child, start, top, end, bottom.
-                        Vector4 frame = new Vector4(Interop.FlexLayout.FlexLayout_GetNodeFrame(swigCPtr, childIndex), true);
-                        childLayout.Layout(new LayoutLength(frame.X), new LayoutLength(frame.Y), new LayoutLength(frame.Z), new LayoutLength(frame.W));
-                    }
+                    // Get the frame for the child, start, top, end, bottom.
+                    Vector4 frame = new Vector4(Interop.FlexLayout.FlexLayout_GetNodeFrame(swigCPtr, childIndex), true);
+                    childLayout.Layout(new LayoutLength(frame.X), new LayoutLength(frame.Y), new LayoutLength(frame.Z), new LayoutLength(frame.W));
                 }
             }
-            LayoutForIndependentChild();
         }
+
     } // FLexlayout
 } // namesspace Tizen.NUI
index 2fad169..a634d21 100755 (executable)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2020 Samsung Electronics Co., Ltd.
+/* Copyright (c) 2019 Samsung Electronics Co., Ltd.
 .*
 .* Licensed under the Apache License, Version 2.0 (the "License");
 .* you may not use this file except in compliance with the License.
@@ -430,8 +430,6 @@ namespace Tizen.NUI
 
                 child.LayoutItem.Layout(new LayoutLength(l), new LayoutLength(t), new LayoutLength(l + width), new LayoutLength(t + height));
             }
-
-            LayoutForIndependentChild();
         }
 
         /// <summary>
index 4172c3a..fe85c93 100755 (executable)
@@ -34,7 +34,7 @@ namespace Tizen.NUI
         /// [Draft] List of child layouts in this container.
         /// </summary>
         /// <since_tizen> 6 </since_tizen>
-        protected List<LayoutItem> LayoutChildren { get; } // Children of this LayoutGroup
+        protected List<LayoutItem> LayoutChildren{ get;} // Children of this LayoutGroup
 
         /// <summary>
         /// [Draft] Constructor
@@ -68,7 +68,7 @@ namespace Tizen.NUI
         /// <since_tizen> 6 </since_tizen>
         public void RemoveAll()
         {
-            foreach (LayoutItem childLayout in LayoutChildren)
+            foreach( LayoutItem childLayout in LayoutChildren )
             {
                 childLayout.ConditionForAnimation = ConditionForAnimation | TransitionCondition.Remove;
                 childLayout.Owner = null;
@@ -86,9 +86,9 @@ namespace Tizen.NUI
         public virtual void Remove(LayoutItem layoutItem)
         {
             bool childRemoved = false;
-            foreach (LayoutItem childLayout in LayoutChildren.ToList())
+            foreach( LayoutItem childLayout in LayoutChildren.ToList() )
             {
-                if (childLayout == layoutItem)
+                if( childLayout == layoutItem )
                 {
                     childLayout.ClearReplaceFlag();
                     LayoutChildren.Remove(childLayout);
@@ -133,14 +133,14 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void ChangeLayoutSiblingOrder(int order)
         {
-            if (Owner != null && Owner.Parent != null)
+            if(Owner != null && Owner.Parent != null)
             {
                 LayoutGroup parent = Owner.Parent.Layout as LayoutGroup;
 
-                if (parent != null && parent.LayoutChildren.Count > order)
+                if(parent != null && parent.LayoutChildren.Count>order)
                 {
                     parent.LayoutChildren.Remove(this);
-                    parent.LayoutChildren.Insert(order, this);
+                    parent.LayoutChildren.Insert(order,this);
                 }
             }
 
@@ -156,7 +156,7 @@ namespace Tizen.NUI
             // First time the set Layout API is used by any View the Window no longer has layoutingDisabled.
 
             // If child already has a Layout then don't change it.
-            if (!View.layoutingDisabled && (null == child.Layout))
+            if (! View.layoutingDisabled && (null == child.Layout))
             {
                 // Only wrap View with a Layout if a child a pure View or Layout explicitly set on this Layout
                 if ((true == Owner.layoutSet || GetType() == typeof(View)))
@@ -169,7 +169,7 @@ namespace Tizen.NUI
             else
             {
                 // Add child layout to this LayoutGroup (Setting parent in the process)
-                if (child.Layout != null)
+                if(child.Layout != null)
                 {
                     Add(child.Layout);
                 }
@@ -183,7 +183,7 @@ namespace Tizen.NUI
         /// <param name="child">Child View to remove.</param>
         internal void RemoveChildFromLayoutGroup(View child)
         {
-            if (child.Layout != null)
+            if(child.Layout != null)
             {
                 Remove(child.Layout);
             }
@@ -193,44 +193,44 @@ namespace Tizen.NUI
         /// Set all children in a LayoutGroup to the supplied condition.
         /// Children with Add or Remove conditions should not be changed.
         /// </summary>
-        private void SetConditionsForAnimationOnLayoutGroup(TransitionCondition conditionToSet)
+        private void SetConditionsForAnimationOnLayoutGroup( TransitionCondition conditionToSet)
         {
-            foreach (LayoutItem childLayout in LayoutChildren)
+            foreach( LayoutItem childLayout in LayoutChildren )
             {
-                switch (conditionToSet)
+                switch( conditionToSet )
                 {
-                    case TransitionCondition.ChangeOnAdd:
-                        {
-                            // If other children also being added (TransitionCondition.Add) then do not change their
-                            // conditions, Continue to use their Add transitions.
-                            if (childLayout.ConditionForAnimation.HasFlag(TransitionCondition.Add))
-                            {
-                                break;  // Child being Added so don't update it's condition
-                            }
-                            else
-                            {
-                                // Set siblings for the child being added to use the ChangeOnAdd transition.
-                                childLayout.ConditionForAnimation = TransitionCondition.ChangeOnAdd;
-                            }
-                            break;
-                        }
-                    case TransitionCondition.ChangeOnRemove:
-                        {
-                            if (childLayout.ConditionForAnimation.HasFlag(TransitionCondition.Remove))
-                            {
-                                break; // Child being Removed so don't update it's condition
-                            }
-                            else
-                            {
-                                childLayout.ConditionForAnimation = TransitionCondition.ChangeOnRemove;
-                            }
-                            break;
-                        }
-                    case TransitionCondition.LayoutChanged:
-                        {
-                            childLayout.ConditionForAnimation = TransitionCondition.LayoutChanged;
-                            break;
-                        }
+                case TransitionCondition.ChangeOnAdd :
+                {
+                    // If other children also being added (TransitionCondition.Add) then do not change their
+                    // conditions, Continue to use their Add transitions.
+                    if (childLayout.ConditionForAnimation.HasFlag(TransitionCondition.Add))
+                    {
+                        break;  // Child being Added so don't update it's condition
+                    }
+                    else
+                    {
+                        // Set siblings for the child being added to use the ChangeOnAdd transition.
+                        childLayout.ConditionForAnimation = TransitionCondition.ChangeOnAdd;
+                    }
+                    break;
+                }
+                case TransitionCondition.ChangeOnRemove :
+                {
+                    if (childLayout.ConditionForAnimation.HasFlag(TransitionCondition.Remove))
+                    {
+                        break; // Child being Removed so don't update it's condition
+                    }
+                    else
+                    {
+                        childLayout.ConditionForAnimation = TransitionCondition.ChangeOnRemove;
+                    }
+                    break;
+                }
+                case TransitionCondition.LayoutChanged :
+                {
+                    childLayout.ConditionForAnimation = TransitionCondition.LayoutChanged;
+                    break;
+                }
                 }
             }
 
@@ -272,86 +272,86 @@ namespace Tizen.NUI
             MeasureSpecification.ModeType resultMode = MeasureSpecification.ModeType.Unspecified;
 
             // Child only can use parent's size without parent's padding and own margin.
-            LayoutLength resultSize = new LayoutLength(Math.Max(0.0f, (parentMeasureSpec.Size - padding).AsDecimal()));
-            switch (specMode)
+            LayoutLength resultSize = new LayoutLength(Math.Max( 0.0f, (parentMeasureSpec.Size - padding).AsDecimal()));
+            switch( specMode )
             {
                 // Parent has imposed an exact size on us
                 case MeasureSpecification.ModeType.Exactly:
+                {
+                    if ((int)childDimension.AsRoundedValue() == LayoutParamPolicies.MatchParent)
                     {
-                        if ((int)childDimension.AsRoundedValue() == LayoutParamPolicies.MatchParent)
-                        {
-                            resultMode = MeasureSpecification.ModeType.Exactly;
-                        }
-                        else if ((int)childDimension.AsRoundedValue() == LayoutParamPolicies.WrapContent)
-                        {
-                            resultMode = MeasureSpecification.ModeType.AtMost;
-                        }
-                        else
-                        {
-                            resultSize = childDimension;
-                            resultMode = MeasureSpecification.ModeType.Exactly;
-                        }
-
-                        break;
+                        resultMode = MeasureSpecification.ModeType.Exactly;
+                    }
+                    else if ((int)childDimension.AsRoundedValue() == LayoutParamPolicies.WrapContent)
+                    {
+                        resultMode = MeasureSpecification.ModeType.AtMost;
                     }
+                    else
+                    {
+                        resultSize = childDimension;
+                        resultMode = MeasureSpecification.ModeType.Exactly;
+                    }
+
+                    break;
+                }
 
                 // Parent has imposed a maximum size on us
                 case MeasureSpecification.ModeType.AtMost:
+                {
+                    if (childDimension.AsRoundedValue() == LayoutParamPolicies.MatchParent)
                     {
-                        if (childDimension.AsRoundedValue() == LayoutParamPolicies.MatchParent)
-                        {
-                            // Crashed. Cannot calculate. 
-
-                            // Child wants to be our size, but our size is not fixed.
-                            // Constrain child to not be bigger than us.
-                            resultMode = MeasureSpecification.ModeType.AtMost;
-                        }
-                        else if (childDimension.AsRoundedValue() == LayoutParamPolicies.WrapContent)
-                        {
-                            // Child wants to determine its own size. It can't be
-                            // bigger than us.
+                        // Crashed. Cannot calculate. 
 
-                            // Don't need parent's size. Size of this child will be determined by its children.
-                            resultMode = MeasureSpecification.ModeType.AtMost;
-                        }
-                        else
-                        {
-                            // Child wants a specific size... so be it
-                            resultSize = childDimension;
-                            resultMode = MeasureSpecification.ModeType.Exactly;
-                        }
+                        // Child wants to be our size, but our size is not fixed.
+                        // Constrain child to not be bigger than us.
+                        resultMode = MeasureSpecification.ModeType.AtMost;
+                    }
+                    else if (childDimension.AsRoundedValue() == LayoutParamPolicies.WrapContent)
+                    {
+                        // Child wants to determine its own size. It can't be
+                        // bigger than us.
 
-                        break;
+                        // Don't need parent's size. Size of this child will be determined by its children.
+                        resultMode = MeasureSpecification.ModeType.AtMost;
+                    }
+                    else
+                    {
+                        // Child wants a specific size... so be it
+                        resultSize = childDimension;
+                        resultMode = MeasureSpecification.ModeType.Exactly;
                     }
 
+                    break;
+                }
+
                 // Parent asked to see how big we want to be
                 case MeasureSpecification.ModeType.Unspecified:
+                {
+                    if ((childDimension.AsRoundedValue() == LayoutParamPolicies.MatchParent))
                     {
-                        if ((childDimension.AsRoundedValue() == LayoutParamPolicies.MatchParent))
-                        {
-                            // Child wants to be our size... find out how big it should be
+                        // Child wants to be our size... find out how big it should be
 
-                            // There is no one who has exact size in parent hierarchy.
-                            // Cannot calculate.
-                            resultMode = MeasureSpecification.ModeType.Unspecified;
-                        }
-                        else if (childDimension.AsRoundedValue() == (LayoutParamPolicies.WrapContent))
-                        {
-                            // Child wants to determine its own size.... find out how big
-                            // it should be
-                            resultMode = MeasureSpecification.ModeType.Unspecified;
-                        }
-                        else
-                        {
-                            // Child wants a specific size... let him have it
-                            resultSize = childDimension;
-                            resultMode = MeasureSpecification.ModeType.Exactly;
-                        }
-                        break;
+                        // There is no one who has exact size in parent hierarchy.
+                        // Cannot calculate.
+                        resultMode = MeasureSpecification.ModeType.Unspecified;
+                    }
+                    else if (childDimension.AsRoundedValue() == (LayoutParamPolicies.WrapContent))
+                    {
+                        // Child wants to determine its own size.... find out how big
+                        // it should be
+                        resultMode = MeasureSpecification.ModeType.Unspecified;
                     }
+                    else
+                    {
+                        // Child wants a specific size... let him have it
+                        resultSize = childDimension;
+                        resultMode = MeasureSpecification.ModeType.Exactly;
+                    }
+                    break;
+                }
             } // switch
 
-            return new MeasureSpecification(resultSize, resultMode);
+            return new MeasureSpecification( resultSize, resultMode );
         }
 
         /// <summary>
@@ -369,29 +369,29 @@ namespace Tizen.NUI
             LayoutLength measuredHeight = new LayoutLength(0.0f);
 
             // Layout takes size of largest child width and largest child height dimensions
-            foreach (LayoutItem childLayout in LayoutChildren)
+            foreach( LayoutItem childLayout in LayoutChildren )
             {
-                if (childLayout != null)
+                if( childLayout != null )
                 {
-                    MeasureChildWithMargins(childLayout, widthMeasureSpec, new LayoutLength(0), heightMeasureSpec, new LayoutLength(0));
+                    MeasureChildWithMargins( childLayout, widthMeasureSpec, new LayoutLength(0), heightMeasureSpec, new LayoutLength(0) );
                     LayoutLength childWidth = new LayoutLength(childLayout.MeasuredWidth.Size);
-                    LayoutLength childHeight = new LayoutLength(childLayout.MeasuredHeight.Size);
+                    LayoutLength childHeight = new LayoutLength( childLayout.MeasuredHeight.Size);
 
                     Extents childMargin = childLayout.Margin;
-                    measuredWidth = new LayoutLength(Math.Max(measuredWidth.AsDecimal(), childWidth.AsDecimal() + childMargin.Start + childMargin.End));
-                    measuredHeight = new LayoutLength(Math.Max(measuredHeight.AsDecimal(), childHeight.AsDecimal() + childMargin.Top + childMargin.Bottom));
+                    measuredWidth = new LayoutLength(Math.Max( measuredWidth.AsDecimal(), childWidth.AsDecimal() + childMargin.Start + childMargin.End));
+                    measuredHeight = new LayoutLength(Math.Max( measuredHeight.AsDecimal(), childHeight.AsDecimal() + childMargin.Top + childMargin.Bottom));
                 }
             }
 
-            if (0 == LayoutChildren.Count)
+            if( 0 == LayoutChildren.Count )
             {
                 // Must be a leaf as has no children
-                measuredWidth = GetDefaultSize(SuggestedMinimumWidth, widthMeasureSpec);
-                measuredHeight = GetDefaultSize(SuggestedMinimumHeight, heightMeasureSpec);
+                measuredWidth = GetDefaultSize( SuggestedMinimumWidth, widthMeasureSpec );
+                measuredHeight = GetDefaultSize( SuggestedMinimumHeight, heightMeasureSpec );
             }
 
-            SetMeasuredDimensions(new MeasuredSize(measuredWidth, MeasuredSize.StateType.MeasuredSizeOK),
-                                   new MeasuredSize(measuredHeight, MeasuredSize.StateType.MeasuredSizeOK));
+            SetMeasuredDimensions( new MeasuredSize( measuredWidth, MeasuredSize.StateType.MeasuredSizeOK ),
+                                   new MeasuredSize( measuredHeight, MeasuredSize.StateType.MeasuredSizeOK ) );
         }
 
         /// <summary>
@@ -406,55 +406,26 @@ namespace Tizen.NUI
         /// <since_tizen> 6 </since_tizen>
         protected override void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
         {
-            foreach (LayoutItem childLayout in LayoutChildren)
+            foreach( LayoutItem childLayout in LayoutChildren )
             {
-                if (childLayout != null)
+                if( childLayout !=null )
                 {
                     // Use position if explicitly set to child otherwise will be top left.
-                    var childLeft = new LayoutLength(childLayout.Owner.Position2D.X);
-                    var childTop = new LayoutLength(childLayout.Owner.Position2D.Y);
+                    var childLeft = new LayoutLength( childLayout.Owner.Position2D.X );
+                    var childTop = new LayoutLength( childLayout.Owner.Position2D.Y );
 
                     View owner = Owner;
 
-                    if (owner)
+                    if ( owner )
                     {
                         // Margin and Padding only supported when child anchor point is TOP_LEFT.
-                        if (owner.PivotPoint == PivotPoint.TopLeft || (owner.PositionUsesPivotPoint == false))
+                        if ( owner.PivotPoint == PivotPoint.TopLeft || ( owner.PositionUsesPivotPoint == false ) )
                         {
                             childLeft = childLeft + owner.Padding.Start + childLayout.Margin.Start;
                             childTop = childTop + owner.Padding.Top + childLayout.Margin.Top;
                         }
                     }
-                    childLayout.Layout(childLeft, childTop, childLeft + childLayout.MeasuredWidth.Size, childTop + childLayout.MeasuredHeight.Size);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Layout independent children those Owners have true ExcludeLayouting. <br />
-        /// These children are required not to be affected by this layout. <br />
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        protected void LayoutForIndependentChild()
-        {
-            int count = LayoutChildren.Count;
-            for (int childIndex = 0; childIndex < count; childIndex++)
-            {
-                LayoutItem childLayout = LayoutChildren[childIndex];
-                if (childLayout != null)
-                {
-                    if (childLayout.Owner.ExcludeLayouting)
-                    {
-                        LayoutLength childWidth = childLayout.MeasuredWidth.Size;
-                        LayoutLength childHeight = childLayout.MeasuredHeight.Size;
-
-                        Position2D childPosition = childLayout.Owner.Position2D;
-
-                        LayoutLength childPositionX = new LayoutLength(childPosition.X);
-                        LayoutLength childPositionY = new LayoutLength(childPosition.Y);
-
-                        childLayout.Layout(childPositionX, childPositionY, childPositionX + childWidth, childPositionY + childHeight, true);
-                    }
+                    childLayout.Layout( childLeft, childTop, childLeft + childLayout.MeasuredWidth.Size, childTop + childLayout.MeasuredHeight.Size );
                 }
             }
         }
@@ -519,7 +490,7 @@ namespace Tizen.NUI
         /// <since_tizen> 6 </since_tizen>
         protected virtual void MeasureChildren(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
         {
-            foreach (LayoutItem childLayout in LayoutChildren)
+            foreach( LayoutItem childLayout in LayoutChildren )
             {
                 MeasureChildWithMargins(childLayout, widthMeasureSpec, new LayoutLength(0), heightMeasureSpec, new LayoutLength(0));
             }
@@ -540,8 +511,8 @@ namespace Tizen.NUI
 
             MeasureSpecification childWidthMeasureSpec = GetChildMeasureSpecification(
                         new MeasureSpecification(new LayoutLength(parentWidthMeasureSpec.Size), parentWidthMeasureSpec.Mode),
-                        new LayoutLength(Padding.Start + Padding.End),
-                        new LayoutLength(childOwner.WidthSpecification));
+                        new LayoutLength(Padding.Start + Padding.End ),
+                        new LayoutLength(childOwner.WidthSpecification) );
 
             MeasureSpecification childHeightMeasureSpec = GetChildMeasureSpecification(
                         new MeasureSpecification(new LayoutLength(parentHeightMeasureSpec.Size), parentHeightMeasureSpec.Mode),
@@ -571,8 +542,8 @@ namespace Tizen.NUI
                         new MeasureSpecification(
                             new LayoutLength(parentWidthMeasureSpec.Size + widthUsed - (childOwner.Margin.Start + childOwner.Margin.End)),
                             parentWidthMeasureSpec.Mode),
-                        new LayoutLength(Padding.Start + Padding.End),
-                        new LayoutLength(childOwner.WidthSpecification));
+                        new LayoutLength(Padding.Start + Padding.End ),
+                        new LayoutLength(childOwner.WidthSpecification) );
 
             MeasureSpecification childHeightMeasureSpec = GetChildMeasureSpecification(
                         new MeasureSpecification(
@@ -580,37 +551,11 @@ namespace Tizen.NUI
                             parentHeightMeasureSpec.Mode),
                         new LayoutLength(Padding.Top + Padding.Bottom),
                         new LayoutLength(childOwner.HeightSpecification));
-            child.Measure(childWidthMeasureSpec, childHeightMeasureSpec);
+            child.Measure( childWidthMeasureSpec, childHeightMeasureSpec );
 
         }
 
         /// <summary>
-        /// Ask one of the children of this view to measure itself, taking into
-        /// account both the MeasureSpec requirements for this view and without its padding.<br />
-        /// and margins. The heavy lifting is done in GetChildMeasureSpecification.<br />
-        /// </summary>
-        /// <param name="child">The child to measure.</param>
-        /// <param name="parentWidthMeasureSpec">The width requirements for this view.</param>
-        /// <param name="parentHeightMeasureSpec">The height requirements for this view.</param>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        protected void MeasureChildWithoutPadding(LayoutItem child, MeasureSpecification parentWidthMeasureSpec, MeasureSpecification parentHeightMeasureSpec)
-        {
-            View childOwner = child.Owner;
-
-            MeasureSpecification childWidthMeasureSpec = GetChildMeasureSpecification(
-                        new MeasureSpecification(new LayoutLength(parentWidthMeasureSpec.Size), parentWidthMeasureSpec.Mode),
-                        new LayoutLength(0),
-                        new LayoutLength(childOwner.WidthSpecification));
-
-            MeasureSpecification childHeightMeasureSpec = GetChildMeasureSpecification(
-                        new MeasureSpecification(new LayoutLength(parentHeightMeasureSpec.Size), parentHeightMeasureSpec.Mode),
-                        new LayoutLength(0),
-                        new LayoutLength(childOwner.HeightSpecification));
-
-            child.Measure(childWidthMeasureSpec, childHeightMeasureSpec);
-        }
-
-        /// <summary>
         /// Gets the value that is contained in the attached BindableProperty.
         /// </summary>
         /// <typeparam name="T">The return type of property</typeparam>
index c4bba54..17aa496 100755 (executable)
@@ -27,10 +27,10 @@ namespace Tizen.NUI
     [FlagsAttribute]
     enum LayoutFlags : short
     {
-        None = 0,
-        ForceLayout = 1,
-        LayoutRequired = 2,
-        MeasuredDimensionSet = 4
+      None = 0,
+      ForceLayout = 1,
+      LayoutRequired = 2,
+      MeasuredDimensionSet = 4
     };
 
     /// <summary>
@@ -53,18 +53,17 @@ namespace Tizen.NUI
         private Extents _margin;
 
         private bool parentReplacement = false;
-        private bool setPositionByLayout = true;
 
         /// <summary>
         /// [Draft] Condition event that is causing this Layout to transition.
         /// </summary>
-        internal TransitionCondition ConditionForAnimation { get; set; }
+        internal TransitionCondition ConditionForAnimation{get; set;}
 
         /// <summary>
         /// [Draft] The View that this Layout has been assigned to.
         /// </summary>
         /// <since_tizen> 6 </since_tizen>
-        public View Owner { get; set; }  // Should not keep a View alive.
+        public View Owner{get; set;}  // Should not keep a View alive.
 
         /// <summary>
         /// [Draft] Use transition for layouting child
@@ -72,27 +71,13 @@ namespace Tizen.NUI
         /// <since_tizen> 6 </since_tizen>
         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool LayoutWithTransition { get; set; }
+         public bool LayoutWithTransition{get; set;}
 
         /// <summary>
         /// [Draft] Set position by layouting result
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool SetPositionByLayout
-        {
-            get
-            {
-                return setPositionByLayout;
-            }
-            set
-            {
-                setPositionByLayout = value;
-                if (Owner != null && Owner.ExcludeLayouting == value)
-                {
-                    Owner.ExcludeLayouting = !value;
-                }
-            }
-        }
+        public bool SetPositionByLayout{get;set;} = true;
 
         /// <summary>
         /// [Draft] Margin for this LayoutItem
@@ -141,7 +126,7 @@ namespace Tizen.NUI
         /// [Draft] Set parent to this layout.
         /// </summary>
         /// <param name="parent">Parent to set on this Layout.</param>
-        internal void SetParent(ILayoutParent parent)
+        internal void SetParent( ILayoutParent parent)
         {
             Parent = parent as LayoutGroup;
         }
@@ -155,7 +140,7 @@ namespace Tizen.NUI
             OnUnparent();
 
             // Remove myself from parent
-            Parent?.Remove(this);
+            Parent?.Remove( this );
 
             // Remove parent reference
             Parent = null;
@@ -167,9 +152,9 @@ namespace Tizen.NUI
         private void Initialize()
         {
             LayoutWithTransition = false;
-            _layoutPositionData = new LayoutData(this, TransitionCondition.Unspecified, 0, 0, 0, 0);
-            _padding = new Extents(0, 0, 0, 0);
-            _margin = new Extents(0, 0, 0, 0);
+            _layoutPositionData = new LayoutData(this,TransitionCondition.Unspecified,0,0,0,0);
+            _padding = new Extents(0,0,0,0);
+            _margin = new Extents(0,0,0,0);
         }
 
         /// <summary>
@@ -183,7 +168,7 @@ namespace Tizen.NUI
             OnAttachedToOwner();
             // Add layout to parent layout if a layout container
             View parent = Owner.GetParent() as View;
-            (parent?.Layout as LayoutGroup)?.Add(this);
+            (parent?.Layout as LayoutGroup)?.Add( this );
 
             // If Add or ChangeOnAdd then do not update condition
             if (ConditionForAnimation.Equals(TransitionCondition.Unspecified))
@@ -215,7 +200,7 @@ namespace Tizen.NUI
             bool matchesSpecSize = (MeasuredWidth.Size == widthMeasureSpec.Size) &&
                 (MeasuredHeight.Size == heightMeasureSpec.Size);
 
-            bool needsLayout = specChanged && (!isSpecExactly || !matchesSpecSize);
+            bool needsLayout = specChanged && ( !isSpecExactly || !matchesSpecSize);
             needsLayout = needsLayout || ((Flags & LayoutFlags.ForceLayout) == LayoutFlags.ForceLayout);
 
             if (needsLayout)
@@ -241,40 +226,10 @@ namespace Tizen.NUI
         /// <since_tizen> 6 </since_tizen>
         public void Layout(LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
         {
-            Layout(left, top, right, bottom, false);
-        }
-
-        /// <summary>
-        /// Assign a size and position to a layout and all of its descendants. <br />
-        /// This is the second phase of the layout mechanism.  (The first is measuring). In this phase, each parent
-        /// calls layout on all of its children to position them.  This is typically done using the child<br />
-        /// measurements that were stored in the measure pass.<br />
-        /// </summary>
-        /// <param name="left">Left position, relative to parent.</param>
-        /// <param name="top">Top position, relative to parent.</param>
-        /// <param name="right">Right position, relative to parent.</param>
-        /// <param name="bottom">Bottom position, relative to parent.</param>
-        /// <param name="independent">true, if this layout is not affected by parent layout.</param>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public void Layout(LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom, bool independent)
-        {
-            bool changed = true;
-            if (!independent)
-            {
-                changed = SetFrame(left.AsRoundedValue(),
-                    top.AsRoundedValue(),
-                    right.AsRoundedValue(),
-                    bottom.AsRoundedValue());
-            }
-            else
-            {
-                // If height or width specification is not explicitly defined,
-                // the size of the owner view must be reset even the ExcludeLayouting is true.
-                if (Owner.HeightSpecification < 0 || Owner.WidthSpecification < 0)
-                {
-                    Owner.SetSize(right.AsRoundedValue() - left.AsRoundedValue(), bottom.AsRoundedValue() - top.AsRoundedValue());
-                }
-            }
+            bool changed = SetFrame(left.AsRoundedValue(),
+                top.AsRoundedValue(),
+                right.AsRoundedValue(),
+                bottom.AsRoundedValue());
 
             // Check if Measure needed before Layouting
             if (changed || ((Flags & LayoutFlags.LayoutRequired) == LayoutFlags.LayoutRequired))
@@ -303,31 +258,31 @@ namespace Tizen.NUI
             switch (specMode)
             {
                 case MeasureSpecification.ModeType.Unspecified:
-                    {
-                        result = size;
-                        break;
-                    }
+                {
+                    result = size;
+                    break;
+                }
                 case MeasureSpecification.ModeType.AtMost:
-                    {
-                        // Ensure the default size does not exceed the spec size unless the default size is 0.
-                        // Another container could provide a default size of 0.
+                {
+                    // Ensure the default size does not exceed the spec size unless the default size is 0.
+                    // Another container could provide a default size of 0.
 
-                        // Do not set size to 0, use specSize in this case as could be a legacy container
-                        if ((size.AsDecimal() < specSize.AsDecimal()) && (size.AsDecimal() > 0))
-                        {
-                            result = size;
-                        }
-                        else
-                        {
-                            result = specSize;
-                        }
-                        break;
+                    // Do not set size to 0, use specSize in this case as could be a legacy container
+                    if( ( size.AsDecimal() < specSize.AsDecimal()) && ( size.AsDecimal() >  0) )
+                    {
+                        result = size;
                     }
-                case MeasureSpecification.ModeType.Exactly:
+                    else
                     {
                         result = specSize;
-                        break;
                     }
+                    break;
+                }
+                case MeasureSpecification.ModeType.Exactly:
+                {
+                    result = specSize;
+                    break;
+                }
             }
 
             return result;
@@ -353,13 +308,13 @@ namespace Tizen.NUI
             Flags = Flags | LayoutFlags.ForceLayout;
             if (Parent != null)
             {
-                LayoutGroup layoutGroup =  Parent as LayoutGroup;
-                if (layoutGroup != null && !layoutGroup.LayoutRequested)
-                {
+                 LayoutGroup layoutGroup =  Parent as LayoutGroup;
+                 if(layoutGroup != null && !layoutGroup.LayoutRequested)
+                 {
                     layoutGroup.RequestLayout();
-                }
+                 }
             }
-
+                       
         }
 
         /// <summary>
@@ -370,7 +325,7 @@ namespace Tizen.NUI
         {
             get
             {
-                return (Flags & LayoutFlags.ForceLayout) == LayoutFlags.ForceLayout;
+                return ( Flags & LayoutFlags.ForceLayout) == LayoutFlags.ForceLayout;
             }
         }
 
@@ -394,14 +349,14 @@ namespace Tizen.NUI
         /// This method should be used only during measurement and layout calculations.<br />
         /// </summary>
         /// <since_tizen> 6 </since_tizen>
-        public MeasuredSize MeasuredWidth { get; set; } = new MeasuredSize(new LayoutLength(-3), MeasuredSize.StateType.MeasuredSizeOK);
+        public MeasuredSize MeasuredWidth{ get; set; } = new MeasuredSize( new LayoutLength(-3), MeasuredSize.StateType.MeasuredSizeOK);
 
         /// <summary>
         /// Get the measured height (without any measurement flags).<br />
         /// This method should be used only during measurement and layout calculations.<br />
         /// </summary>
         /// <since_tizen> 6 </since_tizen>
-        public MeasuredSize MeasuredHeight { get; set; } = new MeasuredSize(new LayoutLength(-3), MeasuredSize.StateType.MeasuredSizeOK);
+        public MeasuredSize MeasuredHeight{ get; set; } = new MeasuredSize( new LayoutLength(-3), MeasuredSize.StateType.MeasuredSizeOK);
 
         /// <summary>
         /// Returns the suggested minimum width that the layout should use.<br />
@@ -415,7 +370,7 @@ namespace Tizen.NUI
                 float maximumWidth = Owner.MaximumSize.Width;
                 float minimumWidth = Owner.MinimumSize.Width;
 
-                float baseHeight = Owner.MaximumSize.Height > 0 ? Math.Min(Owner.MaximumSize.Height, Owner.NaturalSize.Height) : Owner.NaturalSize.Height;
+                float baseHeight = Owner.MaximumSize.Height > 0 ? Math.Min(Owner.MaximumSize.Height,Owner.NaturalSize.Height) : Owner.NaturalSize.Height;
                 float baseWidth = Owner.GetWidthForHeight(baseHeight);
 
                 float result = minimumWidth > 0 ? Math.Max(baseWidth, minimumWidth) : baseWidth;
@@ -437,7 +392,7 @@ namespace Tizen.NUI
                 float maximumHeight = Owner.MaximumSize.Height;
                 float minimumHeight = Owner.MinimumSize.Height;
 
-                float baseWidth = Owner.MaximumSize.Width > 0 ? Math.Min(Owner.MaximumSize.Width, Owner.NaturalSize.Width) : Owner.NaturalSize.Width;
+                float baseWidth = Owner.MaximumSize.Width > 0 ? Math.Min(Owner.MaximumSize.Width,Owner.NaturalSize.Width) : Owner.NaturalSize.Width;
                 float baseHeight = Owner.GetHeightForWidth(baseWidth);
 
                 float result = minimumHeight > 0 ? Math.Max(baseHeight, minimumHeight) : baseHeight;
@@ -455,7 +410,7 @@ namespace Tizen.NUI
         /// 2. If the owner's View.WidthSpecification is set to View.LayoutParamPolicies.WrapContent, then the view's width is set based on the suggested minimum width. (@see GetSuggestedMinimumWidth()).<br />
         /// 3. If the owner's View.WidthSpecification is set to View.LayoutParamPolicies.MatchParent, then the parent width takes precedence over the minimum width.<br />
         /// </summary>
-        internal LayoutLength MinimumWidth { get; set; }
+        internal LayoutLength MinimumWidth {get; set;}
 
         /// <summary>
         /// Sets the minimum height of the layout.<br />
@@ -465,7 +420,7 @@ namespace Tizen.NUI
         /// 2. If the owner's View.HeightSpecification is set to View.LayoutParamPolicies.WrapContent, then the view's height is set based on the suggested minimum height. (@see GetSuggestedMinimumHeight()).<br />
         /// 3. If the owner's View.HeightSpecification is set to View.LayoutParamPolicies.MatchParent, then the parent height takes precedence over the minimum height.<br />
         /// </summary>
-        internal LayoutLength MinimumHeight { get; set; }
+        internal LayoutLength MinimumHeight {get; set;}
 
         ///<summary>
         /// Utility to reconcile a desired size and state, with constraints imposed by a MeasureSpecification.
@@ -475,34 +430,34 @@ namespace Tizen.NUI
         /// <param name="childMeasuredState"> Size information bit mask for the layout's children.</param>
         /// <returns> A measured size, which may indicate that it is too small. </returns>
         /// <since_tizen> 6 </since_tizen>
-        protected MeasuredSize ResolveSizeAndState(LayoutLength size, MeasureSpecification measureSpecification, MeasuredSize.StateType childMeasuredState)
+        protected MeasuredSize ResolveSizeAndState( LayoutLength size, MeasureSpecification measureSpecification, MeasuredSize.StateType childMeasuredState )
         {
             var specMode = measureSpecification.Mode;
             LayoutLength specSize = measureSpecification.Size;
-            MeasuredSize result = new MeasuredSize(size, childMeasuredState);
+            MeasuredSize result = new MeasuredSize( size, childMeasuredState );
 
-            switch (specMode)
+            switch( specMode )
             {
                 case MeasureSpecification.ModeType.AtMost:
+                {
+                    if (specSize.AsRoundedValue() < size.AsRoundedValue())
                     {
-                        if (specSize.AsRoundedValue() < size.AsRoundedValue())
-                        {
-                            result = new MeasuredSize(specSize, MeasuredSize.StateType.MeasuredSizeTooSmall);
-                        }
-                        break;
+                        result = new MeasuredSize( specSize, MeasuredSize.StateType.MeasuredSizeTooSmall);
                     }
+                    break;
+                }
 
                 case MeasureSpecification.ModeType.Exactly:
-                    {
-                        result.Size = specSize;
-                        break;
-                    }
+                {
+                    result.Size = specSize;
+                    break;
+                }
 
                 case MeasureSpecification.ModeType.Unspecified:
                 default:
-                    {
-                        break;
-                    }
+                {
+                    break;
+                }
             }
             return result;
         }
@@ -513,7 +468,7 @@ namespace Tizen.NUI
         /// <param name="measuredWidth">The measured width of this layout.</param>
         /// <param name="measuredHeight">The measured height of this layout.</param>
         /// <since_tizen> 6 </since_tizen>
-        protected void SetMeasuredDimensions(MeasuredSize measuredWidth, MeasuredSize measuredHeight)
+        protected void SetMeasuredDimensions( MeasuredSize measuredWidth, MeasuredSize measuredHeight )
         {
             MeasuredWidth = measuredWidth;
             MeasuredHeight = measuredHeight;
@@ -535,8 +490,8 @@ namespace Tizen.NUI
         protected virtual void OnMeasure(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
         {
             // GetDefaultSize will limit the MeasureSpec to the suggested minimumWidth and minimumHeight
-            SetMeasuredDimensions(GetDefaultSize(SuggestedMinimumWidth, widthMeasureSpec),
-                                   GetDefaultSize(SuggestedMinimumHeight, heightMeasureSpec));
+            SetMeasuredDimensions( GetDefaultSize( SuggestedMinimumWidth, widthMeasureSpec ),
+                                   GetDefaultSize( SuggestedMinimumHeight, heightMeasureSpec ) );
         }
 
         /// <summary>
@@ -569,10 +524,10 @@ namespace Tizen.NUI
         {
             bool changed = false;
 
-            if (_layoutPositionData.Left != left ||
+            if ( _layoutPositionData.Left != left ||
                  _layoutPositionData.Right != right ||
                  _layoutPositionData.Top != top ||
-                 _layoutPositionData.Bottom != bottom)
+                 _layoutPositionData.Bottom != bottom  )
             {
                 changed = true;
 
@@ -580,7 +535,7 @@ namespace Tizen.NUI
                 float oldHeight = _layoutPositionData.Bottom - _layoutPositionData.Top;
                 float newWidth = right - left;
                 float newHeight = bottom - top;
-                bool sizeChanged = (newWidth != oldWidth) || (newHeight != oldHeight);
+                bool sizeChanged = ( newWidth != oldWidth ) || ( newHeight != oldHeight );
 
                 // Set condition to layout changed as currently unspecified. Add, Remove would have specified a condition.
                 if (ConditionForAnimation.Equals(TransitionCondition.Unspecified))
@@ -591,11 +546,11 @@ namespace Tizen.NUI
                 // Store new layout position data
                 _layoutPositionData = new LayoutData(this, ConditionForAnimation, left, top, right, bottom);
 
-                Debug.WriteLineIf(LayoutDebugFrameData, "LayoutItem FramePositionData View:" + _layoutPositionData.Item.Owner.Name +
+                Debug.WriteLineIf( LayoutDebugFrameData, "LayoutItem FramePositionData View:" + _layoutPositionData.Item.Owner.Name +
                                                          " left:" + _layoutPositionData.Left +
                                                          " top:" + _layoutPositionData.Top +
                                                          " right:" + _layoutPositionData.Right +
-                                                         " bottom:" + _layoutPositionData.Bottom);
+                                                         " bottom:" + _layoutPositionData.Bottom );
 
                 if (Owner.Parent != null && Owner.Parent.Layout != null && Owner.Parent.Layout.LayoutWithTransition)
                 {
@@ -605,8 +560,11 @@ namespace Tizen.NUI
                 {
                     if (Owner.Position != null)
                     {
-                        Owner.SetSize(right - left, bottom - top);
-                        Owner.SetPosition(left, top);
+                        Owner.SetSize(right - left, bottom - top, Owner.Position.Z);
+                        if (SetPositionByLayout)
+                        {
+                            Owner.SetPosition(left, top, Owner.Position.Z);
+                        }
                     }
                 }
 
index ea3ee27..2c916f2 100755 (executable)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2020 Samsung Electronics Co., Ltd.
+/* Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -50,31 +50,31 @@ namespace Tizen.NUI
             /// <summary>
             /// At the left/right edge of the container (maps to LTR/RTL direction for horizontal orientation)
             /// </summary>
-            Begin = 0x1,
+            Begin              = 0x1,
             /// <summary>
             /// At the right/left edge of the container (maps to LTR/RTL direction for horizontal orientation)
             /// </summary>
-            End = 0x2,
+            End                = 0x2,
             /// <summary>
             /// At the horizontal center of the container
             /// </summary>
-            CenterHorizontal = 0x4,
+            CenterHorizontal   = 0x4,
             /// <summary>
             /// At the top edge of the container
             /// </summary>
-            Top = 0x8,
+            Top                = 0x8,
             /// <summary>
             /// At the bottom edge of the container
             /// </summary>
-            Bottom = 0x10,
+            Bottom             = 0x10,
             /// <summary>
             /// At the vertical center of the container
             /// </summary>
-            CenterVertical = 0x20,
+            CenterVertical     = 0x20,
             /// <summary>
             /// At the vertical and horizontal center of the container
             /// </summary>
-            Center = 0x40
+            Center             = 0x40
         }
 
         struct HeightAndWidthState
@@ -82,7 +82,7 @@ namespace Tizen.NUI
             public MeasuredSize.StateType widthState;
             public MeasuredSize.StateType heightState;
 
-            public HeightAndWidthState(MeasuredSize.StateType width, MeasuredSize.StateType height)
+            public HeightAndWidthState( MeasuredSize.StateType width, MeasuredSize.StateType height)
             {
                 widthState = width;
                 heightState = height;
@@ -128,10 +128,10 @@ namespace Tizen.NUI
         /// [Draft] Get/Set the alignment in the layout
         /// </summary>
         /// <since_tizen> 6 </since_tizen>
-        public LinearLayout.Alignment LinearAlignment { get; set; } = Alignment.Top;
+        public LinearLayout.Alignment LinearAlignment{ get; set; } = Alignment.Top;
 
         private float _totalLength = 0.0f;
-        private Size2D _cellPadding = new Size2D(0, 0);
+        private Size2D _cellPadding  = new Size2D(0,0);
         private Orientation _linearOrientation = Orientation.Horizontal;
 
         /// <summary>
@@ -179,13 +179,12 @@ namespace Tizen.NUI
             {
                 LayoutVertical(left, top, right, bottom);
             }
-            LayoutForIndependentChild();
         }
 
 
-        private void MeasureWeightedChild(LayoutItem childLayout, float remainingExcess, float remainingWeight, float childWeight,
+        private void MeasureWeightedChild( LayoutItem childLayout, float remainingExcess, float remainingWeight, float childWeight,
                                            MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec,
-                                           HeightAndWidthState childState, Orientation orientation)
+                                           HeightAndWidthState childState, Orientation orientation )
         {
             bool horizontal = false;
             if (orientation == Orientation.Horizontal)
@@ -193,7 +192,7 @@ namespace Tizen.NUI
                 horizontal = true;
             }
 
-            float childsShare = (childWeight * remainingExcess) / remainingWeight;
+            float childsShare = ( childWeight * remainingExcess ) / remainingWeight;
             remainingExcess -= childsShare;
             remainingWeight -= childWeight;
 
@@ -203,7 +202,7 @@ namespace Tizen.NUI
 
             // Always lay out weighted elements with intrinsic size regardless of the parent spec.
             // for consistency between specs.
-            if ((horizontal && (desiredWidth == 0)) || (!horizontal && (desiredHeight == 0)))
+            if( ( horizontal && ( desiredWidth == 0 )) || ( !horizontal && ( desiredHeight == 0 )) )
             {
                 // This child needs to be laid out from scratch using
                 // only its share of excess space.
@@ -228,8 +227,8 @@ namespace Tizen.NUI
 
             if (horizontal)
             {
-                childWidthMeasureSpec = new MeasureSpecification(new LayoutLength(childLength), MeasureSpecification.ModeType.Exactly);
-                childHeightMeasureSpec = GetChildMeasureSpecification(
+                childWidthMeasureSpec = new MeasureSpecification( new LayoutLength(childLength), MeasureSpecification.ModeType.Exactly );
+                childHeightMeasureSpec = GetChildMeasureSpecification( 
                                             new MeasureSpecification(
                                                 new LayoutLength(heightMeasureSpec.Size - (childLayout.Owner.Margin.Top + childLayout.Owner.Margin.Bottom)),
                                                 heightMeasureSpec.Mode),
@@ -245,19 +244,19 @@ namespace Tizen.NUI
                                             new LayoutLength(Padding.Start + Padding.End),
                                             new LayoutLength(desiredWidth));
 
-                childHeightMeasureSpec = new MeasureSpecification(new LayoutLength(childLength), MeasureSpecification.ModeType.Exactly);
+                childHeightMeasureSpec = new MeasureSpecification( new LayoutLength(childLength), MeasureSpecification.ModeType.Exactly);
             }
 
-            childLayout.Measure(childWidthMeasureSpec, childHeightMeasureSpec);
+            childLayout.Measure( childWidthMeasureSpec, childHeightMeasureSpec );
 
             // Child may now not fit in horizontal dimension.
-            if (childLayout.MeasuredWidth.State == MeasuredSize.StateType.MeasuredSizeTooSmall)
+            ifchildLayout.MeasuredWidth.State == MeasuredSize.StateType.MeasuredSizeTooSmall)
             {
                 childState.widthState = MeasuredSize.StateType.MeasuredSizeTooSmall;
             }
 
             // Child may now not fit in vertical dimension.
-            if (childLayout.MeasuredHeight.State == MeasuredSize.StateType.MeasuredSizeTooSmall)
+            ifchildLayout.MeasuredHeight.State == MeasuredSize.StateType.MeasuredSizeTooSmall)
             {
                 childState.heightState = MeasuredSize.StateType.MeasuredSizeTooSmall;
             }
@@ -267,7 +266,7 @@ namespace Tizen.NUI
         {
             var widthMode = widthMeasureSpec.Mode;
             var heightMode = heightMeasureSpec.Mode;
-            bool isExactly = (widthMode == MeasureSpecification.ModeType.Exactly);
+            bool isExactly = ( widthMode == MeasureSpecification.ModeType.Exactly );
             bool matchHeight = false;
             bool allFillParent = true;
             float maxHeight = 0.0f;
@@ -290,22 +289,16 @@ namespace Tizen.NUI
             for (int i = 0; i < LayoutChildren.Count; i++)
             {
                 LayoutItem childLayout = LayoutChildren[i];
-                if (childLayout.Owner.ExcludeLayouting)
-                {
-                    MeasureChildWithoutPadding(childLayout, widthMeasureSpec, heightMeasureSpec);
-                    continue;
-                }
-
                 int childDesiredHeight = childLayout.Owner.HeightSpecification;
                 float childWeight = childLayout.Owner.Weight;
                 Extents childMargin = childLayout.Margin;
                 totalWeight += childWeight;
 
-                bool useExcessSpace = (childLayout.Owner.WidthSpecification == 0) && (childWeight > 0);
-                if (isExactly && useExcessSpace)
+                bool useExcessSpace = (childLayout.Owner.WidthSpecification == 0 ) && (childWeight > 0);
+                if( isExactly && useExcessSpace )
                 {
                     // Children to be laid out with excess space can be measured later
-                    _totalLength = Math.Max(_totalLength, (_totalLength + childMargin.Start + childMargin.End));
+                    _totalLength = Math.Max( _totalLength, (_totalLength + childMargin.Start + childMargin.End) );
                 }
                 else
                 {
@@ -330,7 +323,7 @@ namespace Tizen.NUI
                                                 new LayoutLength(Padding.Top + Padding.Bottom),
                                                 new LayoutLength(childDesiredHeight));
 
-                        childLayout.Measure(childWidthMeasureSpec, childHeightMeasureSpec);
+                        childLayout.Measure( childWidthMeasureSpec, childHeightMeasureSpec);
                         usedExcessSpace += childLayout.MeasuredWidth.Size.AsDecimal();
                     }
                     else
@@ -372,23 +365,23 @@ namespace Tizen.NUI
                     childState.heightState = MeasuredSize.StateType.MeasuredSizeTooSmall;
                 }
 
-                maxHeight = Math.Max(maxHeight, childHeight);
-                allFillParent = (allFillParent && childDesiredHeight == LayoutParamPolicies.MatchParent);
+                maxHeight = Math.Max( maxHeight, childHeight);
+                allFillParent = ( allFillParent && childDesiredHeight == LayoutParamPolicies.MatchParent);
 
                 if (childWeight > 0)
                 {
-                    // Heights of weighted Views are invalid if we end up remeasuring, so store them separately.
-                    weightedMaxHeight = Math.Max(weightedMaxHeight, matchHeightLocally ? marginHeight : childHeight);
+                  // Heights of weighted Views are invalid if we end up remeasuring, so store them separately.
+                  weightedMaxHeight = Math.Max( weightedMaxHeight, matchHeightLocally ? marginHeight : childHeight);
                 }
                 else
                 {
-                    alternativeMaxHeight = Math.Max(alternativeMaxHeight, matchHeightLocally ? marginHeight : childHeight);
+                  alternativeMaxHeight = Math.Max( alternativeMaxHeight, matchHeightLocally ? marginHeight : childHeight );
                 }
             } // foreach
 
             float widthSize = _totalLength;
-            widthSize = Math.Max(widthSize, SuggestedMinimumWidth.AsDecimal());
-            MeasuredSize widthSizeAndState = ResolveSizeAndState(new LayoutLength(widthSize + Padding.Start + Padding.End), widthMeasureSpec, MeasuredSize.StateType.MeasuredSizeOK);
+            widthSize = Math.Max( widthSize, SuggestedMinimumWidth.AsDecimal());
+            MeasuredSize widthSizeAndState = ResolveSizeAndState( new LayoutLength(widthSize + Padding.Start + Padding.End), widthMeasureSpec, MeasuredSize.StateType.MeasuredSizeOK);
             widthSize = widthSizeAndState.Size.AsDecimal();
 
             // 2nd phase:
@@ -397,58 +390,54 @@ namespace Tizen.NUI
             // The children are measured with exact size equal to their share of the available space based on their weights.
             // _totalLength is updated to include weighted children measured sizes.
             float remainingExcess = widthSize - _totalLength + usedExcessSpace - (Padding.Start + Padding.End);
-            if (remainingExcess != 0 && totalWeight > 0)
+            if( remainingExcess != 0 && totalWeight > 0 )
             {
                 float remainingWeight = totalWeight;
                 maxHeight = 0;
                 _totalLength = 0;
 
                 int numberOfChildren = LayoutChildren.Count;
-                for (int i = 0; i < numberOfChildren; ++i)
+                for( int i = 0; i < numberOfChildren; ++i )
                 {
                     LayoutItem childLayout = LayoutChildren[i];
-                    if (childLayout.Owner.ExcludeLayouting)
-                    {
-                        continue;
-                    }
 
                     float desiredChildHeight = childLayout.Owner.HeightSpecification;
 
                     float childWeight = childLayout.Owner.Weight;
                     Extents childMargin = childLayout.Margin;
 
-                    if (childWeight > 0)
+                    if( childWeight > 0 )
                     {
                         MeasureWeightedChild(childLayout, remainingExcess, remainingWeight, childWeight,
                                              widthMeasureSpec, heightMeasureSpec, childState,
-                                             Orientation.Horizontal);
+                                             Orientation.Horizontal );
                     }
 
                     float length = childLayout.MeasuredWidth.Size.AsDecimal() + childMargin.Start + childMargin.End;
                     float cellPadding = i < numberOfChildren - 1 ? CellPadding.Width : 0;
-                    if (isExactly)
+                    if( isExactly )
                     {
                         _totalLength += length;
                     }
                     else
                     {
                         float totalLength = _totalLength;
-                        _totalLength = Math.Max(_totalLength, _totalLength + length + cellPadding);
+                        _totalLength = Math.Max( _totalLength, _totalLength + length + cellPadding );
                     }
 
                     bool matchHeightLocally = (heightMode != MeasureSpecification.ModeType.Exactly) && (desiredChildHeight == LayoutParamPolicies.MatchParent);
                     float marginHeight = childMargin.Top + childMargin.Bottom;
                     float childHeight = childLayout.MeasuredHeight.Size.AsDecimal() + marginHeight;
 
-                    maxHeight = Math.Max(maxHeight, childHeight);
-                    alternativeMaxHeight = Math.Max(alternativeMaxHeight, matchHeightLocally ? marginHeight : childHeight);
+                    maxHeight = Math.Max( maxHeight, childHeight );
+                    alternativeMaxHeight = Math.Max( alternativeMaxHeight, matchHeightLocally ? marginHeight : childHeight );
                     allFillParent = (allFillParent && desiredChildHeight == LayoutParamPolicies.MatchParent);
                 } // for loop
             }
             else
             {
                 // No excess space or no weighted children
-                alternativeMaxHeight = Math.Max(alternativeMaxHeight, weightedMaxHeight);
+                alternativeMaxHeight = Math.Max( alternativeMaxHeight, weightedMaxHeight );
             }
 
             if (!allFillParent && heightMode != MeasureSpecification.ModeType.Exactly)
@@ -459,13 +448,13 @@ namespace Tizen.NUI
 
 
             // Padding should be concerned when specification is Wrapcontent.
-            maxHeight += (Owner.HeightSpecification == LayoutParamPolicies.WrapContent) ? (Padding.Top + Padding.Bottom) : 0;
-            maxHeight = Math.Max(maxHeight, SuggestedMinimumHeight.AsRoundedValue());
+            maxHeight += (Owner.HeightSpecification == LayoutParamPolicies.WrapContent)?(Padding.Top + Padding.Bottom):0;
+            maxHeight = Math.Max( maxHeight, SuggestedMinimumHeight.AsRoundedValue() );
 
             widthSizeAndState.State = childState.widthState;
 
             SetMeasuredDimensions(widthSizeAndState,
-                                  ResolveSizeAndState(new LayoutLength(maxHeight), heightMeasureSpec, childState.heightState));
+                                  ResolveSizeAndState( new LayoutLength(maxHeight), heightMeasureSpec, childState.heightState ));
 
             if (matchHeight)
             {
@@ -473,11 +462,11 @@ namespace Tizen.NUI
             }
         } // MeasureHorizontal
 
-        private void MeasureVertical(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
+        private void MeasureVertical( MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec )
         {
             var widthMode = widthMeasureSpec.Mode;
             var heightMode = heightMeasureSpec.Mode;
-            bool isExactly = (heightMode == MeasureSpecification.ModeType.Exactly);
+            bool isExactly = ( heightMode == MeasureSpecification.ModeType.Exactly);
             bool matchWidth = false;
             bool allFillParent = true;
             float maxWidth = 0.0f;
@@ -487,7 +476,7 @@ namespace Tizen.NUI
 
             // Reset total length
             _totalLength = 0.0f;
-            float usedExcessSpace = 0.0f;
+            float usedExcessSpace =0.0f;
             HeightAndWidthState childState = new HeightAndWidthState(MeasuredSize.StateType.MeasuredSizeOK,
                                                                      MeasuredSize.StateType.MeasuredSizeOK);
 
@@ -502,25 +491,19 @@ namespace Tizen.NUI
             for (int i = 0; i < LayoutChildren.Count; i++)
             {
                 LayoutItem childLayout = LayoutChildren[i];
-                if (childLayout.Owner.ExcludeLayouting)
-                {
-                    MeasureChildWithoutPadding(childLayout, widthMeasureSpec, heightMeasureSpec);
-                    continue;
-                }
-
                 int childDesiredWidth = childLayout.Owner.WidthSpecification;
                 float childWeight = childLayout.Owner.Weight;
                 Extents childMargin = childLayout.Margin;
                 totalWeight += childWeight;
 
                 bool useExcessSpace = (childLayout.Owner.HeightSpecification == 0) && (childWeight > 0);
-                if (isExactly && useExcessSpace)
+                if( isExactly && useExcessSpace )
                 {
-                    _totalLength = Math.Max(_totalLength, (_totalLength + childMargin.Top + childMargin.Bottom));
+                   _totalLength = Math.Max( _totalLength, (_totalLength + childMargin.Top + childMargin.Bottom) );
                 }
                 else
                 {
-                    if (useExcessSpace)
+                    if( useExcessSpace )
                     {
                         // The heightMode is either Unspecified or AtMost, and
                         // this child is only laid out using excess space. Measure
@@ -564,7 +547,7 @@ namespace Tizen.NUI
                 }
 
                 bool matchWidthLocally = false;
-                if (widthMode != MeasureSpecification.ModeType.Exactly && childDesiredWidth == LayoutParamPolicies.MatchParent)
+                if( widthMode != MeasureSpecification.ModeType.Exactly && childDesiredWidth ==  LayoutParamPolicies.MatchParent)
                 {
                     // Will have to re-measure at least this child when we know exact height.
                     matchWidth = true;
@@ -583,24 +566,24 @@ namespace Tizen.NUI
                     childState.heightState = MeasuredSize.StateType.MeasuredSizeTooSmall;
                 }
 
-                maxWidth = Math.Max(maxWidth, childWidth);
-                allFillParent = (allFillParent && childDesiredWidth == LayoutParamPolicies.MatchParent);
+                maxWidth = Math.Max( maxWidth, childWidth);
+                allFillParent = ( allFillParent && childDesiredWidth == LayoutParamPolicies.MatchParent);
 
                 if (childWeight > 0)
                 {
                     // Widths of weighted Views are bogus if we end up remeasuring, so keep them separate.
-                    weightedMaxWidth = Math.Max(weightedMaxWidth, matchWidthLocally ? marginWidth : childWidth);
+                    weightedMaxWidth = Math.Max( weightedMaxWidth,  matchWidthLocally ? marginWidth : childWidth);
                 }
                 else
                 {
-                    alternativeMaxWidth = Math.Max(alternativeMaxWidth, matchWidthLocally ? marginWidth : childWidth);
+                    alternativeMaxWidth = Math.Max( alternativeMaxWidth, matchWidthLocally ? marginWidth : childWidth);
                 }
             } // foreach
 
 
             float heightSize = _totalLength;
-            heightSize = Math.Max(heightSize, SuggestedMinimumHeight.AsDecimal());
-            MeasuredSize heightSizeAndState = ResolveSizeAndState(new LayoutLength(heightSize + Padding.Top + Padding.Bottom), heightMeasureSpec, MeasuredSize.StateType.MeasuredSizeOK);
+            heightSize = Math.Max( heightSize, SuggestedMinimumHeight.AsDecimal());
+            MeasuredSize heightSizeAndState = ResolveSizeAndState( new LayoutLength(heightSize + Padding.Top + Padding.Bottom), heightMeasureSpec, MeasuredSize.StateType.MeasuredSizeOK );
             heightSize = heightSizeAndState.Size.AsDecimal();
 
             // 2nd phase:
@@ -608,27 +591,23 @@ namespace Tizen.NUI
             // The children are measured with exact size equal to their share of the available space based on their weights.
             // _totalLength is updated to include weighted children measured sizes.
             float remainingExcess = heightSize - _totalLength + usedExcessSpace - (Padding.Top + Padding.Bottom);
-            if (remainingExcess != 0 && totalWeight > 0.0f)
+            if( remainingExcess != 0 && totalWeight > 0.0f )
             {
                 float remainingWeight = totalWeight;
                 maxWidth = 0;
                 _totalLength = 0;
 
                 int numberOfChildren = LayoutChildren.Count;
-                for (int i = 0; i < numberOfChildren; ++i)
+                for( int i = 0; i < numberOfChildren; ++i )
                 {
                     LayoutItem childLayout = LayoutChildren[i];
-                    if (childLayout.Owner.ExcludeLayouting)
-                    {
-                        continue;
-                    }
 
                     float desiredChildWidth = childLayout.Owner.WidthSpecification;
 
                     float childWeight = childLayout.Owner.Weight;
                     Extents childMargin = childLayout.Margin;
 
-                    if (childWeight > 0)
+                    if( childWeight > 0 )
                     {
                         MeasureWeightedChild(childLayout, remainingExcess, remainingWeight, childWeight,
                                                 widthMeasureSpec, heightMeasureSpec, childState,
@@ -638,28 +617,28 @@ namespace Tizen.NUI
                     float length = childLayout.MeasuredHeight.Size.AsDecimal() + childMargin.Top + childMargin.Bottom;
                     float cellPadding = i < numberOfChildren - 1 ? CellPadding.Height : 0;
 
-                    if (isExactly)
+                    if( isExactly )
                     {
                         _totalLength += length;
                     }
                     else
                     {
                         float totalLength = _totalLength;
-                        _totalLength = Math.Max(_totalLength, _totalLength + length + cellPadding);
+                        _totalLength = Math.Max( _totalLength, _totalLength + length + cellPadding );
                     }
 
                     bool matchWidthLocally = (widthMode != MeasureSpecification.ModeType.Exactly) && (desiredChildWidth == LayoutParamPolicies.MatchParent);
                     float marginWidth = childMargin.Start + childMargin.End;
                     float childWidth = childLayout.MeasuredWidth.Size.AsDecimal() + marginWidth;
 
-                    maxWidth = Math.Max(maxWidth, childWidth);
-                    alternativeMaxWidth = Math.Max(alternativeMaxWidth, matchWidthLocally ? marginWidth : childWidth);
+                    maxWidth = Math.Max( maxWidth, childWidth );
+                    alternativeMaxWidth = Math.Max( alternativeMaxWidth, matchWidthLocally ? marginWidth : childWidth );
                     allFillParent = (allFillParent && desiredChildWidth == LayoutParamPolicies.MatchParent);
                 } // for loop
             }
             else
             {
-                alternativeMaxWidth = Math.Max(alternativeMaxWidth, weightedMaxWidth);
+                alternativeMaxWidth = Math.Max( alternativeMaxWidth, weightedMaxWidth );
             }
 
             if (!allFillParent && widthMode != MeasureSpecification.ModeType.Exactly)
@@ -667,17 +646,17 @@ namespace Tizen.NUI
                 maxWidth = alternativeMaxWidth;
             }
 
-            maxWidth += (Owner.WidthSpecification == LayoutParamPolicies.WrapContent) ? (Padding.Start + Padding.End) : 0;
-            maxWidth = Math.Max(maxWidth, SuggestedMinimumWidth.AsRoundedValue());
+            maxWidth += (Owner.WidthSpecification == LayoutParamPolicies.WrapContent)?(Padding.Start + Padding.End):0;
+            maxWidth = Math.Max( maxWidth, SuggestedMinimumWidth.AsRoundedValue());
 
             heightSizeAndState.State = childState.heightState;
 
-            SetMeasuredDimensions(ResolveSizeAndState(new LayoutLength(maxWidth), widthMeasureSpec, childState.widthState),
-                                  heightSizeAndState);
+            SetMeasuredDimensions( ResolveSizeAndState( new LayoutLength(maxWidth), widthMeasureSpec, childState.widthState ),
+                                  heightSizeAndState );
 
             if (matchWidth)
             {
-                ForceUniformWidth(heightMeasureSpec);
+                ForceUniformWidth(heightMeasureSpec );
             }
         } // MeasureVertical
 
@@ -692,7 +671,7 @@ namespace Tizen.NUI
             LayoutLength height = new LayoutLength(bottom - top);
 
             // Space available for child
-            LayoutLength childSpace = new LayoutLength(height - Padding.Top - Padding.Bottom);
+            LayoutLength childSpace = new LayoutLength( height - Padding.Top - Padding.Bottom);
 
             int count = LayoutChildren.Count;
 
@@ -721,7 +700,7 @@ namespace Tizen.NUI
                     // In case of RTL map BEGIN alignment to the right edge
                     if (isLayoutRtl)
                     {
-                        childLeft = new LayoutLength(Padding.Start + right.AsDecimal() - left.AsDecimal() - _totalLength);
+                        childLeft = new LayoutLength(Padding.Start  + right.AsDecimal() - left.AsDecimal() - _totalLength);
                     }
                     else
                     {
@@ -740,37 +719,34 @@ namespace Tizen.NUI
                 dir = -1;
             }
 
-            for (int i = 0; i < count; i++)
+            forint i = 0; i < count; i++)
             {
                 int childIndex = start + dir * i;
                 // Get a reference to the childLayout at the given index
                 LayoutItem childLayout = LayoutChildren[childIndex];
-                if (childLayout != null)
+                if( childLayout != null )
                 {
-                    if (!childLayout.Owner.ExcludeLayouting)
+                    LayoutLength childWidth = childLayout.MeasuredWidth.Size;
+                    LayoutLength childHeight = childLayout.MeasuredHeight.Size;
+                    Extents childMargin = childLayout.Margin;
+
+                    switch ( LinearAlignment )
                     {
-                        LayoutLength childWidth = childLayout.MeasuredWidth.Size;
-                        LayoutLength childHeight = childLayout.MeasuredHeight.Size;
-                        Extents childMargin = childLayout.Margin;
-
-                        switch (LinearAlignment)
-                        {
-                            case Alignment.Bottom:
-                                childTop = new LayoutLength(height - Padding.Bottom - childHeight - childMargin.Bottom);
-                                break;
-                            case Alignment.CenterVertical:
-                            case Alignment.Center: // FALLTHROUGH
-                                childTop = new LayoutLength(Padding.Top + ((childSpace - childHeight).AsDecimal() / 2.0f) + childMargin.Top - childMargin.Bottom);
-                                break;
-                            case Alignment.Top: // FALLTHROUGH default
-                            default:
-                                childTop = new LayoutLength(Padding.Top + childMargin.Top);
-                                break;
-                        }
-                        childLeft += childMargin.Start;
-                        childLayout.Layout(childLeft, childTop, childLeft + childWidth, childTop + childHeight);
-                        childLeft += childWidth + childMargin.End + ((i < count - 1) ? CellPadding.Width : 0);
+                        case Alignment.Bottom:
+                            childTop = new LayoutLength(height - Padding.Bottom - childHeight - childMargin.Bottom);
+                            break;
+                        case Alignment.CenterVertical:
+                        case Alignment.Center: // FALLTHROUGH
+                            childTop = new LayoutLength(Padding.Top + ( ( childSpace - childHeight ).AsDecimal() / 2.0f ) + childMargin.Top - childMargin.Bottom);
+                            break;
+                        case Alignment.Top: // FALLTHROUGH default
+                        default:
+                            childTop = new LayoutLength(Padding.Top + childMargin.Top);
+                            break;
                     }
+                    childLeft += childMargin.Start;
+                    childLayout.Layout(childLeft, childTop, childLeft + childWidth, childTop + childHeight);
+                    childLeft += childWidth + childMargin.End + ((i < count - 1) ? CellPadding.Width : 0);
                 }
             }
         } // LayoutHorizontally
@@ -784,118 +760,106 @@ namespace Tizen.NUI
             LayoutLength width = new LayoutLength(right - left);
 
             // Space available for child
-            LayoutLength childSpace = new LayoutLength(width - Padding.Start - Padding.End);
+            LayoutLength childSpace = new LayoutLength( width - Padding.Start - Padding.End);
 
             int count = LayoutChildren.Count;
 
             switch (LinearAlignment)
             {
-                case Alignment.Bottom:
-                    // totalLength contains the padding already
-                    childTop = new LayoutLength(Padding.Top + bottom.AsDecimal() - top.AsDecimal() - _totalLength);
-                    break;
-                case Alignment.CenterVertical: // FALL THROUGH
-                case Alignment.Center:
-                    // totalLength contains the padding already
-                    childTop = new LayoutLength(Padding.Top + (bottom.AsDecimal() - top.AsDecimal() - _totalLength) / 2.0f);
-                    break;
-                case Alignment.Top:  // FALL THROUGH (default)
-                default:
-                    // totalLength contains the padding already
-                    childTop = new LayoutLength(Padding.Top);
-                    break;
+              case Alignment.Bottom:
+                // totalLength contains the padding already
+                childTop = new LayoutLength( Padding.Top + bottom.AsDecimal() - top.AsDecimal() - _totalLength);
+                break;
+              case Alignment.CenterVertical: // FALL THROUGH
+              case Alignment.Center:
+                // totalLength contains the padding already
+                childTop = new LayoutLength(Padding.Top + ( bottom.AsDecimal() - top.AsDecimal() - _totalLength ) / 2.0f);
+                break;
+              case Alignment.Top:  // FALL THROUGH (default)
+              default:
+                // totalLength contains the padding already
+                childTop = new LayoutLength( Padding.Top );
+                break;
             }
 
-            for (int i = 0; i < count; i++)
+            forint i = 0; i < count; i++)
             {
                 LayoutItem childLayout = LayoutChildren[i];
-                if (childLayout != null)
+                if( childLayout != null )
                 {
-                    if (!childLayout.Owner.ExcludeLayouting)
+                    LayoutLength childWidth = childLayout.MeasuredWidth.Size;
+                    LayoutLength childHeight = childLayout.MeasuredHeight.Size;
+                    Extents childMargin = childLayout.Margin;
+
+                    childTop += childMargin.Top;
+                    switch ( LinearAlignment )
                     {
-                        LayoutLength childWidth = childLayout.MeasuredWidth.Size;
-                        LayoutLength childHeight = childLayout.MeasuredHeight.Size;
-                        Extents childMargin = childLayout.Margin;
-
-                        childTop += childMargin.Top;
-                        switch (LinearAlignment)
-                        {
-                            case Alignment.Begin:
-                            default:
-                                {
-                                    childLeft = new LayoutLength(Padding.Start + childMargin.Start);
-                                    break;
-                                }
-                            case Alignment.End:
-                                {
-                                    childLeft = new LayoutLength(width - Padding.End - childWidth - childMargin.End);
-                                    break;
-                                }
-                            case Alignment.CenterHorizontal:
-                            case Alignment.Center: // FALL THROUGH
-                                {
-                                    childLeft = new LayoutLength(Padding.Start + ((childSpace - childWidth).AsDecimal() / 2.0f) + childMargin.Start - childMargin.End);
-                                    break;
-                                }
-                        }
-                        childLayout.Layout(childLeft, childTop, childLeft + childWidth, childTop + childHeight);
-                        childTop += childHeight + childMargin.Bottom + ((i < count - 1) ? CellPadding.Height : 0);
+                      case Alignment.Begin:
+                      default:
+                      {
+                        childLeft = new LayoutLength(Padding.Start + childMargin.Start);
+                        break;
+                      }
+                      case Alignment.End:
+                      {
+                        childLeft = new LayoutLength(width - Padding.End - childWidth - childMargin.End);
+                        break;
+                      }
+                      case Alignment.CenterHorizontal:
+                      case Alignment.Center: // FALL THROUGH
+                      {
+                        childLeft = new LayoutLength(Padding.Start + (( childSpace - childWidth ).AsDecimal() / 2.0f) + childMargin.Start - childMargin.End);
+                        break;
+                      }
                     }
+                    childLayout.Layout( childLeft, childTop, childLeft + childWidth, childTop + childHeight );
+                    childTop += childHeight + childMargin.Bottom + ((i < count - 1) ? CellPadding.Height : 0);
                 }
             }
         } // LayoutVertical
 
         private void ForceUniformHeight(MeasureSpecification widthMeasureSpec)
         {
-            // Pretend that the linear layout has an exact size. This is the measured height of
-            // ourselves. The measured height should be the max height of the children, changed
-            // to accommodate the heightMeasureSpec from the parent
-            MeasureSpecification uniformMeasureSpec = new MeasureSpecification(MeasuredHeight.Size, MeasureSpecification.ModeType.Exactly);
-            foreach (LayoutItem childLayout in LayoutChildren)
-            {
-                if (childLayout.Owner.ExcludeLayouting)
-                {
-                    continue;
-                }
-                int desiredChildHeight = childLayout.Owner.HeightSpecification;
-                int desiredChildWidth = childLayout.Owner.WidthSpecification;
-
-                if (desiredChildHeight == LayoutParamPolicies.MatchParent)
-                {
-                    // Temporarily force children to reuse their original measured width
-                    int originalWidth = desiredChildWidth;
-                    childLayout.Owner.WidthSpecification = (int)childLayout.MeasuredWidth.Size.AsRoundedValue();
-                    // Remeasure with new dimensions
-                    MeasureChildWithMargins(childLayout, widthMeasureSpec, new LayoutLength(0),
-                                             uniformMeasureSpec, new LayoutLength(0));
-                    // Restore width specification
-                    childLayout.Owner.WidthSpecification = originalWidth;
-                }
-            }
+          // Pretend that the linear layout has an exact size. This is the measured height of
+          // ourselves. The measured height should be the max height of the children, changed
+          // to accommodate the heightMeasureSpec from the parent
+          MeasureSpecification uniformMeasureSpec = new MeasureSpecification( MeasuredHeight.Size, MeasureSpecification.ModeType.Exactly);
+          foreach (LayoutItem childLayout in LayoutChildren)
+          {
+              int desiredChildHeight = childLayout.Owner.HeightSpecification;
+              int desiredChildWidth = childLayout.Owner.WidthSpecification;
+
+              if (desiredChildHeight == LayoutParamPolicies.MatchParent)
+              {
+                  // Temporarily force children to reuse their original measured width
+                  int originalWidth = desiredChildWidth;
+                  childLayout.Owner.WidthSpecification = (int)childLayout.MeasuredWidth.Size.AsRoundedValue();
+                  // Remeasure with new dimensions
+                  MeasureChildWithMargins( childLayout, widthMeasureSpec, new LayoutLength(0),
+                                           uniformMeasureSpec, new LayoutLength(0) );
+                  // Restore width specification
+                  childLayout.Owner.WidthSpecification =  originalWidth;
+              }
+          }
         }
 
         private void ForceUniformWidth(MeasureSpecification heightMeasureSpec)
         {
             // Pretend that the linear layout has an exact size.
-            MeasureSpecification uniformMeasureSpec = new MeasureSpecification(MeasuredWidth.Size, MeasureSpecification.ModeType.Exactly);
+            MeasureSpecification uniformMeasureSpec = new MeasureSpecification( MeasuredWidth.Size, MeasureSpecification.ModeType.Exactly);
             foreach (LayoutItem childLayout in LayoutChildren)
             {
-                if (childLayout.Owner.ExcludeLayouting)
-                {
-                    continue;
-                }
-
                 int desiredChildWidth = childLayout.Owner.WidthSpecification;
                 int desiredChildHeight = childLayout.Owner.WidthSpecification;
 
-                if (desiredChildWidth == LayoutParamPolicies.MatchParent)
+                if (desiredChildWidth  == LayoutParamPolicies.MatchParent)
                 {
                     // Temporarily force children to reuse their original measured height
                     int originalHeight = desiredChildHeight;
-                    childLayout.Owner.HeightSpecification = (int)childLayout.MeasuredHeight.Size.AsRoundedValue();
+                    childLayout.Owner.HeightSpecification =  (int)childLayout.MeasuredHeight.Size.AsRoundedValue();
 
                     // Remeasure with new dimensions
-                    MeasureChildWithMargins(childLayout, uniformMeasureSpec, new LayoutLength(0),
+                    MeasureChildWithMargins( childLayout, uniformMeasureSpec, new LayoutLength(0),
                                              heightMeasureSpec, new LayoutLength(0));
                     // Restore height specification
                     childLayout.Owner.HeightSpecification = originalHeight;