X_ViewPort_vScrollbarSize,
X_ViewPort_hScrollbarSize,
- X_Dom_detectFontSize = !( X_UA[ 'IE' ] < 9 || X_UA[ 'iOS' ] ) && function(){
+ X_ViewPort_useDetectionLoop = X_UA[ 'IE' ] < 9 || X_UA[ 'iOS' ],
+ X_ViewPort_detectFontSize = !X_ViewPort_useDetectionLoop && function(){
var size = X_Node_fontSizeNode[ '_rawObject' ].offsetHeight;
if( X_ViewPort_baseFontSize !== size ){
X_ViewPort_baseFontSize = size;
},
X_ViewPort_orientationFlag,
- X_Dom_orientationchange = window[ 'orientation' ] !== undefined && function( e ){
+ X_ViewPort_orientationchange = window[ 'orientation' ] !== undefined && function( e ){
X_ViewPort_orientationFlag = true;
!X_UA[ 'Android' ] && X_ViewPort_resize();
//console.log( '-- orientationchange : ' + X[ 'ViewPort' ][ 'getSize' ][ 0 ] + ' ' + X[ 'ViewPort' ][ 'getSize' ][ 1 ] );
*/
var X_ViewPort_resize =
// iOS もループで回す,,,iOS3.1.3, iOS6 で確認
- X_UA[ 'IE' ] < 9 || X_UA[ 'iOS' ] ?
+ X_ViewPort_useDetectionLoop ?
(function(){
var size;
if( !X_ViewPort_lock ){
if( X_ViewPort_width !== size[ 0 ] || X_ViewPort_height !== size[ 1 ] ){
X_ViewPort_width = size[ 0 ];
X_ViewPort_height = size[ 1 ];
- X_Timer_once( 100, X_Dom_detectFinishResizing );
+ X_Timer_once( 100, X_ViewPort_detectFinishResizing );
X_ViewPort_lock = true;
};
};
(function( e ){
console.log( '-- resize : ' + X_Timer_now() );
- !X_ViewPort_lock && ( X_ViewPort_lock = true ) && X_Timer_once( 100, X_Dom_detectFinishResizing );
+ !X_ViewPort_lock && ( X_ViewPort_lock = true ) && X_Timer_once( 100, X_ViewPort_detectFinishResizing );
return X_Callback_PREVENT_DEFAULT | X_Callback_STOP_PROPAGATION;
});
- function X_Dom_detectFinishResizing(){
+ function X_ViewPort_detectFinishResizing(){
var size = X_ViewPort_getWindowSize();
if( X_ViewPort_width !== size[ 0 ] || X_ViewPort_height !== size[ 1 ] ){
X_ViewPort_width = size[ 0 ];
X_ViewPort_height = size[ 1 ];
- X_Timer_once( 100, X_Dom_detectFinishResizing );
+ X_Timer_once( 100, X_ViewPort_detectFinishResizing );
} else {
console.log( '-- detectFinishResizing : ' + X_Timer_now() );
X_ViewPort_rootElement = document.compatMode !== 'CSS1Compat' ? elmBody : elmHtml || elmBody;
- html = X[ 'Doc' ][ 'html' ] = X_Node_html = elmHtml && new Node( elmHtml );
+ html = X[ 'Doc' ][ 'html' ] = X_Node_html = elmHtml && new Node( elmHtml ).removeClass( 'js-disabled' ).addClass( X_UA_classNameForHTML );
html[ '_flags' ] |= X_Node_State.IN_TREE;
head = X[ 'Doc' ][ 'head' ] = X_Node_head = elmHead && new Node( elmHead );
};
//
- if( X_Dom_orientationchange ){
- X_EventDispatcher_systemListen( X_ViewPort, 'orientationchange', X_Dom_orientationchange );
+ if( X_ViewPort_orientationchange ){
+ X_EventDispatcher_systemListen( X_ViewPort, 'orientationchange', X_ViewPort_orientationchange );
};
- if( X_Dom_detectFontSize ){
+ if( X_ViewPort_detectFontSize ){
X_EventDispatcher_systemListen( X_ViewPort, 'resize', X_ViewPort_resize );
- X_Timer_add( 333, X_Dom_detectFontSize );
+ X_Timer_add( 333, X_ViewPort_detectFontSize );
} else {
X_Timer_add( 333, X_ViewPort_resize );
};
};
function X_ViewPort_getWindowSize(){
- return X_UA[ 'IE' ] ?
+ return X_UA[ 'IE' ] ? // Opera10.1 では ズーム時に表示領域のサイズが取れない!
[ X_ViewPort_rootElement.clientWidth, X_ViewPort_rootElement.clientHeight ] :
+ X_UA[ 'Opera' ] < 12 ? // Opera10.1 では ズーム + resize 時に表示領域のサイズが取れない!
+ [ X_ViewPort_rootElement.offsetWidth, X_ViewPort_rootElement.offsetHeight ] :
[ window.innerWidth, window.innerHeight ];
};