Rev 130 Rev 139
1 /* 1 /*
2 IE7, version 0.9 (alpha) (2005-08-19) 2 IE7, version 0.9 (alpha) (2005-08-19)
3 Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/) 3 Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
4 License: http://creativecommons.org/licenses/LGPL/2.1/ 4 License: http://creativecommons.org/licenses/LGPL/2.1/
5 */ 5 */
6 IE7.addModule("ie7-recalc",function(){C=/\sie7_class\d+/g;function _0(e){e.className=e.className.replace(C,"")};function _1(e){e.runtimeStyle.cssText=""};ie7CSS.specialize({elements:{},handlers:[],reset:function(){this.removeEventHandlers();var e=this.elements;for(var i in e)_1(e[i]);this.elements={};if(this.Rule){var e=this.Rule.elements;for(var i in e)_0(e[i]);this.Rule.elements={}}},reload:function(){ie7CSS.rules=[];this.getInlineStyles();this.screen.load();if(this.print)this.print.load();this.refresh();this.trash()},addRecalc:function(p,t,h,r){this.inherit(p,t,function(e){h(e);ie7CSS.elements[e.uniqueID]=e},r)},recalc:function(){this.reset();this.inherit()},addEventHandler:function(e,t,h){e.attachEvent(t,h);this.handlers.push(arguments)},removeEventHandlers:function(){var h;while(h=this.handlers.pop()){removeEventHandler(h[0],h[1],h[2])}},getInlineStyles:function(){var st=document.getElementsByTagName("style"),s;for(var i=st.length-1;(s=st[i]);i--){if(!s.disabled&&!s.ie7){var c=s.c||s.innerHTML;this.styles.push(c);s.c=c}}},trash:function(){var s,i;for(i=0;i<styleSheets.length;i++){s=styleSheets[i];if(!s.ie7&&!s.c){s.c=s.cssText}}this.inherit()},getText:function(s){return s.c||this.inherit(s)}});addEventHandler(window,"onunload",function(){ie7CSS.removeEventHandlers()});if(ie7CSS.Rule){ie7CSS.Rule.elements={};ie7CSS.Rule.prototype.specialize({add:function(e){this.inherit(e);ie7CSS.Rule.elements[e.uniqueID]=e}});ie7CSS.PseudoElement.hash={};ie7CSS.PseudoElement.prototype.specialize({create:function(t){var k=this.selector+":"+t.uniqueID;if(!ie7CSS.PseudoElement.hash[k]){ie7CSS.PseudoElement.hash[k]=true;this.inherit(t)}}})}if(isHTML&&ie7HTML){ie7HTML.specialize({elements:{},addRecalc:function(s,h){this.inherit(s,function(e){if(!ie7HTML.elements[e.uniqueID]){h(e);ie7HTML.elements[e.uniqueID]=e}})}})}document.recalc=function(reload){if(ie7CSS.screen){if(reload)ie7CSS.reload();recalc()}}}); 6 IE7.addModule("ie7-recalc",function(){C=/\sie7_class\d+/g;function _0(e){e.className=e.className.replace(C,"")};function _1(e){e.runtimeStyle.cssText=""};ie7CSS.specialize({elements:{},handlers:[],reset:function(){this.removeEventHandlers();var e=this.elements;for(var i in e)_1(e[i]);this.elements={};if(this.Rule){var e=this.Rule.elements;for(var i in e)_0(e[i]);this.Rule.elements={}}},reload:function(){ie7CSS.rules=[];this.getInlineStyles();this.screen.load();if(this.print)this.print.load();this.refresh();this.trash()},addRecalc:function(p,t,h,r){this.inherit(p,t,function(e){h(e);ie7CSS.elements[e.uniqueID]=e},r)},recalc:function(){this.reset();this.inherit()},addEventHandler:function(e,t,h){e.attachEvent(t,h);this.handlers.push(arguments)},removeEventHandlers:function(){var h;while(h=this.handlers.pop()){removeEventHandler(h[0],h[1],h[2])}},getInlineStyles:function(){var st=document.getElementsByTagName("style"),s;for(var i=st.length-1;(s=st[i]);i--){if(!s.disabled&&!s.ie7){var c=s.c||s.innerHTML;this.styles.push(c);s.c=c}}},trash:function(){var s,i;for(i=0;i<styleSheets.length;i++){s=styleSheets[i];if(!s.ie7&&!s.c){s.c=s.cssText}}this.inherit()},getText:function(s){return s.c||this.inherit(s)}});addEventHandler(window,"onunload",function(){ie7CSS.removeEventHandlers()});if(ie7CSS.Rule){ie7CSS.Rule.elements={};ie7CSS.Rule.prototype.specialize({add:function(e){this.inherit(e);ie7CSS.Rule.elements[e.uniqueID]=e}});ie7CSS.PseudoElement.hash={};ie7CSS.PseudoElement.prototype.specialize({create:function(t){var k=this.selector+":"+t.uniqueID;if(!ie7CSS.PseudoElement.hash[k]){ie7CSS.PseudoElement.hash[k]=true;this.inherit(t)}}})}if(isHTML&&ie7HTML){ie7HTML.specialize({elements:{},addRecalc:function(s,h){this.inherit(s,function(e){if(!ie7HTML.elements[e.uniqueID]){h(e);ie7HTML.elements[e.uniqueID]=e}})}})}document.recalc=function(reload){if(ie7CSS.screen){if(reload)ie7CSS.reload();recalc()}}});