private MarginsCollapseInfo CreateMarginsInfoForBlockChild(int childIndex)
        {
            bool ignoreChildTopMargin = false;
            // always assume that current child might be the last on this area
            bool ignoreChildBottomMargin = LastChildMarginAdjoinedToParent(renderer);

            if (childIndex == firstNotEmptyKidIndex)
            {
                ignoreChildTopMargin = FirstChildMarginAdjoinedToParent(renderer);
            }
            MarginsCollapse childCollapseBefore;

            if (childIndex == 0)
            {
                MarginsCollapse parentCollapseBefore = collapseInfo.GetCollapseBefore();
                childCollapseBefore = ignoreChildTopMargin ? parentCollapseBefore : new MarginsCollapse();
            }
            else
            {
                MarginsCollapse prevChildCollapseAfter = prevChildMarginInfo != null?prevChildMarginInfo.GetOwnCollapseAfter
                                                             () : null;

                childCollapseBefore = prevChildCollapseAfter != null ? prevChildCollapseAfter : new MarginsCollapse();
            }
            MarginsCollapse     parentCollapseAfter = collapseInfo.GetCollapseAfter().Clone();
            MarginsCollapse     childCollapseAfter  = ignoreChildBottomMargin ? parentCollapseAfter : new MarginsCollapse();
            MarginsCollapseInfo childMarginsInfo    = new MarginsCollapseInfo(ignoreChildTopMargin, ignoreChildBottomMargin
                                                                              , childCollapseBefore, childCollapseAfter);

            if (ignoreChildTopMargin && childIndex == firstNotEmptyKidIndex)
            {
                childMarginsInfo.SetBufferSpaceOnTop(collapseInfo.GetBufferSpaceOnTop());
            }
            if (ignoreChildBottomMargin)
            {
                childMarginsInfo.SetBufferSpaceOnBottom(collapseInfo.GetBufferSpaceOnBottom());
            }
            return(childMarginsInfo);
        }
 public virtual void ProcessFixedHeightAdjustment(float heightDelta)
 {
     collapseInfo.SetBufferSpaceOnTop(collapseInfo.GetBufferSpaceOnTop() + heightDelta);
     collapseInfo.SetBufferSpaceOnBottom(collapseInfo.GetBufferSpaceOnBottom() + heightDelta);
 }