src/cm/media/js/lib/yui/yui_3.10.3/build/widget-stack/widget-stack-coverage.js
author Yves-Marie Haussonne <ymh.work+github@gmail.com>
Fri, 09 May 2014 18:35:26 +0200
changeset 656 a84519031134
parent 525 89ef5ed3c48b
permissions -rw-r--r--
add link to "privacy policy" in the header test

/*
YUI 3.10.3 (build 2fb5187)
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/

if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
if (!__coverage__['build/widget-stack/widget-stack.js']) {
   __coverage__['build/widget-stack/widget-stack.js'] = {"path":"build/widget-stack/widget-stack.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":43}}},"2":{"name":"Stack","line":56,"loc":{"start":{"line":56,"column":4},"end":{"line":56,"column":27}}},"3":{"name":"(anonymous_3)","line":109,"loc":{"start":{"line":109,"column":16},"end":{"line":109,"column":35}}},"4":{"name":"(anonymous_4)","line":152,"loc":{"start":{"line":152,"column":22},"end":{"line":152,"column":33}}},"5":{"name":"(anonymous_5)","line":167,"loc":{"start":{"line":167,"column":22},"end":{"line":167,"column":33}}},"6":{"name":"(anonymous_6)","line":181,"loc":{"start":{"line":181,"column":24},"end":{"line":181,"column":35}}},"7":{"name":"(anonymous_7)","line":193,"loc":{"start":{"line":193,"column":22},"end":{"line":193,"column":41}}},"8":{"name":"(anonymous_8)","line":229,"loc":{"start":{"line":229,"column":20},"end":{"line":229,"column":37}}},"9":{"name":"(anonymous_9)","line":247,"loc":{"start":{"line":247,"column":27},"end":{"line":247,"column":39}}},"10":{"name":"(anonymous_10)","line":259,"loc":{"start":{"line":259,"column":29},"end":{"line":259,"column":41}}},"11":{"name":"(anonymous_11)","line":270,"loc":{"start":{"line":270,"column":22},"end":{"line":270,"column":40}}},"12":{"name":"(anonymous_12)","line":282,"loc":{"start":{"line":282,"column":20},"end":{"line":282,"column":38}}},"13":{"name":"(anonymous_13)","line":310,"loc":{"start":{"line":310,"column":30},"end":{"line":310,"column":41}}},"14":{"name":"(anonymous_14)","line":315,"loc":{"start":{"line":315,"column":38},"end":{"line":315,"column":50}}},"15":{"name":"(anonymous_15)","line":339,"loc":{"start":{"line":339,"column":33},"end":{"line":339,"column":44}}},"16":{"name":"(anonymous_16)","line":359,"loc":{"start":{"line":359,"column":30},"end":{"line":359,"column":50}}},"17":{"name":"(anonymous_17)","line":376,"loc":{"start":{"line":376,"column":22},"end":{"line":376,"column":33}}},"18":{"name":"(anonymous_18)","line":396,"loc":{"start":{"line":396,"column":23},"end":{"line":396,"column":34}}},"19":{"name":"(anonymous_19)","line":413,"loc":{"start":{"line":413,"column":18},"end":{"line":413,"column":30}}},"20":{"name":"(anonymous_20)","line":430,"loc":{"start":{"line":430,"column":27},"end":{"line":430,"column":38}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":438,"column":72}},"2":{"start":{"line":8,"column":4},"end":{"line":46,"column":28}},"3":{"start":{"line":56,"column":4},"end":{"line":64,"column":5}},"4":{"start":{"line":57,"column":8},"end":{"line":57,"column":49}},"5":{"start":{"line":58,"column":8},"end":{"line":58,"column":32}},"6":{"start":{"line":61,"column":8},"end":{"line":61,"column":54}},"7":{"start":{"line":62,"column":8},"end":{"line":62,"column":50}},"8":{"start":{"line":63,"column":8},"end":{"line":63,"column":50}},"9":{"start":{"line":75,"column":4},"end":{"line":99,"column":6}},"10":{"start":{"line":108,"column":4},"end":{"line":112,"column":6}},"11":{"start":{"line":110,"column":12},"end":{"line":110,"column":46}},"12":{"start":{"line":122,"column":4},"end":{"line":122,"column":54}},"13":{"start":{"line":132,"column":4},"end":{"line":132,"column":60}},"14":{"start":{"line":141,"column":4},"end":{"line":141,"column":186}},"15":{"start":{"line":143,"column":4},"end":{"line":433,"column":6}},"16":{"start":{"line":153,"column":12},"end":{"line":153,"column":44}},"17":{"start":{"line":154,"column":12},"end":{"line":154,"column":48}},"18":{"start":{"line":168,"column":12},"end":{"line":168,"column":58}},"19":{"start":{"line":169,"column":12},"end":{"line":169,"column":62}},"20":{"start":{"line":182,"column":12},"end":{"line":182,"column":63}},"21":{"start":{"line":194,"column":12},"end":{"line":194,"column":23}},"22":{"start":{"line":205,"column":12},"end":{"line":211,"column":13}},"23":{"start":{"line":206,"column":16},"end":{"line":206,"column":32}},"24":{"start":{"line":210,"column":16},"end":{"line":210,"column":60}},"25":{"start":{"line":217,"column":12},"end":{"line":217,"column":53}},"26":{"start":{"line":230,"column":12},"end":{"line":232,"column":13}},"27":{"start":{"line":231,"column":16},"end":{"line":231,"column":46}},"28":{"start":{"line":233,"column":12},"end":{"line":235,"column":13}},"29":{"start":{"line":234,"column":16},"end":{"line":234,"column":27}},"30":{"start":{"line":236,"column":12},"end":{"line":236,"column":26}},"31":{"start":{"line":248,"column":12},"end":{"line":248,"column":38}},"32":{"start":{"line":260,"column":12},"end":{"line":260,"column":40}},"33":{"start":{"line":271,"column":12},"end":{"line":271,"column":53}},"34":{"start":{"line":283,"column":12},"end":{"line":300,"column":13}},"35":{"start":{"line":285,"column":16},"end":{"line":289,"column":17}},"36":{"start":{"line":286,"column":20},"end":{"line":286,"column":39}},"37":{"start":{"line":288,"column":20},"end":{"line":288,"column":47}},"38":{"start":{"line":295,"column":16},"end":{"line":297,"column":17}},"39":{"start":{"line":296,"column":20},"end":{"line":296,"column":50}},"40":{"start":{"line":299,"column":16},"end":{"line":299,"column":36}},"41":{"start":{"line":312,"column":12},"end":{"line":312,"column":88}},"42":{"start":{"line":314,"column":12},"end":{"line":319,"column":18}},"43":{"start":{"line":316,"column":20},"end":{"line":318,"column":21}},"44":{"start":{"line":317,"column":24},"end":{"line":317,"column":43}},"45":{"start":{"line":321,"column":12},"end":{"line":321,"column":70}},"46":{"start":{"line":341,"column":12},"end":{"line":341,"column":84}},"47":{"start":{"line":343,"column":12},"end":{"line":344,"column":58}},"48":{"start":{"line":346,"column":12},"end":{"line":346,"column":62}},"49":{"start":{"line":347,"column":12},"end":{"line":347,"column":60}},"50":{"start":{"line":348,"column":12},"end":{"line":348,"column":61}},"51":{"start":{"line":349,"column":12},"end":{"line":349,"column":62}},"52":{"start":{"line":360,"column":12},"end":{"line":361,"column":23}},"53":{"start":{"line":363,"column":12},"end":{"line":367,"column":13}},"54":{"start":{"line":364,"column":16},"end":{"line":366,"column":17}},"55":{"start":{"line":365,"column":20},"end":{"line":365,"column":36}},"56":{"start":{"line":377,"column":12},"end":{"line":378,"column":42}},"57":{"start":{"line":380,"column":12},"end":{"line":386,"column":13}},"58":{"start":{"line":381,"column":16},"end":{"line":381,"column":66}},"59":{"start":{"line":382,"column":16},"end":{"line":382,"column":71}},"60":{"start":{"line":384,"column":16},"end":{"line":384,"column":56}},"61":{"start":{"line":385,"column":16},"end":{"line":385,"column":32}},"62":{"start":{"line":397,"column":12},"end":{"line":403,"column":13}},"63":{"start":{"line":398,"column":16},"end":{"line":398,"column":76}},"64":{"start":{"line":399,"column":16},"end":{"line":399,"column":38}},"65":{"start":{"line":401,"column":16},"end":{"line":401,"column":56}},"66":{"start":{"line":402,"column":16},"end":{"line":402,"column":54}},"67":{"start":{"line":414,"column":12},"end":{"line":415,"column":39}},"68":{"start":{"line":417,"column":12},"end":{"line":420,"column":13}},"69":{"start":{"line":418,"column":16},"end":{"line":418,"column":66}},"70":{"start":{"line":419,"column":16},"end":{"line":419,"column":68}},"71":{"start":{"line":431,"column":12},"end":{"line":431,"column":89}},"72":{"start":{"line":435,"column":4},"end":{"line":435,"column":26}}},"branchMap":{"1":{"line":205,"type":"if","locations":[{"start":{"line":205,"column":12},"end":{"line":205,"column":12}},{"start":{"line":205,"column":12},"end":{"line":205,"column":12}}]},"2":{"line":205,"type":"binary-expr","locations":[{"start":{"line":205,"column":16},"end":{"line":205,"column":32}},{"start":{"line":205,"column":36},"end":{"line":205,"column":77}}]},"3":{"line":217,"type":"cond-expr","locations":[{"start":{"line":217,"column":39},"end":{"line":217,"column":43}},{"start":{"line":217,"column":46},"end":{"line":217,"column":52}}]},"4":{"line":230,"type":"if","locations":[{"start":{"line":230,"column":12},"end":{"line":230,"column":12}},{"start":{"line":230,"column":12},"end":{"line":230,"column":12}}]},"5":{"line":233,"type":"if","locations":[{"start":{"line":233,"column":12},"end":{"line":233,"column":12}},{"start":{"line":233,"column":12},"end":{"line":233,"column":12}}]},"6":{"line":283,"type":"if","locations":[{"start":{"line":283,"column":12},"end":{"line":283,"column":12}},{"start":{"line":283,"column":12},"end":{"line":283,"column":12}}]},"7":{"line":285,"type":"if","locations":[{"start":{"line":285,"column":16},"end":{"line":285,"column":16}},{"start":{"line":285,"column":16},"end":{"line":285,"column":16}}]},"8":{"line":295,"type":"if","locations":[{"start":{"line":295,"column":16},"end":{"line":295,"column":16}},{"start":{"line":295,"column":16},"end":{"line":295,"column":16}}]},"9":{"line":312,"type":"binary-expr","locations":[{"start":{"line":312,"column":48},"end":{"line":312,"column":81}},{"start":{"line":312,"column":85},"end":{"line":312,"column":87}}]},"10":{"line":316,"type":"if","locations":[{"start":{"line":316,"column":20},"end":{"line":316,"column":20}},{"start":{"line":316,"column":20},"end":{"line":316,"column":20}}]},"11":{"line":341,"type":"binary-expr","locations":[{"start":{"line":341,"column":46},"end":{"line":341,"column":77}},{"start":{"line":341,"column":81},"end":{"line":341,"column":83}}]},"12":{"line":363,"type":"if","locations":[{"start":{"line":363,"column":12},"end":{"line":363,"column":12}},{"start":{"line":363,"column":12},"end":{"line":363,"column":12}}]},"13":{"line":363,"type":"binary-expr","locations":[{"start":{"line":363,"column":16},"end":{"line":363,"column":23}},{"start":{"line":363,"column":27},"end":{"line":363,"column":45}}]},"14":{"line":380,"type":"if","locations":[{"start":{"line":380,"column":12},"end":{"line":380,"column":12}},{"start":{"line":380,"column":12},"end":{"line":380,"column":12}}]},"15":{"line":397,"type":"if","locations":[{"start":{"line":397,"column":12},"end":{"line":397,"column":12}},{"start":{"line":397,"column":12},"end":{"line":397,"column":12}}]},"16":{"line":417,"type":"if","locations":[{"start":{"line":417,"column":12},"end":{"line":417,"column":12}},{"start":{"line":417,"column":12},"end":{"line":417,"column":12}}]},"17":{"line":417,"type":"binary-expr","locations":[{"start":{"line":417,"column":16},"end":{"line":417,"column":20}},{"start":{"line":417,"column":24},"end":{"line":417,"column":35}},{"start":{"line":417,"column":39},"end":{"line":417,"column":56}}]}},"code":["(function () { YUI.add('widget-stack', function (Y, NAME) {","","/**"," * Provides stackable (z-index) support for Widgets through an extension."," *"," * @module widget-stack"," */","    var L = Y.Lang,","        UA = Y.UA,","        Node = Y.Node,","        Widget = Y.Widget,","","        ZINDEX = \"zIndex\",","        SHIM = \"shim\",","        VISIBLE = \"visible\",","","        BOUNDING_BOX = \"boundingBox\",","","        RENDER_UI = \"renderUI\",","        BIND_UI = \"bindUI\",","        SYNC_UI = \"syncUI\",","","        OFFSET_WIDTH = \"offsetWidth\",","        OFFSET_HEIGHT = \"offsetHeight\",","        PARENT_NODE = \"parentNode\",","        FIRST_CHILD = \"firstChild\",","        OWNER_DOCUMENT = \"ownerDocument\",","","        WIDTH = \"width\",","        HEIGHT = \"height\",","        PX = \"px\",","","        // HANDLE KEYS","        SHIM_DEFERRED = \"shimdeferred\",","        SHIM_RESIZE = \"shimresize\",","","        // Events","        VisibleChange = \"visibleChange\",","        WidthChange = \"widthChange\",","        HeightChange = \"heightChange\",","        ShimChange = \"shimChange\",","        ZIndexChange = \"zIndexChange\",","        ContentUpdate = \"contentUpdate\",","","        // CSS","        STACKED = \"stacked\";","","    /**","     * Widget extension, which can be used to add stackable (z-index) support to the","     * base Widget class along with a shimming solution, through the","     * <a href=\"Base.html#method_build\">Base.build</a> method.","     *","     * @class WidgetStack","     * @param {Object} User configuration object","     */","    function Stack(config) {","        this._stackNode = this.get(BOUNDING_BOX);","        this._stackHandles = {};","","        // WIDGET METHOD OVERLAP","        Y.after(this._renderUIStack, this, RENDER_UI);","        Y.after(this._syncUIStack, this, SYNC_UI);","        Y.after(this._bindUIStack, this, BIND_UI);","    }","","    // Static Properties","    /**","     * Static property used to define the default attribute","     * configuration introduced by WidgetStack.","     *","     * @property ATTRS","     * @type Object","     * @static","     */","    Stack.ATTRS = {","        /**","         * @attribute shim","         * @type boolean","         * @default false, for all browsers other than IE6, for which a shim is enabled by default.","         *","         * @description Boolean flag to indicate whether or not a shim should be added to the Widgets","         * boundingBox, to protect it from select box bleedthrough.","         */","        shim: {","            value: (UA.ie == 6)","        },","","        /**","         * @attribute zIndex","         * @type number","         * @default 0","         * @description The z-index to apply to the Widgets boundingBox. Non-numerical values for","         * zIndex will be converted to 0","         */","        zIndex: {","            value : 0,","            setter: '_setZIndex'","        }","    };","","    /**","     * The HTML parsing rules for the WidgetStack class.","     *","     * @property HTML_PARSER","     * @static","     * @type Object","     */","    Stack.HTML_PARSER = {","        zIndex: function (srcNode) {","            return this._parseZIndex(srcNode);","        }","    };","","    /**","     * Default class used to mark the shim element","     *","     * @property SHIM_CLASS_NAME","     * @type String","     * @static","     * @default \"yui3-widget-shim\"","     */","    Stack.SHIM_CLASS_NAME = Widget.getClassName(SHIM);","","    /**","     * Default class used to mark the boundingBox of a stacked widget.","     *","     * @property STACKED_CLASS_NAME","     * @type String","     * @static","     * @default \"yui3-widget-stacked\"","     */","    Stack.STACKED_CLASS_NAME = Widget.getClassName(STACKED);","","    /**","     * Default markup template used to generate the shim element.","     *","     * @property SHIM_TEMPLATE","     * @type String","     * @static","     */","    Stack.SHIM_TEMPLATE = '<iframe class=\"' + Stack.SHIM_CLASS_NAME + '\" frameborder=\"0\" title=\"Widget Stacking Shim\" src=\"javascript:false\" tabindex=\"-1\" role=\"presentation\"></iframe>';","","    Stack.prototype = {","","        /**","         * Synchronizes the UI to match the Widgets stack state. This method in","         * invoked after syncUI is invoked for the Widget class using YUI's aop infrastructure.","         *","         * @method _syncUIStack","         * @protected","         */","        _syncUIStack: function() {","            this._uiSetShim(this.get(SHIM));","            this._uiSetZIndex(this.get(ZINDEX));","        },","","        /**","         * Binds event listeners responsible for updating the UI state in response to","         * Widget stack related state changes.","         * <p>","         * This method is invoked after bindUI is invoked for the Widget class","         * using YUI's aop infrastructure.","         * </p>","         * @method _bindUIStack","         * @protected","         */","        _bindUIStack: function() {","            this.after(ShimChange, this._afterShimChange);","            this.after(ZIndexChange, this._afterZIndexChange);","        },","","        /**","         * Creates/Initializes the DOM to support stackability.","         * <p>","         * This method in invoked after renderUI is invoked for the Widget class","         * using YUI's aop infrastructure.","         * </p>","         * @method _renderUIStack","         * @protected","         */","        _renderUIStack: function() {","            this._stackNode.addClass(Stack.STACKED_CLASS_NAME);","        },","","        /**","        Parses a `zIndex` attribute value from this widget's `srcNode`.","","        @method _parseZIndex","        @param {Node} srcNode The node to parse a `zIndex` value from.","        @return {Mixed} The parsed `zIndex` value.","        @protected","        **/","        _parseZIndex: function (srcNode) {","            var zIndex;","","            // Prefers how WebKit handles `z-index` which better matches the","            // spec:","            //","            // * http://www.w3.org/TR/CSS2/visuren.html#z-index","            // * https://bugs.webkit.org/show_bug.cgi?id=15562","            //","            // When a node isn't rendered in the document, and/or when a","            // node is not positioned, then it doesn't have a context to derive","            // a valid `z-index` value from.","            if (!srcNode.inDoc() || srcNode.getStyle('position') === 'static') {","                zIndex = 'auto';","            } else {","                // Uses `getComputedStyle()` because it has greater accuracy in","                // more browsers than `getStyle()` does for `z-index`.","                zIndex = srcNode.getComputedStyle('zIndex');","            }","","            // This extension adds a stacking context to widgets, therefore a","            // `srcNode` witout a stacking context (i.e. \"auto\") will return","            // `null` from this DOM parser. This way the widget's default or","            // user provided value for `zIndex` will be used.","            return zIndex === 'auto' ? null : zIndex;","        },","","        /**","         * Default setter for zIndex attribute changes. Normalizes zIndex values to","         * numbers, converting non-numerical values to 0.","         *","         * @method _setZIndex","         * @protected","         * @param {String | Number} zIndex","         * @return {Number} Normalized zIndex","         */","        _setZIndex: function(zIndex) {","            if (L.isString(zIndex)) {","                zIndex = parseInt(zIndex, 10);","            }","            if (!L.isNumber(zIndex)) {","                zIndex = 0;","            }","            return zIndex;","        },","","        /**","         * Default attribute change listener for the shim attribute, responsible","         * for updating the UI, in response to attribute changes.","         *","         * @method _afterShimChange","         * @protected","         * @param {EventFacade} e The event facade for the attribute change","         */","        _afterShimChange : function(e) {","            this._uiSetShim(e.newVal);","        },","","        /**","         * Default attribute change listener for the zIndex attribute, responsible","         * for updating the UI, in response to attribute changes.","         *","         * @method _afterZIndexChange","         * @protected","         * @param {EventFacade} e The event facade for the attribute change","         */","        _afterZIndexChange : function(e) {","            this._uiSetZIndex(e.newVal);","        },","","        /**","         * Updates the UI to reflect the zIndex value passed in.","         *","         * @method _uiSetZIndex","         * @protected","         * @param {number} zIndex The zindex to be reflected in the UI","         */","        _uiSetZIndex: function (zIndex) {","            this._stackNode.setStyle(ZINDEX, zIndex);","        },","","        /**","         * Updates the UI to enable/disable the shim. If the widget is not currently visible,","         * creation of the shim is deferred until it is made visible, for performance reasons.","         *","         * @method _uiSetShim","         * @protected","         * @param {boolean} enable If true, creates/renders the shim, if false, removes it.","         */","        _uiSetShim: function (enable) {","            if (enable) {","                // Lazy creation","                if (this.get(VISIBLE)) {","                    this._renderShim();","                } else {","                    this._renderShimDeferred();","                }","","                // Eagerly attach resize handlers","                //","                // Required because of Event stack behavior, commit ref: cd8dddc","                // Should be revisted after Ticket #2531067 is resolved.","                if (UA.ie == 6) {","                    this._addShimResizeHandlers();","                }","            } else {","                this._destroyShim();","            }","        },","","        /**","         * Sets up change handlers for the visible attribute, to defer shim creation/rendering","         * until the Widget is made visible.","         *","         * @method _renderShimDeferred","         * @private","         */","        _renderShimDeferred : function() {","","            this._stackHandles[SHIM_DEFERRED] = this._stackHandles[SHIM_DEFERRED] || [];","","            var handles = this._stackHandles[SHIM_DEFERRED],","                createBeforeVisible = function(e) {","                    if (e.newVal) {","                        this._renderShim();","                    }","                };","","            handles.push(this.on(VisibleChange, createBeforeVisible));","            // Depending how how Ticket #2531067 is resolved, a reversal of","            // commit ref: cd8dddc could lead to a more elagent solution, with","            // the addition of this line here:","            //","            // handles.push(this.after(VisibleChange, this.sizeShim));","        },","","        /**","         * Sets up event listeners to resize the shim when the size of the Widget changes.","         * <p>","         * NOTE: This method is only used for IE6 currently, since IE6 doesn't support a way to","         * resize the shim purely through CSS, when the Widget does not have an explicit width/height","         * set.","         * </p>","         * @method _addShimResizeHandlers","         * @private","         */","        _addShimResizeHandlers : function() {","","            this._stackHandles[SHIM_RESIZE] = this._stackHandles[SHIM_RESIZE] || [];","","            var sizeShim = this.sizeShim,","                handles = this._stackHandles[SHIM_RESIZE];","","            handles.push(this.after(VisibleChange, sizeShim));","            handles.push(this.after(WidthChange, sizeShim));","            handles.push(this.after(HeightChange, sizeShim));","            handles.push(this.after(ContentUpdate, sizeShim));","        },","","        /**","         * Detaches any handles stored for the provided key","         *","         * @method _detachStackHandles","         * @param String handleKey The key defining the group of handles which should be detached","         * @private","         */","        _detachStackHandles : function(handleKey) {","            var handles = this._stackHandles[handleKey],","                handle;","","            if (handles && handles.length > 0) {","                while((handle = handles.pop())) {","                    handle.detach();","                }","            }","        },","","        /**","         * Creates the shim element and adds it to the DOM","         *","         * @method _renderShim","         * @private","         */","        _renderShim : function() {","            var shimEl = this._shimNode,","                stackEl = this._stackNode;","","            if (!shimEl) {","                shimEl = this._shimNode = this._getShimTemplate();","                stackEl.insertBefore(shimEl, stackEl.get(FIRST_CHILD));","","                this._detachStackHandles(SHIM_DEFERRED);","                this.sizeShim();","            }","        },","","        /**","         * Removes the shim from the DOM, and detaches any related event","         * listeners.","         *","         * @method _destroyShim","         * @private","         */","        _destroyShim : function() {","            if (this._shimNode) {","                this._shimNode.get(PARENT_NODE).removeChild(this._shimNode);","                this._shimNode = null;","","                this._detachStackHandles(SHIM_DEFERRED);","                this._detachStackHandles(SHIM_RESIZE);","            }","        },","","        /**","         * For IE6, synchronizes the size and position of iframe shim to that of","         * Widget bounding box which it is protecting. For all other browsers,","         * this method does not do anything.","         *","         * @method sizeShim","         */","        sizeShim: function () {","            var shim = this._shimNode,","                node = this._stackNode;","","            if (shim && UA.ie === 6 && this.get(VISIBLE)) {","                shim.setStyle(WIDTH, node.get(OFFSET_WIDTH) + PX);","                shim.setStyle(HEIGHT, node.get(OFFSET_HEIGHT) + PX);","            }","        },","","        /**","         * Creates a cloned shim node, using the SHIM_TEMPLATE html template, for use on a new instance.","         *","         * @method _getShimTemplate","         * @private","         * @return {Node} node A new shim Node instance.","         */","        _getShimTemplate : function() {","            return Node.create(Stack.SHIM_TEMPLATE, this._stackNode.get(OWNER_DOCUMENT));","        }","    };","","    Y.WidgetStack = Stack;","","","}, '3.10.3', {\"requires\": [\"base-build\", \"widget\"], \"skinnable\": true});","","}());"]};
}
var __cov_W4NzUIXIxRimGbjWtpefzw = __coverage__['build/widget-stack/widget-stack.js'];
__cov_W4NzUIXIxRimGbjWtpefzw.s['1']++;YUI.add('widget-stack',function(Y,NAME){__cov_W4NzUIXIxRimGbjWtpefzw.f['1']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['2']++;var L=Y.Lang,UA=Y.UA,Node=Y.Node,Widget=Y.Widget,ZINDEX='zIndex',SHIM='shim',VISIBLE='visible',BOUNDING_BOX='boundingBox',RENDER_UI='renderUI',BIND_UI='bindUI',SYNC_UI='syncUI',OFFSET_WIDTH='offsetWidth',OFFSET_HEIGHT='offsetHeight',PARENT_NODE='parentNode',FIRST_CHILD='firstChild',OWNER_DOCUMENT='ownerDocument',WIDTH='width',HEIGHT='height',PX='px',SHIM_DEFERRED='shimdeferred',SHIM_RESIZE='shimresize',VisibleChange='visibleChange',WidthChange='widthChange',HeightChange='heightChange',ShimChange='shimChange',ZIndexChange='zIndexChange',ContentUpdate='contentUpdate',STACKED='stacked';__cov_W4NzUIXIxRimGbjWtpefzw.s['3']++;function Stack(config){__cov_W4NzUIXIxRimGbjWtpefzw.f['2']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['4']++;this._stackNode=this.get(BOUNDING_BOX);__cov_W4NzUIXIxRimGbjWtpefzw.s['5']++;this._stackHandles={};__cov_W4NzUIXIxRimGbjWtpefzw.s['6']++;Y.after(this._renderUIStack,this,RENDER_UI);__cov_W4NzUIXIxRimGbjWtpefzw.s['7']++;Y.after(this._syncUIStack,this,SYNC_UI);__cov_W4NzUIXIxRimGbjWtpefzw.s['8']++;Y.after(this._bindUIStack,this,BIND_UI);}__cov_W4NzUIXIxRimGbjWtpefzw.s['9']++;Stack.ATTRS={shim:{value:UA.ie==6},zIndex:{value:0,setter:'_setZIndex'}};__cov_W4NzUIXIxRimGbjWtpefzw.s['10']++;Stack.HTML_PARSER={zIndex:function(srcNode){__cov_W4NzUIXIxRimGbjWtpefzw.f['3']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['11']++;return this._parseZIndex(srcNode);}};__cov_W4NzUIXIxRimGbjWtpefzw.s['12']++;Stack.SHIM_CLASS_NAME=Widget.getClassName(SHIM);__cov_W4NzUIXIxRimGbjWtpefzw.s['13']++;Stack.STACKED_CLASS_NAME=Widget.getClassName(STACKED);__cov_W4NzUIXIxRimGbjWtpefzw.s['14']++;Stack.SHIM_TEMPLATE='<iframe class="'+Stack.SHIM_CLASS_NAME+'" frameborder="0" title="Widget Stacking Shim" src="javascript:false" tabindex="-1" role="presentation"></iframe>';__cov_W4NzUIXIxRimGbjWtpefzw.s['15']++;Stack.prototype={_syncUIStack:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['4']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['16']++;this._uiSetShim(this.get(SHIM));__cov_W4NzUIXIxRimGbjWtpefzw.s['17']++;this._uiSetZIndex(this.get(ZINDEX));},_bindUIStack:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['5']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['18']++;this.after(ShimChange,this._afterShimChange);__cov_W4NzUIXIxRimGbjWtpefzw.s['19']++;this.after(ZIndexChange,this._afterZIndexChange);},_renderUIStack:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['6']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['20']++;this._stackNode.addClass(Stack.STACKED_CLASS_NAME);},_parseZIndex:function(srcNode){__cov_W4NzUIXIxRimGbjWtpefzw.f['7']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['21']++;var zIndex;__cov_W4NzUIXIxRimGbjWtpefzw.s['22']++;if((__cov_W4NzUIXIxRimGbjWtpefzw.b['2'][0]++,!srcNode.inDoc())||(__cov_W4NzUIXIxRimGbjWtpefzw.b['2'][1]++,srcNode.getStyle('position')==='static')){__cov_W4NzUIXIxRimGbjWtpefzw.b['1'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['23']++;zIndex='auto';}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['1'][1]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['24']++;zIndex=srcNode.getComputedStyle('zIndex');}__cov_W4NzUIXIxRimGbjWtpefzw.s['25']++;return zIndex==='auto'?(__cov_W4NzUIXIxRimGbjWtpefzw.b['3'][0]++,null):(__cov_W4NzUIXIxRimGbjWtpefzw.b['3'][1]++,zIndex);},_setZIndex:function(zIndex){__cov_W4NzUIXIxRimGbjWtpefzw.f['8']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['26']++;if(L.isString(zIndex)){__cov_W4NzUIXIxRimGbjWtpefzw.b['4'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['27']++;zIndex=parseInt(zIndex,10);}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['4'][1]++;}__cov_W4NzUIXIxRimGbjWtpefzw.s['28']++;if(!L.isNumber(zIndex)){__cov_W4NzUIXIxRimGbjWtpefzw.b['5'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['29']++;zIndex=0;}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['5'][1]++;}__cov_W4NzUIXIxRimGbjWtpefzw.s['30']++;return zIndex;},_afterShimChange:function(e){__cov_W4NzUIXIxRimGbjWtpefzw.f['9']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['31']++;this._uiSetShim(e.newVal);},_afterZIndexChange:function(e){__cov_W4NzUIXIxRimGbjWtpefzw.f['10']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['32']++;this._uiSetZIndex(e.newVal);},_uiSetZIndex:function(zIndex){__cov_W4NzUIXIxRimGbjWtpefzw.f['11']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['33']++;this._stackNode.setStyle(ZINDEX,zIndex);},_uiSetShim:function(enable){__cov_W4NzUIXIxRimGbjWtpefzw.f['12']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['34']++;if(enable){__cov_W4NzUIXIxRimGbjWtpefzw.b['6'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['35']++;if(this.get(VISIBLE)){__cov_W4NzUIXIxRimGbjWtpefzw.b['7'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['36']++;this._renderShim();}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['7'][1]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['37']++;this._renderShimDeferred();}__cov_W4NzUIXIxRimGbjWtpefzw.s['38']++;if(UA.ie==6){__cov_W4NzUIXIxRimGbjWtpefzw.b['8'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['39']++;this._addShimResizeHandlers();}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['8'][1]++;}}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['6'][1]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['40']++;this._destroyShim();}},_renderShimDeferred:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['13']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['41']++;this._stackHandles[SHIM_DEFERRED]=(__cov_W4NzUIXIxRimGbjWtpefzw.b['9'][0]++,this._stackHandles[SHIM_DEFERRED])||(__cov_W4NzUIXIxRimGbjWtpefzw.b['9'][1]++,[]);__cov_W4NzUIXIxRimGbjWtpefzw.s['42']++;var handles=this._stackHandles[SHIM_DEFERRED],createBeforeVisible=function(e){__cov_W4NzUIXIxRimGbjWtpefzw.f['14']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['43']++;if(e.newVal){__cov_W4NzUIXIxRimGbjWtpefzw.b['10'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['44']++;this._renderShim();}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['10'][1]++;}};__cov_W4NzUIXIxRimGbjWtpefzw.s['45']++;handles.push(this.on(VisibleChange,createBeforeVisible));},_addShimResizeHandlers:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['15']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['46']++;this._stackHandles[SHIM_RESIZE]=(__cov_W4NzUIXIxRimGbjWtpefzw.b['11'][0]++,this._stackHandles[SHIM_RESIZE])||(__cov_W4NzUIXIxRimGbjWtpefzw.b['11'][1]++,[]);__cov_W4NzUIXIxRimGbjWtpefzw.s['47']++;var sizeShim=this.sizeShim,handles=this._stackHandles[SHIM_RESIZE];__cov_W4NzUIXIxRimGbjWtpefzw.s['48']++;handles.push(this.after(VisibleChange,sizeShim));__cov_W4NzUIXIxRimGbjWtpefzw.s['49']++;handles.push(this.after(WidthChange,sizeShim));__cov_W4NzUIXIxRimGbjWtpefzw.s['50']++;handles.push(this.after(HeightChange,sizeShim));__cov_W4NzUIXIxRimGbjWtpefzw.s['51']++;handles.push(this.after(ContentUpdate,sizeShim));},_detachStackHandles:function(handleKey){__cov_W4NzUIXIxRimGbjWtpefzw.f['16']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['52']++;var handles=this._stackHandles[handleKey],handle;__cov_W4NzUIXIxRimGbjWtpefzw.s['53']++;if((__cov_W4NzUIXIxRimGbjWtpefzw.b['13'][0]++,handles)&&(__cov_W4NzUIXIxRimGbjWtpefzw.b['13'][1]++,handles.length>0)){__cov_W4NzUIXIxRimGbjWtpefzw.b['12'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['54']++;while(handle=handles.pop()){__cov_W4NzUIXIxRimGbjWtpefzw.s['55']++;handle.detach();}}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['12'][1]++;}},_renderShim:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['17']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['56']++;var shimEl=this._shimNode,stackEl=this._stackNode;__cov_W4NzUIXIxRimGbjWtpefzw.s['57']++;if(!shimEl){__cov_W4NzUIXIxRimGbjWtpefzw.b['14'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['58']++;shimEl=this._shimNode=this._getShimTemplate();__cov_W4NzUIXIxRimGbjWtpefzw.s['59']++;stackEl.insertBefore(shimEl,stackEl.get(FIRST_CHILD));__cov_W4NzUIXIxRimGbjWtpefzw.s['60']++;this._detachStackHandles(SHIM_DEFERRED);__cov_W4NzUIXIxRimGbjWtpefzw.s['61']++;this.sizeShim();}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['14'][1]++;}},_destroyShim:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['18']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['62']++;if(this._shimNode){__cov_W4NzUIXIxRimGbjWtpefzw.b['15'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['63']++;this._shimNode.get(PARENT_NODE).removeChild(this._shimNode);__cov_W4NzUIXIxRimGbjWtpefzw.s['64']++;this._shimNode=null;__cov_W4NzUIXIxRimGbjWtpefzw.s['65']++;this._detachStackHandles(SHIM_DEFERRED);__cov_W4NzUIXIxRimGbjWtpefzw.s['66']++;this._detachStackHandles(SHIM_RESIZE);}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['15'][1]++;}},sizeShim:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['19']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['67']++;var shim=this._shimNode,node=this._stackNode;__cov_W4NzUIXIxRimGbjWtpefzw.s['68']++;if((__cov_W4NzUIXIxRimGbjWtpefzw.b['17'][0]++,shim)&&(__cov_W4NzUIXIxRimGbjWtpefzw.b['17'][1]++,UA.ie===6)&&(__cov_W4NzUIXIxRimGbjWtpefzw.b['17'][2]++,this.get(VISIBLE))){__cov_W4NzUIXIxRimGbjWtpefzw.b['16'][0]++;__cov_W4NzUIXIxRimGbjWtpefzw.s['69']++;shim.setStyle(WIDTH,node.get(OFFSET_WIDTH)+PX);__cov_W4NzUIXIxRimGbjWtpefzw.s['70']++;shim.setStyle(HEIGHT,node.get(OFFSET_HEIGHT)+PX);}else{__cov_W4NzUIXIxRimGbjWtpefzw.b['16'][1]++;}},_getShimTemplate:function(){__cov_W4NzUIXIxRimGbjWtpefzw.f['20']++;__cov_W4NzUIXIxRimGbjWtpefzw.s['71']++;return Node.create(Stack.SHIM_TEMPLATE,this._stackNode.get(OWNER_DOCUMENT));}};__cov_W4NzUIXIxRimGbjWtpefzw.s['72']++;Y.WidgetStack=Stack;},'3.10.3',{'requires':['base-build','widget'],'skinnable':true});