OSDN Git Service

Version 0.6.140, fix size detection @IE.
[pettanr/clientJs.git] / 0.6.x / js / 20_ui / 06_AbstractUINode.js
index f3b9c1f..9004773 100644 (file)
@@ -1,6 +1,6 @@
-X.UI._AbstractUINode = X.EventDispatcher.inherits(\r
+X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](\r
        'X.UI._AbstractUINode',\r
-       X.Class.ABSTRACT | X.Class.PRIVATE_DATA,\r
+       X_Class.ABSTRACT | X_Class.PRIVATE_DATA,\r
        {\r
                phase             : 0,\r
                dirty             : X.UI.Dirty.CLEAN,\r
@@ -17,7 +17,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                attrObject        : null,\r
                unverifiedAttrs   : null,\r
                \r
-               role              : null,\r
+               role              : 1,\r
                pointerDisabled   : false,\r
                hoverClassName    : null,\r
                hovering          : false,\r
@@ -30,8 +30,8 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                \r
                boxX              : 0,\r
                boxY              : 0,\r
-               scrollWidth       : 0,\r
-               scrollHeight      : 0,          \r
+               scrollWidth       : 0, // remove?\r
+               scrollHeight      : 0, // remove?\r
                boxWidth          : X.UI.Attr.AUTO,\r
                minBoxWidth       : 0,\r
                maxBoxWidth       : X.UI.Attr.AUTO,     \r
@@ -66,17 +66,17 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                        this.rootData   = rootData;\r
                        this.parent     = parent;\r
                        this.parentData = parentData;\r
-                       //this.xnode      = X.Node.create( 'div' );\r
+                       //this.xnode      = X_Doc_create( 'div' );\r
                        this.phase      = 1;\r
                        \r
-                       this.dispatch( X.UI.Event.INIT );\r
+                       this[ 'dispatch' ]( X.UI.Event.INIT );\r
                },\r
                \r
                addToParent : function( xnodeParent ){\r
-                       xnodeParent && xnodeParent.append( this.xnode );\r
+                       xnodeParent && xnodeParent[ 'append' ]( this.xnode );\r
                        \r
                        this.phase = 2;\r
-                       this.dispatch( X.UI.Event.ADDED );\r
+                       this[ 'dispatch' ]( X.UI.Event.ADDED );\r
                },\r
                \r
                creationComplete : function(){\r
@@ -84,7 +84,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                l, i;\r
                        \r
                        this.phase = 3;\r
-                       this.User.dispatch( X.UI.Event.CREATION_COMPLETE );\r
+                       this.User[ 'dispatch' ]( X.UI.Event.CREATION_COMPLETE );\r
                        \r
                        // html 要素が親に追加されるまで控えていたイベントの登録\r
                        if( events && ( l = events.length ) ){\r
@@ -123,7 +123,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                quartet    = !!( type & X.UI.Attr.Type.QUARTET       ),\r
                                _v, i, l, nodes, root, roots;\r
                \r
-                       if( X.Type.isString( v ) ){\r
+                       if( X_Type_isString( v ) ){\r
                                //v = v.toLowercase();\r
                                if( url || fontName ){\r
                                        // good\r
@@ -133,6 +133,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                } else\r
                                if( list && ( _v = list[ v ] ) ){\r
                                        // good\r
+                                       console.log( v + ' ' + _v );\r
                                        v = _v;\r
                                } else\r
                                if( ( percent || minusPct ) && v.lastIndexOf( '%' ) !== -1 && isFinite( _v = parseFloat( v ) ) && v === _v + '%' ){\r
@@ -144,7 +145,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                if( v.indexOf( ' ' ) !== -1 ){\r
                                        v = v.split( ' ' );\r
                                } else\r
-                               if( color && X.Type.isNumber( _v = X.CSS.parseColor( v ) ) ){\r
+                               if( color && X_Type_isNumber( _v = X_Node_CSS_objToIEFilterText( v ) ) ){\r
                                        v = _v;\r
                                } else {\r
                                        // bad\r
@@ -152,11 +153,11 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                };\r
                        };\r
                        \r
-                       if( ( quartet || combi ) && !X.Type.isArray( v ) ){\r
+                       if( ( quartet || combi ) && !X_Type_isArray( v ) ){\r
                                v = [ v ];\r
                        };\r
                        \r
-                       if( X.Type.isNumber( v ) ){\r
+                       if( X_Type_isNumber( v ) ){\r
                                if( \r
                                    ( length    && ( 0 <= v ) ) ||\r
                                    ( minusLen  && ( v <= 0 ) ) ||\r
@@ -173,10 +174,10 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                        return;\r
                                };\r
                        } else\r
-                       if( X.Type.isBoolean( v ) && !flag ){\r
+                       if( X_Type_isBoolean( v ) && !flag ){\r
                                return;\r
                        } else\r
-                       if( X.Type.isArray( v ) ){\r
+                       if( X_Type_isArray( v ) ){\r
                                if( v.length <= 4 && quartet ){\r
                                        type &= ~X.UI.Attr.Type.QUARTET;\r
                                        switch( v.length ){\r
@@ -216,8 +217,8 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                };\r
 \r
                                if( !X.UI.attrClassProto && user === X.UI.Attr.USER.XNODE && this.xnode ){\r
-                                       this.xnode.css( X.UI.Attr.Rename[ name ] || name, this._createCssText( name ) );\r
-                                       //console.log( ( X.UI.Attr.Rename[ name ] || name ) + ' ' + this._createCssText( name ) + ' ' + propID + ' ' + attrs[ propID ] );\r
+                                       this.xnode[ 'css' ]( X.UI.Attr.Rename[ name ] || name, XUI_AbstractUINode_createCssText( this, name ) );\r
+                                       //console.log( ( X.UI.Attr.Rename[ name ] || name ) + ' ' + XUI_AbstractUINode_createCssText( this, name ) + ' ' + propID + ' ' + attrs[ propID ] );\r
                                };\r
                                return;\r
                        };\r
@@ -245,11 +246,11 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                                break;\r
                                        case X.UI.Attr.Support.width.No :\r
                                                this.autoWidth    = v === X.UI.Attr.AUTO;\r
-                                               this.percentWidth = X.Type.isString( v );\r
+                                               this.percentWidth = X_Type_isString( v );\r
                                                break;\r
                                        case X.UI.Attr.Support.height.No :\r
                                                this.autoHeight    = v === X.UI.Attr.AUTO;\r
-                                               this.percentHeight = X.Type.isString( v );\r
+                                               this.percentHeight = X_Type_isString( v );\r
                                                break;\r
                                };\r
                                \r
@@ -260,87 +261,15 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                        attrs[ propID ] = v;\r
                                };\r
                                \r
+                               if( name && user === X.UI.Attr.USER.UINODE ){\r
+                                       this[ name ] = v;\r
+                               };\r
+                               \r
                                if( name && user === X.UI.Attr.USER.XNODE && this.xnode ){\r
-                                       this.xnode.css( X.UI.Attr.Rename[ name ] || name, this._createCssText( name ) );\r
-                                       //console.log( ( X.UI.Attr.Rename[ name ] || name ) + ' ' + this._createCssText( name ) + ' ' + propID + ' ' + attrs[ propID ] );\r
+                                       this.xnode[ 'css' ]( X.UI.Attr.Rename[ name ] || name, XUI_AbstractUINode_createCssText( this, name ) );\r
+                                       //console.log( ( X.UI.Attr.Rename[ name ] || name ) + ' ' + XUI_AbstractUINode_createCssText( this, name ) + ' ' + propID + ' ' + attrs[ propID ] );\r
                                } else\r
-                               if( this.dirty < dirty ) this.dirty = dirty;                                                    \r
-                       };\r
-               },\r
-\r
-               _createCssText : function( name ){\r
-                       var attrs      = this.attrObject || this.attrClass.prototype || X.UI.AttrClass,\r
-                               def        = this.supportAttrs[ name ],\r
-                               no         = def.No,\r
-                               v          = attrs[ def.No ],\r
-                               type       = def[ 3 ],\r
-                               list       = def[ 4 ],\r
-                               flag       = !!( type & X.UI.Attr.Type.BOOLEAN ),\r
-                               combi      = !!( type & X.UI.Attr.Type.COMBI   ),\r
-                               quartet    = !!( type & X.UI.Attr.Type.QUARTET );\r
-\r
-                       if( quartet ){\r
-                               if( attrs[ no + 1 ] === attrs[ no + 3 ] ){\r
-                                       if( v === attrs[ no + 2 ] ){\r
-                                               if( v === attrs[ no + 1 ] ){\r
-                                                       return this._createCssValue( v, type, list );\r
-                                               };\r
-                                               return [\r
-                                                       this._createCssValue( v, type, list ),\r
-                                                       this._createCssValue( attrs[ no + 1 ], type, list )\r
-                                               ].join( ' ' );\r
-                                       };\r
-                                       return [\r
-                                               this._createCssValue( v, type, list ),\r
-                                               this._createCssValue( attrs[ no + 1 ], type, list ),\r
-                                               this._createCssValue( attrs[ no + 2 ], type, list )\r
-                                       ].join( ' ' );\r
-                               };\r
-                               return [\r
-                                       this._createCssValue( v, type, list ),\r
-                                       this._createCssValue( attrs[ no + 1 ], type, list ),\r
-                                       this._createCssValue( attrs[ no + 2 ], type, list ),\r
-                                       this._createCssValue( attrs[ no + 3 ], type, list )\r
-                               ].join( ' ' );\r
-                       } else\r
-                       if( combi ){\r
-                               return [\r
-                                       this._createCssValue( v, type, list ),\r
-                                       this._createCssValue( attrs[ no + 1 ], type, list )\r
-                               ].join( ' ' );\r
-                       } else\r
-                       if( flag ){\r
-                               return v ? list : 'normal'; // \r
-                       };\r
-                       return this._createCssValue( v, type, list );\r
-               },\r
-\r
-               _createCssValue : function( v, type, list ){\r
-                       var length     = !!( type & X.UI.Attr.Type.LENGTH        ),\r
-                               minusLen   = !!( type & X.UI.Attr.Type.MINUS_LENGTH  ),\r
-                               percent    = !!( type & X.UI.Attr.Type.PERCENT       ),\r
-                               minusPct   = !!( type & X.UI.Attr.Type.MINUS_PERCENT ),\r
-                               numerical  = !!( type & X.UI.Attr.Type.NUMERICAL     ),\r
-                               auto       = !!( type & X.UI.Attr.Type.AUTO          ),\r
-                               color      = !!( type & X.UI.Attr.Type.COLOR         ),\r
-                               url        = !!( type & X.UI.Attr.Type.URL           ),\r
-                               fontName   = !!( type & X.UI.Attr.Type.FONT_NAME     );\r
-                       \r
-                       if( X.Type.isNumber( v ) ){\r
-                               if( auto && v === X.UI.Attr.AUTO ) return 'auto';\r
-                               if( length || minusLen ) return v + 'em';\r
-                               if( numerical ) return v;\r
-                               if( list && list[ v ] ) return list[ v ];\r
-                               if( color ){\r
-                                       if( v < 0x100000 ){\r
-                                               v = '00000' + v.toString( 16 );\r
-                                               return '#' + v.substr( v.length - 6 );\r
-                                       };\r
-                                       return '#' + v.toString( 16 );\r
-                               };\r
-                       };\r
-                       if( X.Type.isString( v ) ){\r
-                               if( percent || minusPct || url || fontName ) return v;\r
+                               if( this.dirty < dirty ) this.dirty = dirty;\r
                        };\r
                },\r
 \r
@@ -368,8 +297,8 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                        list = support[ 4 ];\r
                        if( list ) return list[ v ];\r
                        \r
-                       if( type & X.UI.Attr.Type.COLOR && X.Type.isNumber( v ) ) return v;\r
-                       if( !( type & X.UI.Attr.Type.NUMERICAL ) && X.Type.isNumber( v ) ) return v + 'em';\r
+                       if( type & X.UI.Attr.Type.COLOR && X_Type_isNumber( v ) ) return v;\r
+                       if( !( type & X.UI.Attr.Type.NUMERICAL ) && X_Type_isNumber( v ) ) return v + 'em';\r
                        return v;\r
                },\r
                \r
@@ -386,7 +315,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                case 2:\r
                                        \r
                                case 1:\r
-                                       this.xnode.destroy();\r
+                                       this.xnode[ 'kill' ]();\r
                                \r
                                        delete this.root;\r
                                        delete this.rootData;\r
@@ -418,12 +347,12 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                        this.boxX = x;\r
                        this.boxY = y;\r
                        this.xnode\r
-                               .css( 'left',        x ? x + 'em' : 0 )\r
-                               .css( 'top',         y ? y + 'em' : 0 )\r
-                               .css( 'width',       this.contentWidth  ? X.UI._AbstractUINode.ceil( this.contentWidth  )  + 'em' : 0 )\r
-                               .css( 'height',      this.contentHeight ? X.UI._AbstractUINode.ceil( this.contentHeight ) + 'em' : 0 )\r
-                               .css( 'padding',     this._createCssText( 'padding' ) )\r
-                               .css( 'borderWidth', this._createCssText( 'borderWidth' ) );\r
+                               [ 'css' ]( 'left',        x ? x + 'em' : 0 )\r
+                               [ 'css' ]( 'top',         y ? y + 'em' : 0 )\r
+                               [ 'css' ]( 'width',       this.contentWidth  ? XUI_AbstractUINode_ceil( this.contentWidth  ) + 'em' : 0 )\r
+                               [ 'css' ]( 'height',      this.contentHeight ? XUI_AbstractUINode_ceil( this.contentHeight ) + 'em' : 0 )\r
+                               [ 'css' ]( 'padding',     XUI_AbstractUINode_createCssText( this, 'padding' ) )\r
+                               [ 'css' ]( 'borderWidth', XUI_AbstractUINode_createCssText( this, 'borderWidth' ) );\r
                },\r
 \r
                /*\r
@@ -431,7 +360,6 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                 */\r
                preMesure : function( allowedW, allowedH ){\r
                        var attrs = this.attrObject || this.attrClass.prototype || X.UI.AttrClass,\r
-                               calc  = X.UI._AbstractUINode.calcValue,\r
                                box   = attrs[ X.UI.Attr.Support.sizing.No ],\r
                                min, max,\r
                                boxL, boxT, boxR, boxB,\r
@@ -443,10 +371,10 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                        // 自身が constraintW の場合 親が AUTO ではない\r
                        // 自身が constraintW でない場合自身が  AUTO はなくかつ親 が AUTO の場合 or 自身は % でない\r
                        \r
-                       paddingR = calc( attrs[ X.UI.Attr.Support.padding.No + 1 ], allowedW );\r
-                       paddingL = calc( attrs[ X.UI.Attr.Support.padding.No + 3 ], allowedW );\r
-                       borderR  = calc( attrs[ X.UI.Attr.Support.borderWidth.No + 1 ], allowedW );\r
-                       borderL  = calc( attrs[ X.UI.Attr.Support.borderWidth.No + 3 ], allowedW );\r
+                       paddingR = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 1 ], allowedW );\r
+                       paddingL = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 3 ], allowedW );\r
+                       borderR  = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No + 1 ], allowedW );\r
+                       borderL  = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No + 3 ], allowedW );\r
                        boxMinus = 0;\r
                        switch( box ){\r
                                case 3 : // border-box\r
@@ -460,12 +388,12 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                        \r
                        if( this.constraintW ? allowedW !== X.UI.Attr.AUTO : !this.autoWidth && ( allowedW !== X.UI.Attr.AUTO || !this.percentWidth ) ){\r
                                if( this.constraintW ){ // 制約レイアウト\r
-                                       contentW = allowedW - ( boxL = calc( attrs[ X.UI.Attr.Support.left.No ], allowedW ) ) - ( boxR = calc( attrs[ X.UI.Attr.Support.right.No ], allowedW ) );\r
+                                       contentW = allowedW - ( boxL = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.left.No ], allowedW ) ) - ( boxR = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.right.No ], allowedW ) );\r
                                } else {\r
-                                       contentW = X.UI._AbstractUINode.finalValue( attrs[ X.UI.Attr.Support.width.No ], attrs[ X.UI.Attr.Support.minWidth.No ], attrs[ X.UI.Attr.Support.maxWidth.No ], allowedW );                                    \r
+                                       contentW = XUI_AbstractUINode_calcFinalValue( attrs[ X.UI.Attr.Support.width.No ], attrs[ X.UI.Attr.Support.minWidth.No ], attrs[ X.UI.Attr.Support.maxWidth.No ], allowedW );                                  \r
                                };\r
                                this.contentWidth = contentW + boxMinus;\r
-                               this.scrollWidth  = this.contentWidth + this.contentL + this.contentR;\r
+                               //this.scrollWidth  = this.contentWidth + this.contentL + this.contentR;\r
                                this.boxWidth     = contentW - boxMinus + this.contentL + this.contentR;\r
                                this.boxSizingOffsetLR = boxMinus;\r
                                delete this.minContentWidth;\r
@@ -473,9 +401,9 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                delete this.minBoxWidth;\r
                                delete this.maxBoxWidth;\r
                        } else {        \r
-                               this.minContentWidth = calc( attrs[ X.UI.Attr.Support.minWidth.No ], allowedW ) + boxMinus;\r
-                               this.maxContentWidth = calc( attrs[ X.UI.Attr.Support.maxWidth.No ], allowedW ) + boxMinus;\r
-                               this.scrollWidth     = this.contentWidth + this.contentL + this.contentR;\r
+                               this.minContentWidth = XUI_AbstractUINode_ceil( XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.minWidth.No ], allowedW ) + boxMinus );\r
+                               this.maxContentWidth = XUI_AbstractUINode_ceil( XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.maxWidth.No ], allowedW ) + boxMinus );\r
+                               //this.scrollWidth     = this.contentWidth + this.contentL + this.contentR;\r
                                this.minBoxWidth     = this.minContentWidth - boxMinus + this.contentL + this.contentR;\r
                                this.maxBoxWidth     = this.maxContentWidth - boxMinus + this.contentL + this.contentR;\r
                                //delete this.contentWidth;\r
@@ -484,10 +412,10 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                //delete this.boxSizingOffsetLR;\r
                        };\r
                        \r
-                       paddingT  = calc( attrs[ X.UI.Attr.Support.padding.No + 0 ], allowedH );// paddingTRBL の % 指定は 最大幅に対して TB でも幅に対して\r
-                       paddingB  = calc( attrs[ X.UI.Attr.Support.padding.No + 2 ], allowedH );\r
-                       borderT   = calc( attrs[ X.UI.Attr.Support.borderWidth.No  + 0 ], allowedH );\r
-                       borderB   = calc( attrs[ X.UI.Attr.Support.borderWidth.No  + 2 ], allowedH );\r
+                       paddingT  = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 0 ], allowedH );// paddingTRBL の % 指定は 最大幅に対して TB でも幅に対して\r
+                       paddingB  = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 2 ], allowedH );\r
+                       borderT   = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No  + 0 ], allowedH );\r
+                       borderB   = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No  + 2 ], allowedH );\r
                        boxMinus = 0;\r
                        switch( box ){\r
                                case 3 : // border-box\r
@@ -502,12 +430,12 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                        // Height\r
                        if( this.constraintH ? allowedH !== X.UI.Attr.AUTO : !this.autoHeight && ( allowedH !== X.UI.Attr.AUTO || !this.percentHeight ) ){\r
                                if( this.constraintH ){ // 制約レイアウト\r
-                                       contentH = allowedH - ( boxT = calc( attrs[ X.UI.Attr.Support.top.No ], allowedH ) ) - ( boxB = calc( attrs[ X.UI.Attr.Support.bottom.No ], allowedH ) );\r
+                                       contentH = allowedH - ( boxT = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.top.No ], allowedH ) ) - ( boxB = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.bottom.No ], allowedH ) );\r
                                } else {\r
-                                       contentH = X.UI._AbstractUINode.finalValue( attrs[ X.UI.Attr.Support.height.No ], attrs[ X.UI.Attr.Support.minHeight.No ], attrs[ X.UI.Attr.Support.maxHeight.No ], allowedH );\r
+                                       contentH = XUI_AbstractUINode_calcFinalValue( attrs[ X.UI.Attr.Support.height.No ], attrs[ X.UI.Attr.Support.minHeight.No ], attrs[ X.UI.Attr.Support.maxHeight.No ], allowedH );\r
                                };                      \r
                                this.contentHeight = contentH + boxMinus;\r
-                               this.scrollHeight  = this.contentHeight + this.contentT + this.contentB;\r
+                               //this.scrollHeight  = this.contentHeight + this.contentT + this.contentB;\r
                                this.boxHeight     = contentH - boxMinus + this.contentT + this.contentB; // padding-box の場合 border だけ足される\r
                                this.boxSizingOffsetTB = boxMinus;\r
                                delete this.minContentHeight;\r
@@ -515,8 +443,8 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                delete this.minBoxHeight;\r
                                delete this.maxBoxHeight;\r
                        } else {\r
-                               this.minContentHeight = calc( attrs[ X.UI.Attr.Support.minHeight.No ], allowedH ) + boxMinus;\r
-                               this.maxContentHeight = calc( attrs[ X.UI.Attr.Support.maxHeight.No ], allowedH ) + boxMinus;                           \r
+                               this.minContentHeight = XUI_AbstractUINode_ceil( XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.minHeight.No ], allowedH ) + boxMinus );\r
+                               this.maxContentHeight = XUI_AbstractUINode_ceil( XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.maxHeight.No ], allowedH ) + boxMinus );                                \r
                                this.minBoxHeight = this.minContentHeight - boxMinus + this.contentT + this.contentB;\r
                                this.maxBoxHeight = this.maxContentHeight - boxMinus + this.contentT + this.contentB;\r
                \r
@@ -528,12 +456,12 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                        \r
                        if( this.parentData && this.parentData.layout.overrideAttrsForChild.left ){\r
                                if( this.constraintW ){\r
-                                       this.boxX = ( boxL || boxL === 0 ) ? boxL : calc( attrs[ X.UI.Attr.Support.left.No ], allowedW );\r
+                                       this.boxX = ( boxL || boxL === 0 ) ? boxL : XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.left.No ], allowedW );\r
                                } else\r
                                if( attrs[ X.UI.Attr.Support.right.No ] === null ){\r
-                                       this.boxX = ( boxL || boxL === 0 ) ? boxL : calc( attrs[ X.UI.Attr.Support.left.No ], allowedW );\r
+                                       this.boxX = ( boxL || boxL === 0 ) ? boxL : XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.left.No ], allowedW );\r
                                } else {\r
-                                       this.boxX = alllowW - this.boxWidth - ( ( boxR || boxR === 0 ) ? boxR : calc( attrs[ X.UI.Attr.Support.right.No ], allowedW ) );\r
+                                       this.boxX = alllowW - this.boxWidth - ( ( boxR || boxR === 0 ) ? boxR : XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.right.No ], allowedW ) );\r
                                };\r
                        } else {\r
                                delete this.boxX;\r
@@ -541,12 +469,12 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                        \r
                        if( this.parentData && this.parentData.layout.overrideAttrsForChild.top ){\r
                                if( this.constraintH ){\r
-                                       this.boxY = ( boxT || boxT === 0 ) ? boxT : calc( attrs[ X.UI.Attr.Support.top.No ], allowedH );\r
+                                       this.boxY = ( boxT || boxT === 0 ) ? boxT : XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.top.No ], allowedH );\r
                                } else\r
                                if( attrs[ X.UI.Attr.Support.bottom.No ] === null ){\r
-                                       this.boxY = ( boxT || boxT === 0 ) ? boxT : calc( attrs[ X.UI.Attr.Support.top.No ], allowedH );\r
+                                       this.boxY = ( boxT || boxT === 0 ) ? boxT : XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.top.No ], allowedH );\r
                                } else {\r
-                                       this.boxY = allowedH - this.boxHeight - ( ( boxB || boxB === 0 ) ? boxB : calc( attrs[ X.UI.Attr.Support.bottom.No ], allowedH ) );\r
+                                       this.boxY = allowedH - this.boxHeight - ( ( boxB || boxB === 0 ) ? boxB : XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.bottom.No ], allowedH ) );\r
                                };\r
                        } else {\r
                                delete this.boxY;\r
@@ -599,60 +527,63 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                         *     コンテンツの高さの再取得が必要\r
                                         *     必要でない\r
                                         */\r
-                                       if( xnode._xnodes && xnode._xnodes.length ){\r
+                                       if( xnode[ '_xnodes' ] && xnode[ '_xnodes' ].length ){\r
                                                if( w === X.UI.Attr.AUTO ){\r
-                                                       w = this.contentWidth = xnode.css( 'width', 'auto' ).width() / X_Node_CSS_getCharSize( xnode );\r
+                                                       w = this.contentWidth = XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'width', 'auto' )[ 'width' ]() / X_Node_CSS_getCharSize( xnode ) );\r
+                                                       console.log( 'chr ' + X_Node_CSS_getCharSize( xnode ) );\r
                                                        \r
-                                                       this.scrollWidth = w + this.contentL + this.contentR;\r
+                                                       //this.scrollWidth = w + this.contentL + this.contentR;\r
                                                        if( this.maxContentWidth < w - this.boxSizingOffsetLR ) this.contentWidth = this.maxContentWidth + this.boxSizingOffsetLR;\r
                                                        if( w - this.boxSizingOffsetLR < this.minContentWidth ) this.contentWidth = this.minContentWidth + this.boxSizingOffsetLR;\r
                                                        this.lastContentWidth = this.contentWidth;\r
                                                        \r
-                                                       w !== this.contentWidth && xnode.css( 'width', X.UI._AbstractUINode.ceil( this.contentWidth ) + 'em' );\r
+                                                       w !== this.contentWidth && xnode[ 'css' ]( 'width', this.contentWidth + 'em' );\r
                                                        \r
                                                        if( h === X.UI.Attr.AUTO ){\r
-                                                               this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode ); // scrollHeight() ??\r
-                                                               this.scrollHeight  = h + this.contentT + this.contentB;\r
+                                                               this.contentHeight = h = XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'height', 'auto' )[ 'scrollHeight' ]() / X_Node_CSS_getCharSize( xnode ) ); // scrollHeight() ??\r
+                                                               //this.scrollHeight  = h + this.contentT + this.contentB;\r
                                                                if( this.maxContentHeight < h - this.boxSizingOffsetTB ) this.contentHeight = this.maxContentHeight + this.boxSizingOffsetTB;\r
                                                                if( h - this.boxSizingOffsetTB < this.minContentHeight ) this.contentHeight = this.minContentHeight + this.boxSizingOffsetTB;\r
                                                        } else {\r
-                                                               this.scrollHeight = h + this.contentT + this.contentB;\r
+                                                               //this.scrollHeight = h + this.contentT + this.contentB;\r
                                                        };\r
                                                        \r
                                                        this.lastContentHeight = h;\r
                                                } else\r
                                                if( h === X.UI.Attr.AUTO ){\r
+                                                       console.log( 'chr ' + X_Node_CSS_getCharSize( xnode ) );\r
                                                        if( w !== this.lastContentWidth ){\r
-                                                               xnode.css( 'width', X.UI._AbstractUINode.ceil( w ) + 'em' );\r
+                                                               xnode[ 'css' ]( 'width', w + 'em' );\r
                                                                \r
                                                                this.lastContentWidth  = w;\r
-                                                               this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode );\r
-                                                               this.scrollWidth       = w + this.contentL + this.contentR;\r
-                                                               this.scrollHeight      = h + this.contentT + this.contentB;\r
+                                                               this.contentHeight = h = XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'height', 'auto' )[ 'scrollHeight' ]() / X_Node_CSS_getCharSize( xnode ) ); // ie8 clientHeight, ff scrollHeight & clientHeight\r
+                                                               //this.scrollWidth       = w + this.contentL + this.contentR;\r
+                                                               //this.scrollHeight      = h + this.contentT + this.contentB;\r
                                                                if( this.maxContentHeight < h - this.boxSizingOffsetTB ) this.contentHeight = this.maxContentHeight + this.boxSizingOffsetTB;\r
                                                                if( h - this.boxSizingOffsetTB < this.minContentHeight ) this.contentHeight = this.minContentHeight + this.boxSizingOffsetTB;                                                           \r
                                                        } else {\r
                                                                this.contentHeight = this.lastContentHeight = h =\r
-                                                                       this.lastContentHeight === -1 ? xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode ) : this.lastContentHeight;\r
-                                                               this.scrollWidth   = w + this.contentL + this.contentR;\r
-                                                               this.scrollHeight  = h + this.contentT + this.contentB;\r
+                                                                       this.lastContentHeight === -1 ? XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'height', 'auto' )[ 'scrollHeight' ]() / X_Node_CSS_getCharSize( xnode ) ) : this.lastContentHeight;\r
+                                                               //this.scrollWidth   = w + this.contentL + this.contentR;\r
+                                                               //this.scrollHeight  = h + this.contentT + this.contentB;\r
                                                        };\r
                                                } else\r
                                                if( dirty !== X.UI.Dirty.LAYOUT ){\r
-                                                       this.contentWidth  = this.lastContentWidth  = w; //xnode.width();\r
-                                                       this.contentHeight = this.lastContentHeight = xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode );\r
-                                                       this.scrollWidth   = this.contentWidth  + this.contentL + this.contentR;\r
-                                                       this.scrollHeight  = this.contentHeight + this.contentT + this.contentB;\r
+                                                       console.log( 'chr ' + X_Node_CSS_getCharSize( xnode ) );\r
+                                                       this.contentWidth  = this.lastContentWidth  = w;\r
+                                                       this.contentHeight = this.lastContentHeight = XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'height', 'auto' )[ 'scrollHeight' ]() / X_Node_CSS_getCharSize( xnode ) );\r
+                                                       //this.scrollWidth   = this.contentWidth  + this.contentL + this.contentR;\r
+                                                       //this.scrollHeight  = this.contentHeight + this.contentT + this.contentB;\r
                                                } else {\r
-                                                       this.scrollWidth  = w + this.contentL + this.contentR;\r
-                                                       this.scrollHeight = h + this.contentT + this.contentB;\r
+                                                       //this.scrollWidth  = w + this.contentL + this.contentR;\r
+                                                       //this.scrollHeight = h + this.contentT + this.contentB;\r
                                                };              \r
                                        } else {\r
                                                // コンテンツを持たないため基本のサイズは0\r
                                                if( w === X.UI.Attr.AUTO ) this.contentWidth  = w = 0 < this.minContentWidth  ? this.minContentWidth  : 0;\r
                                                if( h === X.UI.Attr.AUTO ) this.contentHeight = h = 0 < this.minContentHeight ? this.minContentHeight : 0;\r
-                                               this.scrollWidth  = w + this.contentL + this.contentR;\r
-                                               this.scrollHeight = h + this.contentT + this.contentB;\r
+                                               //this.scrollWidth  = w + this.contentL + this.contentR;\r
+                                               //this.scrollHeight = h + this.contentT + this.contentB;\r
                                        };\r
                                        \r
                                        delete this.dirty;\r
@@ -666,7 +597,6 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                 */\r
                postMesure : function(){\r
                        var     attrs = this.attrObject || this.attrClass.prototype || X.UI.AttrClass,\r
-                               calc  = X.UI._AbstractUINode.calcValue,\r
                                box   = attrs[ X.UI.Attr.Support.sizing.No ],\r
                                contentW, contentH,\r
                                contentPlus,\r
@@ -677,10 +607,10 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                        // Width\r
                        if( this.boxWidth === X.UI.Attr.AUTO ){\r
                                contentW = this.contentWidth;\r
-                               paddingR = calc( attrs[ X.UI.Attr.Support.padding.No + 1 ], contentW );                                 \r
-                               paddingL = calc( attrs[ X.UI.Attr.Support.padding.No + 3 ], contentW );                                 \r
-                               borderR  = calc( attrs[ X.UI.Attr.Support.borderWidth.No + 1 ], contentW );\r
-                               borderL  = calc( attrs[ X.UI.Attr.Support.borderWidth.No + 3 ], contentW );\r
+                               paddingR = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 1 ], contentW );                                 \r
+                               paddingL = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 3 ], contentW );                                 \r
+                               borderR  = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No + 1 ], contentW );\r
+                               borderL  = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No + 3 ], contentW );\r
                                contentPlus = 0;\r
                                switch( box ){\r
                                        case 3 : // border-box\r
@@ -692,8 +622,8 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                \r
                                if( !this.constraintW ){\r
                                        contentW += contentPlus;\r
-                                       min = calc( attrs[ X.UI.Attr.Support.minWidth.No ], contentW );\r
-                                       max = calc( attrs[ X.UI.Attr.Support.maxWidth.No ], contentW );\r
+                                       min = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.minWidth.No ], contentW );\r
+                                       max = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.maxWidth.No ], contentW );\r
                                        if( contentW < min && contentPlus < min ){\r
                                                this.contentWidth = min - contentPlus;\r
                                        } else\r
@@ -708,10 +638,10 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                        // Height\r
                        if( this.boxHeight === X.UI.Attr.AUTO ){\r
                                contentH    = this.contentHeight;\r
-                               paddingT    = calc( attrs[ X.UI.Attr.Support.padding.No + 0 ], contentH );// paddingTRBL の % 指定は 最大幅に対して TB でも幅に対して\r
-                               paddingB    = calc( attrs[ X.UI.Attr.Support.padding.No + 2 ], contentH );\r
-                               borderT     = calc( attrs[ X.UI.Attr.Support.borderWidth.No  + 0 ], contentH );\r
-                               borderB     = calc( attrs[ X.UI.Attr.Support.borderWidth.No  + 2 ], contentH );\r
+                               paddingT    = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 0 ], contentH );// paddingTRBL の % 指定は 最大幅に対して TB でも幅に対して\r
+                               paddingB    = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 2 ], contentH );\r
+                               borderT     = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No  + 0 ], contentH );\r
+                               borderB     = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No  + 2 ], contentH );\r
                                contentPlus = 0;\r
                                switch( box ){\r
                                        case 3 : // border-box\r
@@ -722,8 +652,8 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                };\r
                                if( !this.constraintH ){\r
                                        contentH += contentPlus;\r
-                                       min = calc( attrs[ X.UI.Attr.Support.minHeight.No ], contentH );\r
-                                       max = calc( attrs[ X.UI.Attr.Support.maxHeight.No ], contentH );\r
+                                       min = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.minHeight.No ], contentH );\r
+                                       max = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.maxHeight.No ], contentH );\r
                                        if( contentH < min && contentPlus < min ){\r
                                                this.contentHeight = min - contentPlus;\r
                                        } else\r
@@ -750,7 +680,9 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                        };\r
                },\r
                \r
-               \r
+               /*\r
+                * context を明示しない場合、User が context になる!\r
+                */\r
                listen : function( type, arg1, arg2, arg3 ){\r
                        var root, events, counter, f;\r
                        if( X.UI.Event._START_POINTER <= type && type <= X.UI.Event._END_POINTER ){\r
@@ -763,7 +695,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                        if( !this.gesture ){\r
                                                this.gesture = new X.UI.Gesture( this.rootData, this, type );\r
                                        } else {\r
-                                               this.gesture.listen( type );\r
+                                               this.gesture[ 'listen' ]( type );\r
                                        };\r
                                } else {\r
                                        //console.log( type );\r
@@ -773,16 +705,16 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                                ++counter[ type ];\r
                                        } else {\r
                                                counter[ type ] = 1;                            \r
-                                               root.xnodeInteractiveLayer.listen( X.UI.Event.IdToName[ type ], X.UI._eventRellay );\r
+                                               root.xnodeInteractiveLayer[ 'listen' ]( X.UI.Event.IdToName[ type ], X_UI_eventRellay );\r
                                        };\r
                                };\r
                        };\r
-                       f = X_Callback_classifyCallbackArgs( arg1, arg2, arg3 );\r
-                       if( !f.k ){\r
+                       arg1 && arg1.kind ? ( f = arg1 ) : ( f = X_Callback_classifyCallbackArgs( arg1, arg2, arg3 ) );\r
+                       if( !f.kind ){\r
                                return X_EventDispatcher_listen.call( this, type, this.User, f );\r
                        } else\r
-                       if( f.k === X_Callback_FUNC_ONLY ){\r
-                               return X_EventDispatcher_listen.call( this, type, this.User, f.f, f.s );\r
+                       if( f.kind === X_Callback_FUNC_ONLY ){\r
+                               return X_EventDispatcher_listen.call( this, type, this.User, f.func, f.supplement );\r
                        };\r
                        return X_EventDispatcher_listen.apply( this, arguments );\r
                },\r
@@ -802,75 +734,150 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                };\r
 \r
                                if( X.UI.Event._START_XUI_EVENT < type && type < X.UI.Event._END_XUI_EVENT ){\r
-                                       this.gesture && this.gesture.unlisten( type );\r
+                                       this.gesture && this.gesture[ 'unlisten' ]( type );\r
                                } else {\r
                                        root    = this.rootData;\r
                                        counter = root.eventCounter;\r
                                        if( !counter[ type ] ) return this;\r
                                        --counter[ type ];\r
                                        if( counter[ type ] === 0 ){\r
-                                               root.xnodeInteractiveLayer.unlisten( X.UI.Event.IdToName[ type ], X.UI._eventRellay );\r
+                                               root.xnodeInteractiveLayer[ 'unlisten' ]( X.UI.Event.IdToName[ type ], X_UI_eventRellay );\r
                                                delete counter[ type ];\r
                                        };\r
                                };\r
                        };\r
-                       f = X_Callback_classifyCallbackArgs( arg1, arg2, arg3 );\r
-                       if( !f.k ){\r
-                               return X.EventDispatcher.prototype.unlisten.apply( this, [ type, this.User, f ] );\r
+                       arg1 && arg1.kind ? ( f = arg1 ) : ( f = X_Callback_classifyCallbackArgs( arg1, arg2, arg3 ) );\r
+                       if( !f.kind ){\r
+                               return X_EventDispatcher_unlisten.apply( this, [ type, this.User, f ] );\r
                        } else\r
-                       if( f.k === X_Callback_FUNC_ONLY ){\r
-                               return X.EventDispatcher.prototype.unlisten.apply( this, [ type, this.User, f.f, f.s ] );\r
+                       if( f.kind === X_Callback_FUNC_ONLY ){\r
+                               return X_EventDispatcher_unlisten.apply( this, [ type, this.User, f.func, f.supplement ] );\r
                        };\r
-                       return X.EventDispatcher.prototype.unlisten.apply( this, arguments );\r
+                       return X_EventDispatcher_unlisten.apply( this, arguments );\r
                },\r
                \r
                dispatch : function( e ){\r
-                       //console.log( e.type + ' ' + ( this._listeners && this._listeners[ e.type ] ) );\r
+                       //console.log( e.type + ' ' + ( this[ '_listeners' ] && this[ '_listeners' ][ e.type ] ) );\r
                        var xve  = X.UI.Event,\r
                                ret  = X_EventDispatcher_dispatch.call( this, e ),\r
                                type = e.type || e;\r
                        \r
                        // TODO captureEvent PointerEvent\r
-                       if( ret & X.Callback.MONOPOLY && !this.hitChildData && ( xve._POINTER_MOVE === type || xve._MOUSE_MOVE === type || xve.FILE_DRAG === type ) ){\r
+                       if( ret & X_Callback_MONOPOLY && !this.hitChildData && ( xve._POINTER_MOVE === type || xve._MOUSE_MOVE === type || xve.FILE_DRAG === type ) ){\r
                                this.rootData.monopolyNodeData = this;\r
                                return ret;\r
                        };\r
                        this.rootData.monopolyNodeData = null;\r
-                       if( xve._START_BUBLEUP < type && this.parentData && !( ret & X.Callback.STOP_PROPAGATION ) && !( ret & X.Callback.STOP_NOW ) ) return this.parentData.dispatch( e );\r
+                       if( xve._START_BUBLEUP < type && this.parentData && !( ret & X_Callback_STOP_PROPAGATION ) && !( ret & X_Callback_STOP_NOW ) ) return this.parentData[ 'dispatch' ]( e );\r
                        return ret;\r
                }\r
                \r
        }\r
 );\r
 \r
-X.UI._AbstractUINode.calcValue = function( styleValue, srcValue ){\r
+function XUI_AbstractUINode_createCssText( that, name ){\r
+       var attrs      = that.attrObject || that.attrClass.prototype || X.UI.AttrClass,\r
+               def        = that.supportAttrs[ name ],\r
+               no         = def.No,\r
+               v          = attrs[ def.No ],\r
+               type       = def[ 3 ],\r
+               list       = def[ 4 ],\r
+               flag       = !!( type & X.UI.Attr.Type.BOOLEAN ),\r
+               combi      = !!( type & X.UI.Attr.Type.COMBI   ),\r
+               quartet    = !!( type & X.UI.Attr.Type.QUARTET );\r
+\r
+       if( quartet ){\r
+               if( attrs[ no + 1 ] === attrs[ no + 3 ] ){\r
+                       if( v === attrs[ no + 2 ] ){\r
+                               if( v === attrs[ no + 1 ] ){\r
+                                       return XUI_AbstractUINode_createCssValue( v, type, list );\r
+                               };\r
+                               return [\r
+                                       XUI_AbstractUINode_createCssValue( v, type, list ),\r
+                                       XUI_AbstractUINode_createCssValue( attrs[ no + 1 ], type, list )\r
+                               ].join( ' ' );\r
+                       };\r
+                       return [\r
+                               XUI_AbstractUINode_createCssValue( v, type, list ),\r
+                               XUI_AbstractUINode_createCssValue( attrs[ no + 1 ], type, list ),\r
+                               XUI_AbstractUINode_createCssValue( attrs[ no + 2 ], type, list )\r
+                       ].join( ' ' );\r
+               };\r
+               return [\r
+                       XUI_AbstractUINode_createCssValue( v, type, list ),\r
+                       XUI_AbstractUINode_createCssValue( attrs[ no + 1 ], type, list ),\r
+                       XUI_AbstractUINode_createCssValue( attrs[ no + 2 ], type, list ),\r
+                       XUI_AbstractUINode_createCssValue( attrs[ no + 3 ], type, list )\r
+               ].join( ' ' );\r
+       } else\r
+       if( combi ){\r
+               return [\r
+                       XUI_AbstractUINode_createCssValue( v, type, list ),\r
+                       XUI_AbstractUINode_createCssValue( attrs[ no + 1 ], type, list )\r
+               ].join( ' ' );\r
+       } else\r
+       if( flag ){\r
+               return v ? list : 'normal'; // \r
+       };\r
+       return XUI_AbstractUINode_createCssValue( v, type, list );\r
+};\r
+\r
+function XUI_AbstractUINode_createCssValue( v, type, list ){\r
+       var length     = !!( type & X.UI.Attr.Type.LENGTH        ),\r
+               minusLen   = !!( type & X.UI.Attr.Type.MINUS_LENGTH  ),\r
+               percent    = !!( type & X.UI.Attr.Type.PERCENT       ),\r
+               minusPct   = !!( type & X.UI.Attr.Type.MINUS_PERCENT ),\r
+               numerical  = !!( type & X.UI.Attr.Type.NUMERICAL     ),\r
+               auto       = !!( type & X.UI.Attr.Type.AUTO          ),\r
+               color      = !!( type & X.UI.Attr.Type.COLOR         ),\r
+               url        = !!( type & X.UI.Attr.Type.URL           ),\r
+               fontName   = !!( type & X.UI.Attr.Type.FONT_NAME     );\r
+       \r
+       if( X_Type_isNumber( v ) ){\r
+               if( auto && v === X.UI.Attr.AUTO ) return 'auto';\r
+               if( length || minusLen ) return v + 'em';\r
+               if( numerical ) return v;\r
+               if( list && list[ v ] ) return list[ v ];\r
+               if( color ){\r
+                       if( v < 0x100000 ){\r
+                               v = '00000' + v.toString( 16 );\r
+                               return '#' + v.substr( v.length - 6 );\r
+                       };\r
+                       return '#' + v.toString( 16 );\r
+               };\r
+       };\r
+       if( X_Type_isString( v ) ){\r
+               if( percent || minusPct || url || fontName ) return v;\r
+       };\r
+};\r
+\r
+function XUI_AbstractUINode_calcValue( styleValue, srcValue ){\r
        /*\r
         * String の場合は必ず %\r
         */     \r
-       if( X.Type.isString( styleValue ) ){\r
+       if( X_Type_isString( styleValue ) ){\r
                return srcValue * parseFloat( styleValue ) / 100;\r
        };\r
-       if( !X.Type.isNumber( styleValue ) ) return 0;\r
+       if( !X_Type_isNumber( styleValue ) ) return 0;\r
        return styleValue;\r
 };\r
 \r
-X.UI._AbstractUINode.finalValue = function( styleValue, styleMin, styleMax, srcValue ){\r
-       var calc = X.UI._AbstractUINode.calcValue,\r
-               v    = calc( styleValue, srcValue ),\r
-               min  = calc( styleMin, srcValue ),\r
-               max  = calc( styleMax, srcValue );\r
+function XUI_AbstractUINode_calcFinalValue( styleValue, styleMin, styleMax, srcValue ){\r
+       var v    = XUI_AbstractUINode_calcValue( styleValue, srcValue ),\r
+               min  = XUI_AbstractUINode_calcValue( styleMin, srcValue ),\r
+               max  = XUI_AbstractUINode_calcValue( styleMax, srcValue );\r
        return v <= min ? min : max <= v ? max : v;\r
 };\r
-X.UI._AbstractUINode.ceil = function( v ){\r
+function XUI_AbstractUINode_ceil( v ){\r
        if( 0 <= v ){\r
                return ( v * 10 + 0.999 | 0 ) / 10;\r
        };\r
        return ( -v * 10 + 0.999 | 0 ) / -10;\r
 };\r
 \r
-X.UI.AbstractUINode = X.Class.create(\r
+X.UI.AbstractUINode = X_Class_create(\r
        'AbstractUINode',\r
-       X.Class.ABSTRACT | X.Class.SUPER_ACCESS,\r
+       X_Class.ABSTRACT | X_Class.SUPER_ACCESS,\r
        {\r
                parent : function(){\r
                        return X_Class_getPrivate( this ).parent;\r
@@ -886,10 +893,11 @@ X.UI.AbstractUINode = X.Class.create(
                attr : function( nameOrObject, valueOrUnit ){\r
                        var p = X_Class_getPrivate( this ),\r
                                layout, k, def, attrs, v;\r
-                       if( nameOrObject && X.Type.isObject( nameOrObject ) ){\r
+                       if( nameOrObject && X_Type_isObject( nameOrObject ) ){\r
                                // setter\r
                                layout = p.parentData && p.parentData.layout.overrideAttrsForChild; // root には parent がない\r
                                for( k in nameOrObject ){\r
+                                       if( X_EMPTY_OBJECT[ k ] ) continue;\r
                                        // 親のレイアウトマネージャの許可しない\r
                                        if( layout && !layout[ k ] ){\r
                                                continue;\r
@@ -899,7 +907,7 @@ X.UI.AbstractUINode = X.Class.create(
                                        };\r
                                };\r
                        } else\r
-                       if( X.Type.isString( nameOrObject ) ){\r
+                       if( X_Type_isString( nameOrObject ) ){\r
                                if( valueOrUnit !== undefined ){\r
                                        if( 'em,%'.indexOf( valueOrUnit ) === -1 ){\r
                                                // setter\r
@@ -920,28 +928,28 @@ X.UI.AbstractUINode = X.Class.create(
                },\r
                \r
                listen : function( type, arg1, arg2, arg3 ){\r
-                       X_Class_getPrivate( this ).listen( type, arg1, arg2, arg3 );\r
+                       X_Class_getPrivate( this )[ 'listen' ]( type, arg1, arg2, arg3 );\r
                        return this;\r
                },\r
                listenOnce : function( type, arg1, arg2, arg3 ){\r
-                       X_Class_getPrivate( this ).listenOnce( type, arg1, arg2, arg3 );\r
+                       X_Class_getPrivate( this )[ 'listenOnce' ]( type, arg1, arg2, arg3 );\r
                        return this;\r
                },\r
                listening : function( type, arg1, arg2, arg3 ){\r
-                       return X_Class_getPrivate( this ).listening( type, arg1, arg2, arg3 );\r
+                       return X_Class_getPrivate( this )[ 'listening' ]( type, arg1, arg2, arg3 );\r
                },\r
                unlisten : function( type, arg1, arg2, arg3 ){\r
-                       X_Class_getPrivate( this ).unlisten( type, arg1, arg2, arg3 );\r
+                       X_Class_getPrivate( this )[ 'unlisten' ]( type, arg1, arg2, arg3 );\r
                        return this;\r
                },\r
                dispatch : function( e ){\r
-                       return X_Class_getPrivate( this ).dispatch( e );\r
+                       return X_Class_getPrivate( this )[ 'dispatch' ]( e );\r
                },\r
                        \r
-               getNextNode : function(){\r
+               nextNode : function(){\r
                        \r
                },\r
-               getPrevNode : function(){\r
+               prevNode : function(){\r
                        \r
                },\r
                nodeIndex : function( v ){\r
@@ -978,23 +986,6 @@ X.UI.AbstractUINode = X.Class.create(
                getHeight : function(){\r
                        // dirty の場合、rootData.calculate\r
                        return X_Class_getPrivate( this ).boxHeight;\r
-               },\r
-               scrollTo : function( x, y ){\r
-                       X_Class_getPrivate( this ).scrollTo( x, y );\r
-               },\r
-               getScrollX : function( v ){\r
-                       // dirty の場合、rootData.calculate\r
-                       return X_Class_getPrivate( this ).scrollX( v );\r
-               },\r
-               getScrollY : function( v ){\r
-                       // dirty の場合、rootData.calculate\r
-                       return X_Class_getPrivate( this ).scrollY( v );\r
-               },\r
-               disabled : function( v ){\r
-                       return X_Class_getPrivate( this ).disabled( v );\r
-               },\r
-               cursor : function( v ){\r
-                       return X_Class_getPrivate( this ).cursor( v );\r
                }\r
        }\r
 );\r