OSDN Git Service

Version 0.6.37, bugfix.
[pettanr/clientJs.git] / 0.6.x / js / dom / 15_XDomStyle.js
index 019cb67..20c879a 100644 (file)
@@ -71,12 +71,6 @@ X.Dom.Style = {
        },
        
        /* fontSize -> font-size */
-       /*
-       REG_LARGE : /[A-Z]/g,
-       uncamelize: function( str ){
-               return str.split( ' ' ).join( '' ).replace( X.Dom.Style.REG_LARGE, '-$&' ).toLowerCase();
-       }, */
-       
        CHAR_CODE_A : 'A'.charCodeAt( 0 ),
        
        _DICTIONARY_UNCAMELIZE : {},
@@ -1079,29 +1073,31 @@ X.Dom.Node.prototype.cssText = function( v ){
 };
 
 /*
- * ここでは HTMLElement のチャックは行わない!
+ * ここでは HTMLElement のチ1ェックは行わない!
+ * TODO
+ * body に css attr がセットされた場合には X.Dom.baseFontSize をクリア
  */
 
 X.Dom.Node.prototype._getCharSize =
        window.getComputedStyle ?
                (function(){
-                       if( this === Node.root && X.Dom.baseFontSize ) return X.Dom.baseFontSize;
                        Node.root._updateTimerID && Node.root._startUpdate();
+                       if( this === Node.root && X.Dom.baseFontSize ) return X.Dom.baseFontSize;
                        if( this._fontSize ) return this._fontSize;
                        return this._fontSize = parseFloat( getComputedStyle( this._rawNode, null ).fontSize );
                }) :
        document.defaultView && document.defaultView.getComputedStyle ?
                (function(){
-                       if( this === Node.root && X.Dom.baseFontSize ) return X.Dom.baseFontSize;
                        Node.root._updateTimerID && Node.root._startUpdate();
+                       if( this === Node.root && X.Dom.baseFontSize ) return X.Dom.baseFontSize;
                        if( this._fontSize ) return this._fontSize;
                        return this._fontSize = parseFloat( document.defaultView.getComputedStyle( this._rawNode, null ).fontSize );
                }) :
        X.UA.IE && 5.5 <= X.UA.IE ?
                (function(){
                        var font, vu, v, u, _v;
-                       if( this === Node.root && X.Dom.baseFontSize ) return X.Dom.baseFontSize;
                        Node.root._updateTimerID && Node.root._startUpdate();
+                       if( this === Node.root && X.Dom.baseFontSize ) return X.Dom.baseFontSize;
                        if( this._fontSize ) return this._fontSize;
                        
                        font = this._rawNode.currentStyle.fontSize;
@@ -1128,11 +1124,11 @@ X.Dom.Node.prototype._getCharSize =
                        };
                        return 0;
                }) :
-       document.getElementById ?
+       X.Dom.DOM_W3C ?
                (function(){
                        var elm, v;
-                       if( this === Node.root && X.Dom.baseFontSize ) return X.Dom.baseFontSize;
                        Node.root._updateTimerID && Node.root._startUpdate();
+                       if( this === Node.root && X.Dom.baseFontSize ) return X.Dom.baseFontSize;
                        if( this._fontSize ) return this._fontSize;
 
                        this._rawNode.appendChild( elm = document.createElement( 'span' ) );
@@ -1142,11 +1138,11 @@ X.Dom.Node.prototype._getCharSize =
                        this._rawNode.removeChild( elm );
                        return this._fontSize = v;
                }) :
-       X.UA.IE ?
+       X.Dom.DOM_IE4 ?
                (function(){
                        var font, vu, v, u, _v;
-                       if( this === Node.root && X.Dom.baseFontSize ) return X.Dom.baseFontSize;
                        Node.root._updateTimerID && Node.root._startUpdate();
+                       if( this === Node.root && X.Dom.baseFontSize ) return X.Dom.baseFontSize;
                        if( this._fontSize ) return this._fontSize;
                        
                        if( this._css && ( font = this._css.fontSize ) ){