OSDN Git Service

Version 0.6.73, move ._rawNode from X.Dom.Event to X.EventDispatcher.
[pettanr/clientJs.git] / 0.6.x / js / 01_dom / 15_XDomStyle.js
index 198598f..968557b 100644 (file)
@@ -119,9 +119,10 @@ _GRNERAL
                        FIX_PROP      = me.SPECIAL_FIX_PROP,
                        SPECIAL_FIX   = me.SPECIAL_FIX,
                        n             = -1,
-                       p, name, sp;
+                       p, v, name, sp;
                if( !obj ) return ''; // Opera7.5 未満?
                for( p in obj ){
+                       // TODO Object が拡張されていると error...
                        name = uncamelize( VENDER_PREFIX[ p ] || p );
                        if( FIX_PROP[ name ] ){
                                sp = true;
@@ -1183,16 +1184,17 @@ X.Dom.Node.prototype._getCharSize =
 
 
 X.Dom.listenOnce( X.Dom.Event.DOM_PRE_INIT, function(){
-       var testStyle = X.Dom._root.style;
+       var testStyle = X.Dom._root.style,
+               temp      = testStyle.cssText;
        
        X.Dom.Style.VENDER_PREFIX = (function(){
                var ret       = {},
-                       vendors   = 'webkit,Webkit,Moz,moz,ms,Ms,O,o,khtml,Khtml'.split( ',' ),
+                       vendors   = 'webkit,Webkit,Moz,moz,Ms,ms,O,o,khtml,Khtml'.split( ',' ),
                        searches  = (
                                'opacity,boxSizing,' +
                                'transform,transformOrigin,perspective,' +
                                'transisiton,transitionDelay,transitionProperty,transitionDuration,transitionTimingFunction,' +
-                               'userSelect,touchAction,touchCallout,contentZooming,userDrag,tapHighlightColor' ).split( ',' ),
+                               'userSelect,touchSelect,touchAction,touchCallout,contentZooming,userDrag,tapHighlightColor' ).split( ',' ),
                        vendor, i, search, prop, j, v;
 
                for( i = searches.length; i; ){
@@ -1203,6 +1205,8 @@ X.Dom.listenOnce( X.Dom.Event.DOM_PRE_INIT, function(){
                                for( j = vendors.length; j; ){
                                        v = vendors[ --j ];
                                        if( testStyle[ v + prop ] !== undefined ){
+                                               if( v === 'ms' ) v = 'Ms';// for ie9
+                                               if( v === 'o' ) v = 'O';//for opera12
                                                ret[ search ] = v + prop;
                                                break;
                                        };
@@ -1214,6 +1218,14 @@ X.Dom.listenOnce( X.Dom.Event.DOM_PRE_INIT, function(){
                return ret;
        })();
        
+       testStyle.cssText = 'background:rgba(0,0,0,0.5)';
+       
+       X.Dom.Style.Support = {
+               rgba : !!testStyle.background
+       };
+       
+       testStyle.cssText = temp;
+       
        X.Dom.Style.SPECIAL_FIX_PROP =
                // ~IE8
                X.UA.IE < 9 && !X.UA.MacIE ?