X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;ds=sidebyside;f=0.6.x%2Fjs%2F02_dom%2F06_XDomStyle.js;h=112caf260bbc72e23346fcebe13aac627c66de97;hb=003fff3f160afb3e3a2cceb3d20b19a17977e94d;hp=bae6a2d71d79760fd54036db48ff90c7815a9817;hpb=541618cd9485cb041f46177d6869cc6d618ed1da;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/02_dom/06_XDomStyle.js b/0.6.x/js/02_dom/06_XDomStyle.js index bae6a2d..112caf2 100644 --- a/0.6.x/js/02_dom/06_XDomStyle.js +++ b/0.6.x/js/02_dom/06_XDomStyle.js @@ -986,16 +986,16 @@ X.Dom.Node.prototype.css = function( nameOrObj /* orUnitID, valuOrUnitOrName */ ieFix = X.Dom.Style.IE_FILTER_FIX; for( p in nameOrObj ){ if( ieFix[ p ] ){ - this._dirty |= X.Dom.Dirty.IE_FILTER; + this._dirty |= X_Node_Dirty.IE_FILTER; }; v = nameOrObj[ p ]; v || v === 0 ? css[ camelize( p ) ] = v : delete css[ camelize( p ) ]; if( p === 'display' ){ - v === 'none' ? ( this._state |= X.Dom.State.IE5_DISPLAY_NONE_FIX ) : ( this._state &= ~X.Dom.State.IE5_DISPLAY_NONE_FIX ); - v === 'none' ? ( this._state |= X.Dom.State.DISPLAY_NONE ) : ( this._state &= ~X.Dom.State.DISPLAY_NONE ); + v === 'none' ? ( this._state |= X_Node_State.IE5_DISPLAY_NONE_FIX ) : ( this._state &= ~X_Node_State.IE5_DISPLAY_NONE_FIX ); + v === 'none' ? ( this._state |= X_Node_State.DISPLAY_NONE ) : ( this._state &= ~X_Node_State.DISPLAY_NONE ); }; }; - this._dirty |= X.Dom.Dirty.CSS; + this._dirty |= X_Node_Dirty.CSS; this.parent && this._reserveUpdate(); delete this._cssText; return this; @@ -1008,7 +1008,7 @@ X.Dom.Node.prototype.css = function( nameOrObj /* orUnitID, valuOrUnitOrName */ v = args[ 1 ]; if( css[ name ] === v ) return this; if( X.Dom.Style.IE_FILTER_FIX[ name ] ){ - this._dirty |= X.Dom.Dirty.IE_FILTER; + this._dirty |= X_Node_Dirty.IE_FILTER; }; if( !v && v !== 0 ){ delete css[ name ]; @@ -1016,10 +1016,10 @@ X.Dom.Node.prototype.css = function( nameOrObj /* orUnitID, valuOrUnitOrName */ css[ name ] = v; }; delete this._cssText; - this._dirty |= X.Dom.Dirty.CSS; + this._dirty |= X_Node_Dirty.CSS; if( name === 'display' ){ - v === 'none' ? ( this._state |= X.Dom.State.IE5_DISPLAY_NONE_FIX ) : ( this._state &= ~X.Dom.State.IE5_DISPLAY_NONE_FIX ); - v === 'none' ? ( this._state |= X.Dom.State.DISPLAY_NONE ) : ( this._state &= ~X.Dom.State.DISPLAY_NONE ); + v === 'none' ? ( this._state |= X_Node_State.IE5_DISPLAY_NONE_FIX ) : ( this._state &= ~X_Node_State.IE5_DISPLAY_NONE_FIX ); + v === 'none' ? ( this._state |= X_Node_State.DISPLAY_NONE ) : ( this._state &= ~X_Node_State.DISPLAY_NONE ); }; // parent でなく this._root! でなくて this._state & in tree this.parent && this._reserveUpdate(); @@ -1045,15 +1045,15 @@ X.Dom.Node.prototype.cssText = function( v ){ var obj, i, l, attr, name; if( v === '' ){ delete this._css; - this._state &= ~X.Dom.State.IE5_DISPLAY_NONE_FIX; - this._dirty |= X.Dom.Dirty.CSS; + this._state &= ~X_Node_State.IE5_DISPLAY_NONE_FIX; + this._dirty |= X_Node_Dirty.CSS; this.parent && this._reserveUpdate(); delete this._cssText; return this; } else if( X.Type.isString( v ) ){ delete this._css; - this._state &= ~X.Dom.State.IE5_DISPLAY_NONE_FIX; + this._state &= ~X_Node_State.IE5_DISPLAY_NONE_FIX; obj = {}; v = v.split( ';' ); // TODO content ";" などにも対応 for( i = 0, l = v.length; i < l; ++i ){ @@ -1063,7 +1063,7 @@ X.Dom.Node.prototype.cssText = function( v ){ return this.css( obj ); }; // getter - if( this._dirty & X.Dom.Dirty.CSS && !( this._cssText = X.Dom.Style.objToCssText( this._css ) ) ){ + if( this._dirty & X_Node_Dirty.CSS && !( this._cssText = X.Dom.Style.objToCssText( this._css ) ) ){ delete this._cssText; }; return this._cssText; @@ -1072,14 +1072,14 @@ X.Dom.Node.prototype.cssText = function( v ){ /* * ここでは HTMLElement のチ1ェックは行わない! * TODO - * body に css attr がセットされた場合には X.Dom.baseFontSize をクリア + * body に css attr がセットされた場合には X_Dom_baseFontSize をクリア */ X.Dom.Node.prototype._getCharSize = window.getComputedStyle ? (function(){ Node._body._updateTimerID && Node._body._startUpdate(); - if( this === Node._body && X.Dom.baseFontSize ) return X.Dom.baseFontSize; + if( this === Node._body && X_Dom_baseFontSize ) return X_Dom_baseFontSize; if( this._fontSize ) return this._fontSize; return this._fontSize = parseFloat( getComputedStyle( this._rawObject, null ).fontSize ); }) : @@ -1087,7 +1087,7 @@ X.Dom.Node.prototype._getCharSize = document.defaultView && document.defaultView.getComputedStyle ? (function(){ Node._body._updateTimerID && Node._body._startUpdate(); - if( this === Node._body && X.Dom.baseFontSize ) return X.Dom.baseFontSize; + if( this === Node._body && X_Dom_baseFontSize ) return X_Dom_baseFontSize; if( this._fontSize ) return this._fontSize; return this._fontSize = parseFloat( document.defaultView.getComputedStyle( this._rawObject, null ).fontSize ); }) : @@ -1104,7 +1104,7 @@ X.Dom.Node.prototype._getCharSize = (function(){ var font, vu, v, u, _v; Node._body._updateTimerID && Node._body._startUpdate(); - if( this === Node._body && X.Dom.baseFontSize ) return X.Dom.baseFontSize; + if( this === Node._body && X_Dom_baseFontSize ) return X_Dom_baseFontSize; if( this._fontSize ) return this._fontSize; font = this._rawObject.currentStyle.fontSize; @@ -1131,11 +1131,11 @@ X.Dom.Node.prototype._getCharSize = }; return 0; }) : - X.Dom.DOM_W3C ? + X_UA_DOM.W3C ? (function(){ var elm, v; Node._body._updateTimerID && Node._body._startUpdate(); - if( this === Node._body && X.Dom.baseFontSize ) return X.Dom.baseFontSize; + if( this === Node._body && X_Dom_baseFontSize ) return X_Dom_baseFontSize; if( this._fontSize ) return this._fontSize; this._rawObject.appendChild( elm = document.createElement( 'span' ) ); @@ -1145,11 +1145,11 @@ X.Dom.Node.prototype._getCharSize = this._rawObject.removeChild( elm ); return this._fontSize = v; }) : - X.Dom.DOM_IE4 ? + X_UA_DOM.IE4 ? (function(){ var font, vu, v, u, _v; Node._body._updateTimerID && Node._body._startUpdate(); - if( this === Node._body && X.Dom.baseFontSize ) return X.Dom.baseFontSize; + if( this === Node._body && X_Dom_baseFontSize ) return X_Dom_baseFontSize; if( this._fontSize ) return this._fontSize; if( this._css && ( font = this._css.fontSize ) ){ @@ -1182,7 +1182,7 @@ X.Dom.Node.prototype._getCharSize = }) : (function(){ var elm, v; - if( this === Node._body && X.Dom.baseFontSize ) return X.Dom.baseFontSize; + if( this === Node._body && X_Dom_baseFontSize ) return X_Dom_baseFontSize; Node._body._updateTimerID && Node._body._startUpdate(); if( this._fontSize ) return this._fontSize; @@ -1260,7 +1260,7 @@ X.Dom.Node.prototype._getCharSize = }; } )(); -X.Dom.listenOnce( X.Dom.Event.DOM_INIT, function(){ +X.Dom.listenOnce( X_TEMP.SYSTEM_EVENT_INIT, function(){ var xnode = Node._systemNode, output = X.Dom.Style._UNIT_RATIO = {}, list = 'cm,mm,in,pt,pc'.split( ',' ),