* @return {string} html文字列\r
*/\r
function X_String_chrReferanceTo( str ){\r
- var refs, i, l, ref;\r
+ var refs, i, l, ref, k;\r
\r
if( str == null || str === '' ) return '';\r
if( str.indexOf( '&' ) === -1 ) return str;\r
* クラス名\r
* @type {string}\r
*/\r
- name : ''\r
+ NAME : ''\r
},\r
\r
X_Class_CLASS_LIST = [],\r
klass.prototype.constructor = klass;\r
};\r
\r
- klass[ 'name' ] = displayName;\r
+ klass[ 'NAME' ] = displayName;\r
\r
if( opt_abstract ){\r
classDef.isAbstract = true;\r
};
if( filterFix ){
- v = X_Node_CSS_objToIEFilterText( that, filterFix /* , css */ );
+ v = X_Node_CSS_objToIEFilterText( that, filterFix, css );
+ n = css.length; /* css が変更されている場合あり */
if( v ){
- css[ ++n /* css.length */ ] = 'filter:' + v;
+ css[ ++n ] = 'filter:' + v;
};
skipFilter = skipFilter && v;
} else {
if( 0 <= n ){
// cssText には完全なものを控えるが、戻すのは filter を抜いたもの
that[ '_cssText' ] = css.join( ';' );
+ //console.log( that[ '_cssText' ] );
if( skipFilter ){
--css.length;
return css.join( ';' );
filters[ ++n ] = v;
break;
case 2 : //'opacity' :
- //if( v === 0 ){
- // opt_cssList && ( opt_cssList[ opt_cssList.length ] = 'visibility:hidden' );
- //} else
+ if( v === 0 ){
+ console.log( '@opacity:0 ' + !!opt_cssList );
+ opt_cssList && ( opt_cssList[ opt_cssList.length ] = 'visibility:hidden' );
+ } else
if( v < 1 ) filters[ ++n ] = 'alpha(opacity=' + ( v * 100 | 0 ) +')';
break;
case 3 : //'boxShadow' :
break;
};
};
- return filters.join( ' ' );
+ return filters.join( ' ' );//n !== -1 ? filters.join( ' ' ) : '';
};
'toggleClass' : X_Node_toggleClass,
'hasClass' : X_Node_hasClass,
- 'html' : X_Node_html,
+ 'html' : X_Node__html,
'text' : X_Node_text,
'call' : X_Node_call,
'each' : X_Node_each
* @return {string|Node}
* @example node.html( '<img>' );
*/
-function X_Node_html( html ){
+function X_Node__html( html ){
var _ = '', q = '"', xnodes, n, i, l;
// setter
if( html !== undefined ){ // String 以外に Number や false null なども許可
removal.length = 0;
};
-
+ //
X_UA[ 'IE5' ] && ( X_elmBody.style.visibility = 'hidden' );
if( X_Node_html[ '_flags' ] & X_Node_BitMask_IS_DIRTY ){
elm.setAttribute( 'class', that[ '_className' ] ) :
( elm.className = that[ '_className' ] )
) :
- ( elm.className && elm.removeAttribute( X_UA[ 'IE' ] < 8 ? 'className' : 'class' ) ); // className は ie7-
+ ( elm.className && elm.removeAttribute( X_UA[ 'IE' ] < 8 ? 'className' : 'class' ) ); // className は ie7-
};
// attr
//console.log( '/ X.Net.Image:reset ' + this.abspath + ' timerID:' + this.timerID );\r
\r
this.timerID && X_Timer_remove( this.timerID );\r
- this.timerID = 0;\r
+ this.timerID = this.tick = 0;\r
\r
this.finish = false;\r
this.abspath = ''; \r
// ie11(10,9 開発モード)で mineType 不正の場合、画像取得に成功してもエラーイベントが起こるのを無視する。\r
if( X_ImgLoader_0forError && raw.width ) return;\r
if( this.finish ) return;\r
- this.finish = true;\r
+ this.finish = true;\r
this.timerID && X_Timer_remove( this.timerID );\r
//console.log( '* X.Net.Image:ERROR @handle ' + this.abspath + X.Timer.now() );\r
//console.dir( raw );\r
\r
// Opera Mobile 12 は 2回目以降の currentTime へのセットで currentTime が更新されなくなるため、タイマーを使用する\r
X_HTMLAudio_currentTimeFix = !!X_UA[ 'OperaMobile' ] || !!X_UA[ 'OperaTablet' ],\r
+ // Firefox44.0.2 で音声の再生開始に難あり...\r
+ X_HTMLAudio_playStartFix = X_UA[ 'Windows' ] && X_UA[ 'Gecko' ] === 44,\r
\r
X_HTMLAudio_volumeFix = X_UA[ 'Chrome' ],\r
/*\r
// 8:duration 取得済\r
// :timeupdate イベントで durationFixは完了\r
_durationFixPhase : X_HTMLAudio_durationFix ? 1 : 0,\r
- _lastCurrentTime : 0,\r
+ _lastCurrentTime : 0, // ms\r
\r
_shortPlayFixON : false,\r
_shortPlayFixTime : 0,\r
\r
if( !raw ) return;\r
\r
- //e.type !== 'timeupdate' && console.log( ' > ' + e.type );\r
+ // e.type !== 'timeupdate' && console.log( ' > ' + e.type );\r
\r
switch( e.type ){\r
\r
if( ( now = this.getActualCurrentTime() ) === this._lastCurrentTime ){\r
eventType = X_EVENT_MEDIA_WAITING;\r
} else\r
+ if( X_HTMLAudio_playStartFix && ( now < this._lastCurrentTime ) ){\r
+ eventType = X_EVENT_MEDIA_WAITING;\r
+ //console.log( '@Firefox44.0.2 !! ' + now + ' / ' + this._lastCurrentTime );\r
+ // Firefox44.0.2 で音声の再生開始に難あり...\r
+ // 20回程度 currentTime の更新に失敗する....\r
+ this.actualPlay();\r
+ } else\r
if( this.playing ){\r
end = X_Audio_getEndTime( this ) + this._shortPlayFixTime;\r
- \r
- console.log( now + ' / ' + end );// Firefox44.0.2 で音声の再生開始に難あり...\r
- \r
+\r
+ //console.log( '@ ' + now + ' / ' + this._lastCurrentTime + ' / ' + end );// Firefox44.0.2 で音声の再生開始に難あり...\r
+\r
if( ( 0 + end <= 0 + now ) || // 0+ なぜか iem9 で必要,,,\r
( now < this._lastCurrentTime && now < 2000 ) ){\r
//( ( X_HTMLAudio_endedFixAOSP2 || X_HTMLAudio_endedFixAOSP4 ) && ( now < this._lastCurrentTime && now < 1000 ) ) ){\r
end = X_Audio_getEndTime( this );\r
begin = X_Audio_getStartTime( this, end, true );\r
\r
- this._lastCurrentTime = begin / 1000;\r
+ this._lastCurrentTime = begin;\r
\r
if( this._shortPlayFixON ){\r
this._shortPlayFixTime = ( 1000 < end - begin ) ? 200 : 400;\r
\r
// iOS で duration が 0 の時に触ると error\r
// 0 or 8\r
- if( !( this._durationFixPhase % 8 ) && this.duration ) raw.currentTime = this._lastCurrentTime;\r
+ if( !( this._durationFixPhase % 8 ) && this.duration ) raw.currentTime = this._lastCurrentTime / 1000;\r
\r
console.log( '[HTMLAudio] play ' + begin + ' -> ' + end + ' crt:' + ( raw.currentTime | 0 ) + ' last:' + this._lastCurrentTime );\r
\r
getActualCurrentTime : function(){\r
return ( X_HTMLAudio_currentTimeFix ?\r
X_Timer_now() - this._currentFixStart + this._currentFixBegin :\r
- this._seekingFixON ? this._lastCurrentTime * 1000 :\r
+ this._seekingFixON ? this._lastCurrentTime :\r
this[ '_rawObject' ].currentTime * 1000 | 0 );\r
},\r
/*\r