X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F01_dom%2F15_XDomStyle.js;h=968557b501930b6251704b46242fe802e8dbdcc2;hb=08e72a61fa7363b2fb04f5bc863df082c3067e47;hp=34852d5c09744b28cd86f21ad79bac443ee491d3;hpb=0eaaa84ad608663f26fff366dacc9ab785d2dfe2;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/01_dom/15_XDomStyle.js b/0.6.x/js/01_dom/15_XDomStyle.js index 34852d5..968557b 100644 --- a/0.6.x/js/01_dom/15_XDomStyle.js +++ b/0.6.x/js/01_dom/15_XDomStyle.js @@ -119,14 +119,15 @@ _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 ){ - name = uncamelize( p ); + // TODO Object が拡張されていると error... + name = uncamelize( VENDER_PREFIX[ p ] || p ); if( FIX_PROP[ name ] ){ - sp = 1; + sp = true; } else { - css[ ++n ] = [ VENDER_PREFIX[ name ] || name, obj[ p ] ].join( ':' ); + css[ ++n ] = [ name, obj[ p ] ].join( ':' ); }; }; sp && ( css[ ++n ] = 'filter:' + SPECIAL_FIX( obj ) ); @@ -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 ?