From 9ba2ba4de00464f81805b28dfcab8814a46da5e5 Mon Sep 17 00:00:00 2001 From: itozyun Date: Sun, 15 Nov 2015 21:14:12 +0900 Subject: [PATCH] Version 0.6.195, add opacity-fix for IE8. --- 0.6.x/js/01_core/13_XClass.js | 42 +++++++++++++++++++++----------- 0.6.x/js/01_core/21_XViewPort.js | 36 +++++++++++++--------------- 0.6.x/js/02_dom/02_XNodeFlags.js | 28 +++++++++++++++++----- 0.6.x/js/02_dom/04_XBoxModel.js | 2 +- 0.6.x/js/02_dom/06_XNodeCSS.js | 5 +++- 0.6.x/js/02_dom/10_XNodeAnime.js | 3 ++- 0.6.x/js/02_dom/20_XNode.js | 48 +++++++++++++++++++++++++++---------- 0.6.x/js/02_dom/22_XTreeBuilder.js | 8 ++++++- 0.6.x/js/06_net/01_XNetXHR.js | 8 +++---- 0.6.x/js/20_ui/06_AbstractUINode.js | 14 +++-------- 0.6.x/js/20_ui/20_Root.js | 5 ---- 0.6.x/js/main.js | 22 +++++++++++++++++ 12 files changed, 146 insertions(+), 75 deletions(-) diff --git a/0.6.x/js/01_core/13_XClass.js b/0.6.x/js/01_core/13_XClass.js index 343f862..9f6b05a 100644 --- a/0.6.x/js/01_core/13_XClass.js +++ b/0.6.x/js/01_core/13_XClass.js @@ -43,7 +43,7 @@ X_Class_CommonMethods = */ // TODO kill したインスタンスのイベントが残っていないか?これは開発用のみ 'kill' : function(){ - var listeners, flag, p, timers, def; + var listeners, flag, p, i, list, timers, def; // TODO 破棄済のインスタンスへの kill @@ -57,7 +57,7 @@ X_Class_CommonMethods = // listeners がない場合、イベントの登録がないため、BEFORE_KILL_INSTANCE は呼ばれない。 // KILL_RESERVED == true の場合、BEFORE_KILL_INSTANCE は呼ばれない。 if( listeners && !listeners[ X_LISTENERS_KILL_RESERVED ] && listeners[ X_EVENT_BEFORE_KILL_INSTANCE ] ){ - X_Class_SEAL_KILLING[ X_Class_SEAL_KILLING.length ] = this; + X_Class_SEAL_KILLING[ i = X_Class_SEAL_KILLING.length ] = this; if( this[ 'dispatch' ]( X_EVENT_BEFORE_KILL_INSTANCE ) & X_CALLBACK_PREVENT_DEFAULT ){ this[ 'dispatch' ]( X_EVENT_KILL_INSTANCE_CANCELED ); @@ -67,7 +67,7 @@ X_Class_CommonMethods = X_Class_SEAL_KILLING.length === 1 ? ( X_Class_SEAL_KILLING.length = 0 ) : - X_Class_SEAL_KILLING.splice( X_Class_SEAL_KILLING.indexOf( this ), 1 ); + X_Class_SEAL_KILLING.splice( X_Class_SEAL_KILLING[ i ] === this ? i : X_Class_SEAL_KILLING.indexOf( this ), 1 ); if( flag ) return; }; @@ -79,17 +79,26 @@ X_Class_CommonMethods = }; if( listeners[ X_EVENT_KILL_INSTANCE ] ){ - X_Class_SEAL_KILLING[ X_Class_SEAL_KILLING.length ] = this; + X_Class_SEAL_KILLING[ i = X_Class_SEAL_KILLING.length ] = this; listeners[ X_LISTENERS_KILL_RESERVED ] = false; this[ 'dispatch' ]( X_EVENT_KILL_INSTANCE ); X_Class_SEAL_KILLING.length === 1 ? ( X_Class_SEAL_KILLING.length = 0 ) : - X_Class_SEAL_KILLING.splice( X_Class_SEAL_KILLING.indexOf( this ), 1 ); + X_Class_SEAL_KILLING.splice( X_Class_SEAL_KILLING[ i ] === this ? i : X_Class_SEAL_KILLING.indexOf( this ), 1 ); + }; + + if( !( listeners = this[ '_listeners' ] ) ){ + for( p in listeners ){ + //if( X_EMPTY_OBJECT[ opt_type ] ) continue; + if( p <= X_LISTENERS_KILL_RESERVED ) continue; + list = listeners[ p ]; + for( i = list.length; i; ){ + this[ 'unlisten' ]( p, list[ --i ] ); + }; + }; }; - - X_EventDispatcher_unlistenAll( this ); }; if( this[ 'instanceOf' ]( Node ) ){ @@ -159,6 +168,9 @@ X_Class_CommonMethods = }; }; + // index が替わっている可能性があるので取り直し + if( X_Class_SUPER_CALLER[ i ] !== me ) i = X_Class_SUPER_CALLER.indexOf( me ); + if( X_Class_SUPER_STACKS[ i ] === stack ) console.log( 'スーパークラス、またはスーパークラスのコンストラクタは存在しません' ); if( stack === 0 ){ @@ -238,21 +250,20 @@ X_Class_CommonMethods = sFunc = sClass.prototype[ name ]; if( sFunc !== myFunc /* X_Object_own( name, sClass.prototype ) */ ){ - // this の関数と異なり、値が設定されていたら、今は手を抜いて undef か?見ている、正しくは hasOwnProperty if( X_Type_isFunction( sFunc ) ){ X_Class_SUPER_STACKS[ i ] += t; switch( args.length ){ - case 0 : - ret = sFunc.call( me ); - break; case 1 : - ret = sFunc.call( me, args[ 0 ] ); + ret = sFunc.call( me ); break; case 2 : - ret = sFunc.call( me, args[ 0 ], args[ 1 ] ); + ret = sFunc.call( me, args[ 1 ] ); break; case 3 : - ret = sFunc.call( me, args[ 0 ], args[ 1 ], args[ 2 ] ); + ret = sFunc.call( me, args[ 1 ], args[ 2 ] ); + break; + case 4 : + ret = sFunc.call( me, args[ 1 ], args[ 2 ], args[ 3 ] ); break; default : args = X_Array_copy( args ); @@ -266,6 +277,9 @@ X_Class_CommonMethods = }; }; + // index が替わっている可能性があるので取り直し + if( X_Class_SUPER_CALLER[ i ] !== me ) i = X_Class_SUPER_CALLER.indexOf( me ); + if( stack === 0 ){ X_Class_SUPER_CALLER.splice( i, 1 ); X_Class_SUPER_STACKS.splice( i, 1 ); diff --git a/0.6.x/js/01_core/21_XViewPort.js b/0.6.x/js/01_core/21_XViewPort.js index 02ec900..ae083d7 100644 --- a/0.6.x/js/01_core/21_XViewPort.js +++ b/0.6.x/js/01_core/21_XViewPort.js @@ -75,7 +75,8 @@ X_ViewPort = X_Class_override( case 'blur' : case 'focusout' : - if( 5 < X_UA[ 'IE' ] && X_UA[ 'IE' ] < 9 ){ + // TODO ie5... + if( 5.5 < X_UA[ 'IE' ] && X_UA[ 'IE' ] < 9 ){ xnode = X_Node_getXNode( document.activeElement ); if( xnode ){ xnode[ 'listenOnce' ]( [ 'focus', 'blur' ], X_ViewPort_detectFocusForIE ); @@ -465,7 +466,6 @@ X[ 'ViewPort' ] = { X_ViewPort[ 'listenOnce' ]( X_EVENT_PRE_INIT, function(){ X_ViewPort_readyState = X_EVENT_XTREE_READY; - if( X_TEMP.X_Dom_useBuilder ) X_TEMP.X_Dom_useBuilder = !!X_elmBody.children.length; !X_TEMP.X_Dom_useBuilder && X_ViewPort[ 'asyncDispatch' ]( X_EVENT_XTREE_READY ); } ); @@ -512,11 +512,11 @@ X[ 'ViewPort' ] = { // if( X_ViewPort_orientationchange ){ - X_EventDispatcher_systemListen( X_ViewPort, 'orientationchange', X_ViewPort_orientationchange ); + X_ViewPort[ 'listen' ]( 'orientationchange', X_ViewPort_orientationchange ); }; if( X_ViewPort_detectFontSize ){ - X_EventDispatcher_systemListen( X_ViewPort, 'resize', X_ViewPort_resize ); + X_ViewPort[ 'listen' ]( 'resize', X_ViewPort_resize ); X_Timer_add( 333, X_ViewPort_detectFontSize ); } else { X_Timer_add( 333, X_ViewPort_resize ); @@ -527,39 +527,37 @@ X[ 'ViewPort' ] = { X_ViewPort[ 'asyncDispatch' ]( X_ViewPort_readyState = X_EVENT_XDOM_READY ); } ); - X_ViewPort[ 'asyncDispatch' ]( X_EVENT_PRE_INIT ); + if( X_TEMP.X_Dom_useBuilder ) X_TEMP.X_Dom_useBuilder = !!X_elmBody.children.length; + X_ViewPort[ 'asyncDispatch' ]( X_EVENT_PRE_INIT ); + X_ViewPort[ 'listen' ]( [ 'beforeunload', 'unload' ] ); - X_EventDispatcher_systemListen( X_ViewPort, [ 'beforeunload', 'unload' ] ); - -//ブラウザの戻るボタンで戻ったときに呼ばれるイベントとかキャッシュとかそこらへんのこと -//http://d.hatena.ne.jp/koumiya/20080916/1221580149 - -console.log( '------------------->' ); + //ブラウザの戻るボタンで戻ったときに呼ばれるイベントとかキャッシュとかそこらへんのこと + //http://d.hatena.ne.jp/koumiya/20080916/1221580149 if( document[ 'webkitHidden' ] !== undefined ){ - X_EventDispatcher_systemListen( X_ViewPort_document, 'webkitvisibilitychange', X_ViewPort ); + X_ViewPort_document[ 'listen' ]( 'webkitvisibilitychange', X_ViewPort ); } else if( document[ 'hidden' ] !== undefined ){// iOS 7+ - X_EventDispatcher_systemListen( X_ViewPort_document, 'visibilitychange', X_ViewPort ); + X_ViewPort_document[ 'listen' ]( 'visibilitychange', X_ViewPort ); } else if( document[ 'msHidden' ] !== undefined ){ - X_EventDispatcher_systemListen( X_ViewPort_document, 'msvisibilitychange', X_ViewPort ); + X_ViewPort_document[ 'listen' ]( 'msvisibilitychange', X_ViewPort ); } else if( document[ 'mozHidden' ] !== undefined ){ - X_EventDispatcher_systemListen( X_ViewPort_document, 'mozvisibilitychange', X_ViewPort ); + X_ViewPort_document[ 'listen' ]( 'mozvisibilitychange', X_ViewPort ); }; if( window[ 'onpageshow' ] !== undefined ){ - X_EventDispatcher_systemListen( X_ViewPort, [ 'pageshow', 'pagehide' ] ); + X_ViewPort[ 'listen' ]( [ 'pageshow', 'pagehide' ] ); }; if( document[ 'onfocusin' ] !== undefined ){ // https://github.com/ai/visibilityjs/blob/master/lib/visibility.fallback.js - X_EventDispatcher_systemListen( X_ViewPort_document, [ 'focusin', 'focusout' ], X_ViewPort ); + X_ViewPort_document[ 'listen' ]( [ 'focusin', 'focusout' ], X_ViewPort ); }; - X_EventDispatcher_systemListen( X_ViewPort, [ 'focus', 'blur' ] ); + X_ViewPort[ 'listen' ]( [ 'focus', 'blur' ] ); return X_CALLBACK_UN_LISTEN; }; @@ -588,7 +586,7 @@ console.log( 'X.Dom dom:w3c=' + X_UA_DOM.W3C + ' ev:w3c=' + X_UA_EVENT.W3C ); if( X_UA_EVENT.W3C ){ X_ViewPort_document[ 'listenOnce' ]( 'DOMContentLoaded', X_TEMP.onDomContentLoaded ); } else -if( 6 <= X_UA[ 'IE' ] && X[ 'inHead' ] && !X_UA[ 'ieExeComError' ] ){ // standalone の除外 -> && !X_UA[ 'ieExeComError' ] +if( 6 <= X_UA[ 'IE' ] && X[ 'inHead' ] /* && !X_UA[ 'ieExeComError' ] */ ){ // standalone の除外 -> && !X_UA[ 'ieExeComError' ] // if this script in Head //document.write( '' ); //X_TEMP._script = document.getElementById( '__ieonload' ); diff --git a/0.6.x/js/02_dom/02_XNodeFlags.js b/0.6.x/js/02_dom/02_XNodeFlags.js index c6faba9..166e14b 100644 --- a/0.6.x/js/02_dom/02_XNodeFlags.js +++ b/0.6.x/js/02_dom/02_XNodeFlags.js @@ -40,29 +40,37 @@ var X_NodeFlags_DESTROYED = 0x0, X_NodeFlags_IE4_FIXED = X_UA[ 'IE4' ] ? 2 << 24 : 0, X_NodeFlags_IE5_DISPLAY_NONE_FIX = X_UA[ 'IE5' ] && X_UA[ 'ActiveX' ] ? 2 << 24 : 0, - + X_NodeFlags_IE8_OPACITY_FIX = X_UA[ 'IE8' ] && X_UA[ 'ActiveX' ] ? 2 << 25 : 0, + // http://modernizr.com/downloads/modernizr.js // Thanks to Erik Dahlstrom - X_NodeFlags_IS_SVG = document.createElementNS && document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' )[ 'createSVGRect' ] ? 2 << 25 : 0, + X_NodeFlags_IS_SVG = document.createElementNS && document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' )[ 'createSVGRect' ] ? 2 << 26 : 0, X_NodeFlags_IS_VML = ( function(){ - if( !X_UA[ 'ActiveX' ] || X_UA[ 'IE' ] < 5 || 9 < X_UA[ 'IE' ] || X_UA[ 'ieExeComError' ] ) return 0; // standalone の除外 -> X_UA[ 'ieExeComError' ] + if( !X_UA[ 'ActiveX' ] || X_UA[ 'IE' ] < 5 || 9 < X_UA[ 'IE' ] /* || X_UA[ 'ieExeComError' ] */ ) return 0; // standalone の除外 -> X_UA[ 'ieExeComError' ] document.write( '' + '' ); + /** + * VML のバージョン + * @alias X.Doc.VML + * @type {number} + */ + X[ 'Doc' ][ 'VML' ] = window[ '__vml' ] / 2 || 0; + switch( window[ '__vml' ] ){ case 2 : document.getElementById( 'vmltest2' ).removeNode( true ); case 1 : document.getElementById( 'vmltest1' ).removeNode( true ); - return 2 << 26; + return 2 << 27; }; return 0; })(), - X_NodeFlags_SYSTEM_NODE = 2 << 27, + X_NodeFlags_SYSTEM_NODE = 2 << 28, X_Node_BITMASK_RESET_STYLE = ( ( 2 << 29 ) - 1 + ( 2 << 29 ) ) ^ ( X_NodeFlags_STYLE_IS_DISPLAY_NONE | @@ -78,10 +86,18 @@ var X_NodeFlags_DESTROYED = 0x0, X_Node_BitMask_IS_DIRTY = X_NodeFlags_DIRTY_POSITION | X_NodeFlags_DIRTY_CONTENT | X_NodeFlags_DIRTY_ID | X_NodeFlags_DIRTY_CLASSNAME | - X_NodeFlags_DIRTY_ATTR | X_NodeFlags_DIRTY_CSS | X_NodeFlags_DIRTY_IE_FILTER, + X_NodeFlags_DIRTY_ATTR | X_NodeFlags_DIRTY_CSS | X_NodeFlags_DIRTY_IE_FILTER | X_NodeFlags_IE8_OPACITY_FIX, X_Node_BitMask_RESET_DIRTY = ( ( 2 << 29 ) - 1 + ( 2 << 29 ) ) ^ X_Node_BitMask_IS_DIRTY, X_Node_BitMask_RESET_GPU = ( ( 2 << 29 ) - 1 + ( 2 << 29 ) ) ^ ( X_NodeFlags_GPU_RESERVED | X_NodeFlags_GPU_NOW | X_NodeFlags_GPU_RELEASE_RESERVED ), X_Node_BitMask_IE4_IS_MIX = X_NodeFlags_IE4_HAS_TEXTNODE | X_NodeFlags_IE4_HAS_ELEMENT; + +// TODO SVGのバージョン +/** + * SVG が有効か? + * @alias X.Doc.SVG + * @type {boolean} + */ +X[ 'Doc' ][ 'SVG' ] = !!X_NodeFlags_IS_SVG; diff --git a/0.6.x/js/02_dom/04_XBoxModel.js b/0.6.x/js/02_dom/04_XBoxModel.js index ad62c8d..e2b13be 100644 --- a/0.6.x/js/02_dom/04_XBoxModel.js +++ b/0.6.x/js/02_dom/04_XBoxModel.js @@ -65,7 +65,7 @@ X_ViewPort[ 'listenOnce' ]( X_EVENT_INIT, function(){ function X_Node_BoxModel_mesure( that, name ){ var flags = that[ '_flags' ], elm; - if( ( ( flags & X_NodeFlags_IN_TREE ) === 0 ) || ( flags & X_NodeFlags_STYLE_IS_DISPLAY_NONE ) ) return 0; + if( !this[ '_tag' ] || ( ( flags & X_NodeFlags_IN_TREE ) === 0 ) || ( flags & X_NodeFlags_STYLE_IS_DISPLAY_NONE ) ) return 0; X_Node_updateTimerID && X_Node_startUpdate(); diff --git a/0.6.x/js/02_dom/06_XNodeCSS.js b/0.6.x/js/02_dom/06_XNodeCSS.js index a951a50..28e337d 100644 --- a/0.6.x/js/02_dom/06_XNodeCSS.js +++ b/0.6.x/js/02_dom/06_XNodeCSS.js @@ -278,7 +278,9 @@ function X_Node_CSS_objToCssText( that, skipFilter ){ if( filterFix ){ v = X_Node_CSS_objToIEFilterText( that, filterFix ); - if( v ) css[ ++n ] = 'filter:' + v; + if( v ){ + css[ ++n ] = 'filter:' + v; + }; skipFilter = skipFilter && v; } else { skipFilter = false; @@ -584,6 +586,7 @@ function X_Node_CSS_setStyle( css, flags, name, newValue ){ return flags; case 'opacity' : + flags |= X_NodeFlags_IE8_OPACITY_FIX; // すでに visibility:hidden で invisible if( flags & X_NodeFlags_STYLE_IS_INVISIBLE && css[ 'visibility' ] === 'hidden' ) return flags; newValue == 0 ? // 0 or "0" diff --git a/0.6.x/js/02_dom/10_XNodeAnime.js b/0.6.x/js/02_dom/10_XNodeAnime.js index 31e853a..9458c38 100644 --- a/0.6.x/js/02_dom/10_XNodeAnime.js +++ b/0.6.x/js/02_dom/10_XNodeAnime.js @@ -452,7 +452,8 @@ function X_Node_Anime_getComputedPosition( that ){ if( style = ( raw.currentStyle || raw.style ) ){ x = parseFloat( style[ 'left' ] ); y = parseFloat( style[ 'top' ] ); - a = parseFloat( ( style[ 'filter' ] || 'opacity=1' ).split( 'opacity=' )[ 1 ] ); + a = that[ '_css' ] && 0 <= that[ '_css' ].opacity ? that[ '_css' ].opacity : 1; + //parseFloat( ( style[ 'filter' ] || 'opacity=1' ).split( 'opacity=' )[ 1 ] ); }; }; diff --git a/0.6.x/js/02_dom/20_XNode.js b/0.6.x/js/02_dom/20_XNode.js index 2576ae4..cc826b1 100644 --- a/0.6.x/js/02_dom/20_XNode.js +++ b/0.6.x/js/02_dom/20_XNode.js @@ -1381,10 +1381,10 @@ function X_Node_startUpdate( time ){ }; if( X_Node_html[ '_flags' ] & X_Node_BitMask_IS_DIRTY ){ - X_Node__commitUpdate( X_Node_html, X_Node_html[ '_rawObject' ].parentNode, null, X_Node_html[ '_flags' ] ); + X_Node__commitUpdate( X_Node_html, X_Node_html[ '_rawObject' ].parentNode, null, X_Node_html[ '_flags' ], 1 ); } else { - X_Node__commitUpdate( X_Node_head, X_Node_head[ '_rawObject' ].parentNode, null, X_Node_head[ '_flags' ] ); - X_Node__commitUpdate( X_Node_body, X_Node_body[ '_rawObject' ].parentNode, null, X_Node_body[ '_flags' ] ); + X_Node__commitUpdate( X_Node_head, X_Node_head[ '_rawObject' ].parentNode, null, X_Node_head[ '_flags' ], 1 ); + X_Node__commitUpdate( X_Node_body, X_Node_body[ '_rawObject' ].parentNode, null, X_Node_body[ '_flags' ], 1 ); }; if( X_Node_updateReservedByReleaseGPU ){ @@ -1417,7 +1417,7 @@ function X_Node_startUpdate( time ){ */ var X_Node__commitUpdate = X_UA_DOM.W3C ? - ( function( that, parentElement, nextElement, accumulatedFlags ){ + ( function( that, parentElement, nextElement, accumulatedFlags, ie8opacity ){ var elm = that[ '_rawObject' ], created, xnodes, l, next; @@ -1432,7 +1432,6 @@ var X_Node__commitUpdate = if( that[ '_flags' ] & X_NodeFlags_GPU_RELEASE_RESERVED ){ // console.log( 'GPU 解放 ' ); //X_Node_updateReservedByReleaseGPU = true; - //X_Node__updateRawNode( that, elm ); that[ '_flags' ] &= X_Node_BitMask_RESET_GPU; //return elm;// TODO もしかしたらこのタイミングで更新できるかも。 }; @@ -1550,10 +1549,12 @@ var X_Node__commitUpdate = that[ '_flags' ] |= X_NodeFlags_ACTUAL_LISTENING; }; + ie8opacity = ie8opacity * ( that[ '_css' ] && 0 <= that[ '_css' ].opacity ? that[ '_css' ].opacity : 1 ); + // 8. 更新の適用 if( accumulatedFlags & X_Node_BitMask_IS_DIRTY ){ delete that[ '_fontSize' ]; - X_Node__updateRawNode( that, elm ); + X_Node__updateRawNode( that, elm, ie8opacity, accumulatedFlags ); }; // 9. ie5 only @@ -1573,7 +1574,7 @@ var X_Node__commitUpdate = // 10. 子要素の更新。 if( ( xnodes = that[ '_xnodes' ] ) && ( l = xnodes.length ) ) { for( ; l; ){ - next = X_Node__commitUpdate( xnodes[ --l ], elm, next, accumulatedFlags ); + next = X_Node__commitUpdate( xnodes[ --l ], elm, next, accumulatedFlags, ie8opacity ); }; }; @@ -1688,8 +1689,8 @@ var X_Node__commitUpdate = */ var X_Node__updateRawNode = X_UA_DOM.W3C ? - ( function( that, elm ){ - var attrs, rename, k, v; + ( function( that, elm, ie8opacity, accumulatedFlags ){ + var attrs, rename, k, v, memory, f; // textNode if( !that[ '_tag' ] ){ @@ -1763,6 +1764,20 @@ var X_Node__updateRawNode = delete that[ '_newAttrs' ]; }; + if( accumulatedFlags & X_NodeFlags_IE8_OPACITY_FIX ){ + memory = that[ '_css' ] && that[ '_css' ].opacity; + if( f = true ){ + if( !that[ '_css' ] ) that[ '_css' ] = {}; + that[ '_css' ].opacity = ie8opacity; + if( that[ '_flags' ] & X_NodeFlags_DIRTY_CSS ){ + that[ '_flags' ] |= X_NodeFlags_OLD_CSSTEXT; + } else + if( !( that[ '_flags' ] & X_NodeFlags_DIRTY_IE_FILTER ) ){ + that[ '_flags' ] |= X_NodeFlags_DIRTY_IE_FILTER; + }; + }; + }; + // style if( that[ '_flags' ] & X_NodeFlags_DIRTY_CSS ){ if( that[ '_flags' ] & X_NodeFlags_OLD_CSSTEXT ? X_Node_CSS_objToCssText( that ) : that[ '_cssText' ] ){ @@ -1785,6 +1800,15 @@ var X_Node__updateRawNode = }; }; + if( f ){ + if( 0 <= memory ){ + that[ '_css' ].opacity = memory; + } else { + delete that[ '_css' ].opacity; + if( X_Object_isEmpty( that[ '_css' ] ) ) delete that[ '_css' ]; + }; + }; + that[ '_flags' ] &= X_Node_BitMask_RESET_DIRTY; }) : X_UA_DOM.IE4 ? @@ -1959,7 +1983,7 @@ var X_Node__actualRemove = that[ '_listeners' ] && X_EventDispatcher_toggleAllEvents( that, false );// イベントの退避 that[ '_flags' ] &= ~X_NodeFlags_ACTUAL_LISTENING; }; - + // ie5では filter の効いている要素をremove時に破棄して、再度append 時に新規生成する // ちなみに elm.filters に触ると ie8 でなぜかカラム落ちが発生、、、 if( X_Node_displayNoneFixForIE5 ){ @@ -1979,7 +2003,7 @@ var X_Node__actualRemove = if( !that[ '_attrs' ] ) that[ '_attrs' ] = {}; that[ '_attrs' ].selectedIndex = elm.selectedIndex; }; - if( that[ '_tag' ] === 'INPUT' && that._attr && ( that._attr.type === 'checkbox' || that._attr.type === 'radio' ) && ( !that[ '_newAttrs' ] || !X_Object_inObject( 'checked', that[ '_newAttrs' ] ) ) ){ + if( that[ '_tag' ] === 'INPUT' && that[ '_attrs' ] && ( that[ '_attrs' ].type === 'checkbox' || that[ '_attrs' ].type === 'radio' ) && ( !that[ '_newAttrs' ] || !X_Object_inObject( 'checked', that[ '_newAttrs' ] ) ) ){ if( !that[ '_attrs' ] ) that[ '_attrs' ] = {}; that[ '_attrs' ].checked = elm.checked; }; @@ -2022,7 +2046,7 @@ var X_Node__actualRemove = if( !that[ '_attrs' ] ) that[ '_attrs' ] = {}; that[ '_attrs' ].selectedIndex = elm.selectedIndex; }; - if( that[ '_tag' ] === 'INPUT' && that._attr && ( that._attr.type === 'checkbox' || that._attr.type === 'radio' ) && ( !that[ '_newAttrs' ] || !X_Object_inObject( 'checked', that[ '_newAttrs' ] ) ) ){ + if( that[ '_tag' ] === 'INPUT' && that[ '_attrs' ] && ( that[ '_attrs' ].type === 'checkbox' || that[ '_attrs' ].type === 'radio' ) && ( !that[ '_newAttrs' ] || !X_Object_inObject( 'checked', that[ '_newAttrs' ] ) ) ){ if( !that[ '_attrs' ] ) that[ '_attrs' ] = {}; that[ '_attrs' ].checked = elm.checked; }; diff --git a/0.6.x/js/02_dom/22_XTreeBuilder.js b/0.6.x/js/02_dom/22_XTreeBuilder.js index 530b094..5a205c7 100644 --- a/0.6.x/js/02_dom/22_XTreeBuilder.js +++ b/0.6.x/js/02_dom/22_XTreeBuilder.js @@ -311,7 +311,13 @@ X_TEMP.asyncCreateTree = function( parent, elems, elmProgress, async ){ // complete console.log( 'xtree 作成完了' ); X_ViewPort[ 'asyncDispatch' ]( X_EVENT_XTREE_READY ); - elmProgress.parentNode ? elmProgress.parentNode.removeChild( elmProgress ) : ( elmProgress.outerHTML = '' ); + + if( X_UA[ 'IE' ] < 6 ){ + // IE5.01 でビルド時間が短い時に removeChild を通るとエラー! + elmProgress.outerHTML = ''; + } else { + elmProgress.parentNode.removeChild( elmProgress ); + }; delete X_TEMP.asyncCreateTree; delete X_TEMP.bindElementToXnode; diff --git a/0.6.x/js/06_net/01_XNetXHR.js b/0.6.x/js/06_net/01_XNetXHR.js index 59e2f1c..4875e7e 100644 --- a/0.6.x/js/06_net/01_XNetXHR.js +++ b/0.6.x/js/06_net/01_XNetXHR.js @@ -84,8 +84,8 @@ var // Opera7.6+, Safari1.2+, khtml3.?+, Gecko0.9.7+ if( X_XHR_createMSXML ){ ( function(){ var x = '.XMLHTTP', - m = 'MSXML2' + x, - n = [ m + ".6.0", m + ".3.0", m + ".5.0", m + ".4.0", m, "Microsoft" + x ], + m = 'Msxml2' + x, + n = [ m + '.6.0', m + '.3.0', m + '.5.0', m + '.4.0', m, 'Microsoft' + x ], v = [ 6, 3, 5, 4, 2, 1 ], i = -1, a; @@ -399,7 +399,7 @@ if( X_XHR_w3c || X_XHR_msXML ){ 2: リクエストを受信した 3: リクエストの処理中 4: リクエストは終了してレスポンスの準備が完了 - status 200: "OK" + status 200: 'OK' 404: Page not found If-Modified-Sinceヘッダを利用してWebページのキャッシュを行うXMLHttpRequestラッパー @@ -535,7 +535,7 @@ if( X_XHR_w3c || X_XHR_msXML ){ // return: XML DOM in response body JKL.ParseXML.HTTP.prototype.documentElement = function() { - // debug.print( "documentElement: "+this.req ); + // debug.print( 'documentElement: '+this.req ); if ( ! this.req ) return; if ( this.req.responseXML ) { return this.req.responseXML.documentElement; // XMLHTTPRequest diff --git a/0.6.x/js/20_ui/06_AbstractUINode.js b/0.6.x/js/20_ui/06_AbstractUINode.js index c85dba5..025aac3 100644 --- a/0.6.x/js/20_ui/06_AbstractUINode.js +++ b/0.6.x/js/20_ui/06_AbstractUINode.js @@ -1009,23 +1009,15 @@ X.UI.AbstractUINode = X_Class_create( f = list[ i ]; switch( f.cbKind ){ case X_CLOSURE_THIS_FUNC : - if( f.lock ){ - X_EventDispatcher_systemListen( newNode, type, f.context === this ? newNode : f.context, f.func, f.supplement ); - } else { - newNode[ f.once ? 'listenOnce' : 'listen' ]( type, f.context === this ? newNode : f.context, f.func, f.supplement ); - }; + newNode[ f.once ? 'listenOnce' : 'listen' ]( type, f.context === this ? newNode : f.context, f.func, f.supplement ); break; case X_CLOSURE_HANDLEEVENT : - if( f.lock ){ - X_EventDispatcher_systemListen( newNode, type, f.context === this ? newNode : f.context, f.supplement ); - } else { - newNode[ f.once ? 'listenOnce' : 'listen' ]( type, f.context === this ? newNode : f.context, f.supplement ); - }; + newNode[ f.once ? 'listenOnce' : 'listen' ]( type, f.context === this ? newNode : f.context, f.supplement ); break; /* case X_CLOSURE_FUNC_ONLY : if( f.lock ){ - X_EventDispatcher_systemListen( newNode, type, f.func, f.supplement ); + newNode[ 'listen' ]( type, f.func, f.supplement ); } else { newNode[ f.once ? 'listenOnce' : 'listen' ]( type, f.func, f.supplement ); }; diff --git a/0.6.x/js/20_ui/20_Root.js b/0.6.x/js/20_ui/20_Root.js index 5c301e0..5cd2196 100644 --- a/0.6.x/js/20_ui/20_Root.js +++ b/0.6.x/js/20_ui/20_Root.js @@ -227,11 +227,6 @@ var XUI_Root = XUI_Box.inherits( updateCoursor : function( cursor ){ - }, - - _remove : function(){ - X_EventDispatcher_unlistenAll( XUI_xnodeInteractionOverlay ); - _Box.prototype._remove.call( this ); } } ); diff --git a/0.6.x/js/main.js b/0.6.x/js/main.js index d1e1e22..5374ab8 100644 --- a/0.6.x/js/main.js +++ b/0.6.x/js/main.js @@ -90,6 +90,26 @@ X( function(){ summary : X.UA.Windows ? 'Windows ' + X.UA.Windows : X.UA.Mac ? 'Mac' : X.UA.Android ? 'Android' : X.UA.iOS ? 'iOS' : 'Other' }, { + label : 'IE6専用 背景画像ちらつき対処', + summary : X.Doc.ieExeComError ? 'error!' : X.UA.IE6 ? 'success!' : '-' + }, + { + label : 'SVG', + summary : X.Doc.SVG ? 'o' : '-' + }, + { + label : 'VML', + summary : X.Doc.VML || '-' + }, + { + label : 'XHR', + summary : + X.XHR.XDR ? ( X.XHR.MSXML ? 'W3C+XDR+MSXML' + X.XHR.MSXML : 'W3C+XDR' ) : + X.XHR.W3C ? ( X.XHR.CORS ? 'W3C Lv2' : 'W3C' ) : + X.XHR.MSXML ? 'MSXML' + X.XHR.MSXML : + X.XHR.FLASH ? 'Flash' + X.XHR.FLASH : '' + }, + { label : 'ユーザーエージェント文字列', summary : navigator.userAgent }, @@ -230,3 +250,5 @@ var AndroidItem = X.UI.Box.inherits( } ); + + -- 2.11.0