static void TransplateDisplayOutsideInside(CssDisplay cssDisplay, out CssDisplayOutside outside, out CssDisplayInside inside)
        {
            //Short display     Full display    Generated box
            //none  〃                           subtree omitted from box tree
            //contents  〃                       element replaced by contents in box tree

            //block         'block flow'        block-level block container aka block box
            //flow-root     'block flow-root'   block-level block container that establishes a new block formatting context (BFC)
            //inline        'inline flow'       inline box
            //inline-block  'inline flow-root'  inline-level block container
            //run-in        'run-in flow'       run-in box (inline box with special box-tree-munging rules)
            //list-item      'list-item block flow'     block box with additional marker box
            //inline list-item  'list-item inline flow'     inline box with additional marker box
            //flex           'block flex'       block-level flex container
            //inline-flex    'inline flex'  inline-level flex container
            //grid           'block grid'   block-level grid container
            //inline-grid    'inline grid'  inline-level grid container
            //ruby           'inline ruby'  inline-level ruby container
            //block ruby     'block ruby'   block box containing ruby container
            //table          'block table'  block-level table wrapper box containing table box
            //inline-table   'inline table'     inline-level table wrapper box containing table box
            //table-cell     'table-cell flow'  table cell block container
            //table-caption  'table-caption flow'   table cell block container
            //ruby-base      'ruby-base flow'   layout-specific internal box
            //ruby-text       'ruby-text flow'  layout-specific internal box
            //other <display-internal>  〃   layout-specific internal box
            switch (cssDisplay)
            {
            default:
                throw new NotSupportedException();

            case CssDisplay.TableColumn:
            case CssDisplay.TableColumnGroup:
            case CssDisplay.TableRow:
            case CssDisplay.TableRowGroup:
            case CssDisplay.TableHeaderGroup:
            case CssDisplay.TableFooterGroup:
            case CssDisplay.None:
                outside = CssDisplayOutside.Internal;
                inside  = CssDisplayInside.Internal;
                break;

            //outside -> inline
            case CssDisplay.Inline:
                outside = CssDisplayOutside.Inline;     //*
                inside  = CssDisplayInside.Flow;
                break;

            case CssDisplay.InlineBlock:
                outside = CssDisplayOutside.Inline;     //*
                inside  = CssDisplayInside.FlowRoot;
                break;

            case CssDisplay.InlineTable:
                outside = CssDisplayOutside.Inline;     //*
                inside  = CssDisplayInside.Table;
                break;

            case CssDisplay.InlineFlex:
                outside = CssDisplayOutside.Inline;     //*
                inside  = CssDisplayInside.Flex;
                break;

            //-------
            //outside -> block
            case CssDisplay.ListItem:
                outside = CssDisplayOutside.Block;
                inside  = CssDisplayInside.Flow;
                break;

            case CssDisplay.Flex:
                outside = CssDisplayOutside.Block;
                inside  = CssDisplayInside.Flex;
                break;

            case CssDisplay.Block:
                outside = CssDisplayOutside.Block;
                inside  = CssDisplayInside.Flow;
                break;

            case CssDisplay.Table:
                outside = CssDisplayOutside.Block;
                inside  = CssDisplayInside.Table;
                break;

            //-----------------
            //special
            case CssDisplay.TableCaption:
                outside = CssDisplayOutside.TableCaption;
                inside  = CssDisplayInside.Flow;
                break;

            case CssDisplay.TableCell:
                outside = CssDisplayOutside.TableCell;
                inside  = CssDisplayInside.Flow;
                break;
            }
        }
        static void TransplateDisplayOutsideInside(CssDisplay cssDisplay, out CssDisplayOutside outside, out CssDisplayInside inside)
        {
            //Short display 	Full display 	Generated box
            //none 	〃 	                        subtree omitted from box tree
            //contents 	〃 	                    element replaced by contents in box tree

            //block 	    'block flow' 	    block-level block container aka block box
            //flow-root 	'block flow-root' 	block-level block container that establishes a new block formatting context (BFC)
            //inline 	    'inline flow' 	    inline box
            //inline-block 	'inline flow-root' 	inline-level block container
            //run-in 	    'run-in flow' 	    run-in box (inline box with special box-tree-munging rules)
            //list-item 	 'list-item block flow' 	block box with additional marker box
            //inline list-item 	'list-item inline flow' 	inline box with additional marker box
            //flex 	         'block flex'       block-level flex container
            //inline-flex 	 'inline flex' 	inline-level flex container
            //grid 	         'block grid' 	block-level grid container
            //inline-grid 	 'inline grid' 	inline-level grid container
            //ruby 	         'inline ruby' 	inline-level ruby container
            //block ruby 	 'block ruby' 	block box containing ruby container
            //table 	     'block table' 	block-level table wrapper box containing table box
            //inline-table 	 'inline table' 	inline-level table wrapper box containing table box
            //table-cell 	 'table-cell flow' 	table cell block container
            //table-caption  'table-caption flow' 	table cell block container
            //ruby-base 	 'ruby-base flow' 	layout-specific internal box
            //ruby-text 	  'ruby-text flow' 	layout-specific internal box
            //other <display-internal> 	〃 	layout-specific internal box
            switch (cssDisplay)
            {
                default:
                    throw new NotSupportedException();
                case CssDisplay.TableColumn:
                case CssDisplay.TableColumnGroup:
                case CssDisplay.TableRow:
                case CssDisplay.TableRowGroup:
                case CssDisplay.TableHeaderGroup:
                case CssDisplay.TableFooterGroup:
                case CssDisplay.None:
                    outside = CssDisplayOutside.Internal;
                    inside = CssDisplayInside.Internal;
                    break;
                //outside -> inline
                case CssDisplay.Inline:
                    outside = CssDisplayOutside.Inline; //*
                    inside = CssDisplayInside.Flow;
                    break;
                case CssDisplay.InlineBlock:
                    outside = CssDisplayOutside.Inline; //*
                    inside = CssDisplayInside.FlowRoot;
                    break;
                case CssDisplay.InlineTable:
                    outside = CssDisplayOutside.Inline; //*
                    inside = CssDisplayInside.Table;
                    break;
                case CssDisplay.InlineFlex:
                    outside = CssDisplayOutside.Inline; //*
                    inside = CssDisplayInside.Flex;
                    break;
                //-------
                //outside -> block
                case CssDisplay.ListItem:
                    outside = CssDisplayOutside.Block;
                    inside = CssDisplayInside.Flow;
                    break;
                case CssDisplay.Flex:
                    outside = CssDisplayOutside.Block;
                    inside = CssDisplayInside.Flex;
                    break;
                case CssDisplay.Block:
                    outside = CssDisplayOutside.Block;
                    inside = CssDisplayInside.Flow;
                    break;
                case CssDisplay.Table:
                    outside = CssDisplayOutside.Block;
                    inside = CssDisplayInside.Table;
                    break;
                //-----------------
                //special
                case CssDisplay.TableCaption:
                    outside = CssDisplayOutside.TableCaption;
                    inside = CssDisplayInside.Flow;
                    break;
                case CssDisplay.TableCell:
                    outside = CssDisplayOutside.TableCell;
                    inside = CssDisplayInside.Flow;
                    break;
            }
        }