NOBUG: Fixed file access permissions
[moodle.git] / lib / yuilib / 3.13.0 / editor-para-ie / editor-para-ie-coverage.js
blob6d019621c3234030928997973756d15ea789ab34
1 /*
2 YUI 3.13.0 (build 508226d)
3 Copyright 2013 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
6 */
8 if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
9 if (!__coverage__['build/editor-para-ie/editor-para-ie.js']) {
10    __coverage__['build/editor-para-ie/editor-para-ie.js'] = {"path":"build/editor-para-ie/editor-para-ie.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},"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],"18":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":26},"end":{"line":1,"column":45}}},"2":{"name":"(anonymous_2)","line":14,"loc":{"start":{"line":14,"column":23},"end":{"line":14,"column":34}}},"3":{"name":"(anonymous_3)","line":26,"loc":{"start":{"line":26,"column":18},"end":{"line":26,"column":29}}},"4":{"name":"(anonymous_4)","line":35,"loc":{"start":{"line":35,"column":23},"end":{"line":35,"column":35}}},"5":{"name":"(anonymous_5)","line":98,"loc":{"start":{"line":98,"column":21},"end":{"line":98,"column":32}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":134,"column":49}},"2":{"start":{"line":14,"column":4},"end":{"line":17,"column":12}},"3":{"start":{"line":15,"column":8},"end":{"line":15,"column":67}},"4":{"start":{"line":20,"column":4},"end":{"line":125,"column":7}},"5":{"start":{"line":27,"column":12},"end":{"line":27,"column":69}},"6":{"start":{"line":36,"column":12},"end":{"line":39,"column":39}},"7":{"start":{"line":41,"column":12},"end":{"line":96,"column":13}},"8":{"start":{"line":43,"column":20},"end":{"line":43,"column":79}},"9":{"start":{"line":44,"column":20},"end":{"line":44,"column":50}},"10":{"start":{"line":46,"column":20},"end":{"line":48,"column":21}},"11":{"start":{"line":47,"column":24},"end":{"line":47,"column":46}},"12":{"start":{"line":50,"column":20},"end":{"line":56,"column":21}},"13":{"start":{"line":51,"column":24},"end":{"line":55,"column":25}},"14":{"start":{"line":52,"column":28},"end":{"line":54,"column":29}},"15":{"start":{"line":53,"column":32},"end":{"line":53,"column":43}},"16":{"start":{"line":57,"column":20},"end":{"line":63,"column":21}},"17":{"start":{"line":58,"column":24},"end":{"line":58,"column":52}},"18":{"start":{"line":59,"column":24},"end":{"line":62,"column":25}},"19":{"start":{"line":60,"column":28},"end":{"line":60,"column":41}},"20":{"start":{"line":61,"column":28},"end":{"line":61,"column":41}},"21":{"start":{"line":64,"column":20},"end":{"line":84,"column":21}},"22":{"start":{"line":65,"column":24},"end":{"line":65,"column":47}},"23":{"start":{"line":66,"column":24},"end":{"line":83,"column":25}},"24":{"start":{"line":67,"column":28},"end":{"line":67,"column":54}},"25":{"start":{"line":68,"column":28},"end":{"line":79,"column":29}},"26":{"start":{"line":69,"column":32},"end":{"line":78,"column":33}},"27":{"start":{"line":70,"column":36},"end":{"line":70,"column":61}},"28":{"start":{"line":71,"column":36},"end":{"line":75,"column":37}},"29":{"start":{"line":72,"column":40},"end":{"line":72,"column":49}},"30":{"start":{"line":74,"column":40},"end":{"line":74,"column":53}},"31":{"start":{"line":77,"column":36},"end":{"line":77,"column":49}},"32":{"start":{"line":80,"column":28},"end":{"line":82,"column":29}},"33":{"start":{"line":81,"column":32},"end":{"line":81,"column":58}},"34":{"start":{"line":85,"column":20},"end":{"line":85,"column":26}},"35":{"start":{"line":87,"column":20},"end":{"line":94,"column":21}},"36":{"start":{"line":88,"column":24},"end":{"line":88,"column":47}},"37":{"start":{"line":89,"column":27},"end":{"line":94,"column":21}},"38":{"start":{"line":90,"column":24},"end":{"line":90,"column":63}},"39":{"start":{"line":91,"column":24},"end":{"line":93,"column":25}},"40":{"start":{"line":92,"column":28},"end":{"line":92,"column":39}},"41":{"start":{"line":95,"column":20},"end":{"line":95,"column":26}},"42":{"start":{"line":99,"column":12},"end":{"line":99,"column":38}},"43":{"start":{"line":100,"column":12},"end":{"line":103,"column":13}},"44":{"start":{"line":101,"column":16},"end":{"line":101,"column":82}},"45":{"start":{"line":102,"column":16},"end":{"line":102,"column":23}},"46":{"start":{"line":105,"column":12},"end":{"line":105,"column":67}},"47":{"start":{"line":127,"column":4},"end":{"line":127,"column":26}},"48":{"start":{"line":129,"column":4},"end":{"line":129,"column":39}}},"branchMap":{"1":{"line":41,"type":"switch","locations":[{"start":{"line":42,"column":16},"end":{"line":85,"column":26}},{"start":{"line":86,"column":16},"end":{"line":95,"column":26}}]},"2":{"line":43,"type":"cond-expr","locations":[{"start":{"line":43,"column":47},"end":{"line":43,"column":61}},{"start":{"line":43,"column":64},"end":{"line":43,"column":77}}]},"3":{"line":46,"type":"if","locations":[{"start":{"line":46,"column":20},"end":{"line":46,"column":20}},{"start":{"line":46,"column":20},"end":{"line":46,"column":20}}]},"4":{"line":50,"type":"if","locations":[{"start":{"line":50,"column":20},"end":{"line":50,"column":20}},{"start":{"line":50,"column":20},"end":{"line":50,"column":20}}]},"5":{"line":51,"type":"if","locations":[{"start":{"line":51,"column":24},"end":{"line":51,"column":24}},{"start":{"line":51,"column":24},"end":{"line":51,"column":24}}]},"6":{"line":51,"type":"binary-expr","locations":[{"start":{"line":51,"column":28},"end":{"line":51,"column":40}},{"start":{"line":51,"column":44},"end":{"line":51,"column":52}}]},"7":{"line":52,"type":"if","locations":[{"start":{"line":52,"column":28},"end":{"line":52,"column":28}},{"start":{"line":52,"column":28},"end":{"line":52,"column":28}}]},"8":{"line":57,"type":"if","locations":[{"start":{"line":57,"column":20},"end":{"line":57,"column":20}},{"start":{"line":57,"column":20},"end":{"line":57,"column":20}}]},"9":{"line":59,"type":"if","locations":[{"start":{"line":59,"column":24},"end":{"line":59,"column":24}},{"start":{"line":59,"column":24},"end":{"line":59,"column":24}}]},"10":{"line":64,"type":"if","locations":[{"start":{"line":64,"column":20},"end":{"line":64,"column":20}},{"start":{"line":64,"column":20},"end":{"line":64,"column":20}}]},"11":{"line":66,"type":"if","locations":[{"start":{"line":66,"column":24},"end":{"line":66,"column":24}},{"start":{"line":66,"column":24},"end":{"line":66,"column":24}}]},"12":{"line":69,"type":"if","locations":[{"start":{"line":69,"column":32},"end":{"line":69,"column":32}},{"start":{"line":69,"column":32},"end":{"line":69,"column":32}}]},"13":{"line":71,"type":"if","locations":[{"start":{"line":71,"column":36},"end":{"line":71,"column":36}},{"start":{"line":71,"column":36},"end":{"line":71,"column":36}}]},"14":{"line":80,"type":"if","locations":[{"start":{"line":80,"column":28},"end":{"line":80,"column":28}},{"start":{"line":80,"column":28},"end":{"line":80,"column":28}}]},"15":{"line":87,"type":"if","locations":[{"start":{"line":87,"column":20},"end":{"line":87,"column":20}},{"start":{"line":87,"column":20},"end":{"line":87,"column":20}}]},"16":{"line":89,"type":"if","locations":[{"start":{"line":89,"column":27},"end":{"line":89,"column":27}},{"start":{"line":89,"column":27},"end":{"line":89,"column":27}}]},"17":{"line":91,"type":"if","locations":[{"start":{"line":91,"column":24},"end":{"line":91,"column":24}},{"start":{"line":91,"column":24},"end":{"line":91,"column":24}}]},"18":{"line":100,"type":"if","locations":[{"start":{"line":100,"column":12},"end":{"line":100,"column":12}},{"start":{"line":100,"column":12},"end":{"line":100,"column":12}}]}},"code":["(function () { YUI.add('editor-para-ie', function (Y, NAME) {","","","    /**","     * Extends EditorParaBase with IE support","     * @class Plugin.EditorParaIE","     * @extends Plugin.EditorParaBase","     * @constructor","     * @module editor","     * @submodule editor-para-ie","     */","","","    var EditorParaIE = function() {","        EditorParaIE.superclass.constructor.apply(this, arguments);","    }, HOST = 'host', NODE_CHANGE = 'nodeChange',","    P = 'p';","","","    Y.extend(EditorParaIE, Y.Plugin.EditorParaBase, {","        /**","        * Resolves the ROOT editor element.","        * @method _getRoot","        * @private","        */","        _getRoot: function() {","            return this.get(HOST).getInstance().EditorSelection.ROOT;","        },","","        /**","        * nodeChange handler to handle fixing an empty document.","        * @private","        * @method _onNodeChange","        */","        _onNodeChange: function(e) {","            var host = this.get(HOST), inst = host.getInstance(),","                btag = inst.EditorSelection.DEFAULT_BLOCK_TAG,","                prev, LAST_CHILD = ':last-child', para, b, para2,","                lc, lc2, found = false;","","            switch (e.changedType) {","                case 'enter-up':","                    para = ((this._lastPara) ? this._lastPara : e.changedNode);","                    b = para.one('br.yui-cursor');","","                    if (this._lastPara) {","                        delete this._lastPara;","                    }","","                    if (b) {","                        if (b.previous() || b.next()) {","                            if (b.ancestor(P)) {","                                b.remove();","                            }","                        }","                    }","                    if (!para.test(btag)) {","                        para2 = para.ancestor(btag);","                        if (para2) {","                            para = para2;","                            para2 = null;","                        }","                    }","                    if (para.test(btag)) {","                        prev = para.previous();","                        if (prev) {","                            lc = prev.one(LAST_CHILD);","                            while (!found) {","                                if (lc) {","                                    lc2 = lc.one(LAST_CHILD);","                                    if (lc2) {","                                        lc = lc2;","                                    } else {","                                        found = true;","                                    }","                                } else {","                                    found = true;","                                }","                            }","                            if (lc) {","                                host.copyStyles(lc, para);","                            }","                        }","                    }","                    break;","                case 'enter':","                    if (e.changedNode.test('br')) {","                        e.changedNode.remove();","                    } else if (e.changedNode.test('p, span')) {","                        b = e.changedNode.one('br.yui-cursor');","                        if (b) {","                            b.remove();","                        }","                    }","                    break;","            }","        },","        initializer: function() {","            var host = this.get(HOST);","            if (host.editorBR) {","                Y.error('Can not plug EditorPara and EditorBR at the same time.');","                return;","            }","","            host.on(NODE_CHANGE, Y.bind(this._onNodeChange, this));","        }","    }, {","        /**","        * editorPara","        * @static","        * @property NAME","        */","        NAME: 'editorPara',","        /**","        * editorPara","        * @static","        * @property NS","        */","        NS: 'editorPara',","        ATTRS: {","            host: {","                value: false","            }","        }","    });","","    Y.namespace('Plugin');","","    Y.Plugin.EditorPara = EditorParaIE;","","","","","}, '3.13.0', {\"requires\": [\"editor-para-base\"]});","","}());"]};
12 var __cov_PjS1berGyDieGRVoNf7zpg = __coverage__['build/editor-para-ie/editor-para-ie.js'];
13 __cov_PjS1berGyDieGRVoNf7zpg.s['1']++;YUI.add('editor-para-ie',function(Y,NAME){__cov_PjS1berGyDieGRVoNf7zpg.f['1']++;__cov_PjS1berGyDieGRVoNf7zpg.s['2']++;var EditorParaIE=function(){__cov_PjS1berGyDieGRVoNf7zpg.f['2']++;__cov_PjS1berGyDieGRVoNf7zpg.s['3']++;EditorParaIE.superclass.constructor.apply(this,arguments);},HOST='host',NODE_CHANGE='nodeChange',P='p';__cov_PjS1berGyDieGRVoNf7zpg.s['4']++;Y.extend(EditorParaIE,Y.Plugin.EditorParaBase,{_getRoot:function(){__cov_PjS1berGyDieGRVoNf7zpg.f['3']++;__cov_PjS1berGyDieGRVoNf7zpg.s['5']++;return this.get(HOST).getInstance().EditorSelection.ROOT;},_onNodeChange:function(e){__cov_PjS1berGyDieGRVoNf7zpg.f['4']++;__cov_PjS1berGyDieGRVoNf7zpg.s['6']++;var host=this.get(HOST),inst=host.getInstance(),btag=inst.EditorSelection.DEFAULT_BLOCK_TAG,prev,LAST_CHILD=':last-child',para,b,para2,lc,lc2,found=false;__cov_PjS1berGyDieGRVoNf7zpg.s['7']++;switch(e.changedType){case'enter-up':__cov_PjS1berGyDieGRVoNf7zpg.b['1'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['8']++;para=this._lastPara?(__cov_PjS1berGyDieGRVoNf7zpg.b['2'][0]++,this._lastPara):(__cov_PjS1berGyDieGRVoNf7zpg.b['2'][1]++,e.changedNode);__cov_PjS1berGyDieGRVoNf7zpg.s['9']++;b=para.one('br.yui-cursor');__cov_PjS1berGyDieGRVoNf7zpg.s['10']++;if(this._lastPara){__cov_PjS1berGyDieGRVoNf7zpg.b['3'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['11']++;delete this._lastPara;}else{__cov_PjS1berGyDieGRVoNf7zpg.b['3'][1]++;}__cov_PjS1berGyDieGRVoNf7zpg.s['12']++;if(b){__cov_PjS1berGyDieGRVoNf7zpg.b['4'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['13']++;if((__cov_PjS1berGyDieGRVoNf7zpg.b['6'][0]++,b.previous())||(__cov_PjS1berGyDieGRVoNf7zpg.b['6'][1]++,b.next())){__cov_PjS1berGyDieGRVoNf7zpg.b['5'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['14']++;if(b.ancestor(P)){__cov_PjS1berGyDieGRVoNf7zpg.b['7'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['15']++;b.remove();}else{__cov_PjS1berGyDieGRVoNf7zpg.b['7'][1]++;}}else{__cov_PjS1berGyDieGRVoNf7zpg.b['5'][1]++;}}else{__cov_PjS1berGyDieGRVoNf7zpg.b['4'][1]++;}__cov_PjS1berGyDieGRVoNf7zpg.s['16']++;if(!para.test(btag)){__cov_PjS1berGyDieGRVoNf7zpg.b['8'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['17']++;para2=para.ancestor(btag);__cov_PjS1berGyDieGRVoNf7zpg.s['18']++;if(para2){__cov_PjS1berGyDieGRVoNf7zpg.b['9'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['19']++;para=para2;__cov_PjS1berGyDieGRVoNf7zpg.s['20']++;para2=null;}else{__cov_PjS1berGyDieGRVoNf7zpg.b['9'][1]++;}}else{__cov_PjS1berGyDieGRVoNf7zpg.b['8'][1]++;}__cov_PjS1berGyDieGRVoNf7zpg.s['21']++;if(para.test(btag)){__cov_PjS1berGyDieGRVoNf7zpg.b['10'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['22']++;prev=para.previous();__cov_PjS1berGyDieGRVoNf7zpg.s['23']++;if(prev){__cov_PjS1berGyDieGRVoNf7zpg.b['11'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['24']++;lc=prev.one(LAST_CHILD);__cov_PjS1berGyDieGRVoNf7zpg.s['25']++;while(!found){__cov_PjS1berGyDieGRVoNf7zpg.s['26']++;if(lc){__cov_PjS1berGyDieGRVoNf7zpg.b['12'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['27']++;lc2=lc.one(LAST_CHILD);__cov_PjS1berGyDieGRVoNf7zpg.s['28']++;if(lc2){__cov_PjS1berGyDieGRVoNf7zpg.b['13'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['29']++;lc=lc2;}else{__cov_PjS1berGyDieGRVoNf7zpg.b['13'][1]++;__cov_PjS1berGyDieGRVoNf7zpg.s['30']++;found=true;}}else{__cov_PjS1berGyDieGRVoNf7zpg.b['12'][1]++;__cov_PjS1berGyDieGRVoNf7zpg.s['31']++;found=true;}}__cov_PjS1berGyDieGRVoNf7zpg.s['32']++;if(lc){__cov_PjS1berGyDieGRVoNf7zpg.b['14'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['33']++;host.copyStyles(lc,para);}else{__cov_PjS1berGyDieGRVoNf7zpg.b['14'][1]++;}}else{__cov_PjS1berGyDieGRVoNf7zpg.b['11'][1]++;}}else{__cov_PjS1berGyDieGRVoNf7zpg.b['10'][1]++;}__cov_PjS1berGyDieGRVoNf7zpg.s['34']++;break;case'enter':__cov_PjS1berGyDieGRVoNf7zpg.b['1'][1]++;__cov_PjS1berGyDieGRVoNf7zpg.s['35']++;if(e.changedNode.test('br')){__cov_PjS1berGyDieGRVoNf7zpg.b['15'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['36']++;e.changedNode.remove();}else{__cov_PjS1berGyDieGRVoNf7zpg.b['15'][1]++;__cov_PjS1berGyDieGRVoNf7zpg.s['37']++;if(e.changedNode.test('p, span')){__cov_PjS1berGyDieGRVoNf7zpg.b['16'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['38']++;b=e.changedNode.one('br.yui-cursor');__cov_PjS1berGyDieGRVoNf7zpg.s['39']++;if(b){__cov_PjS1berGyDieGRVoNf7zpg.b['17'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['40']++;b.remove();}else{__cov_PjS1berGyDieGRVoNf7zpg.b['17'][1]++;}}else{__cov_PjS1berGyDieGRVoNf7zpg.b['16'][1]++;}}__cov_PjS1berGyDieGRVoNf7zpg.s['41']++;break;}},initializer:function(){__cov_PjS1berGyDieGRVoNf7zpg.f['5']++;__cov_PjS1berGyDieGRVoNf7zpg.s['42']++;var host=this.get(HOST);__cov_PjS1berGyDieGRVoNf7zpg.s['43']++;if(host.editorBR){__cov_PjS1berGyDieGRVoNf7zpg.b['18'][0]++;__cov_PjS1berGyDieGRVoNf7zpg.s['44']++;Y.error('Can not plug EditorPara and EditorBR at the same time.');__cov_PjS1berGyDieGRVoNf7zpg.s['45']++;return;}else{__cov_PjS1berGyDieGRVoNf7zpg.b['18'][1]++;}__cov_PjS1berGyDieGRVoNf7zpg.s['46']++;host.on(NODE_CHANGE,Y.bind(this._onNodeChange,this));}},{NAME:'editorPara',NS:'editorPara',ATTRS:{host:{value:false}}});__cov_PjS1berGyDieGRVoNf7zpg.s['47']++;Y.namespace('Plugin');__cov_PjS1berGyDieGRVoNf7zpg.s['48']++;Y.Plugin.EditorPara=EditorParaIE;},'3.13.0',{'requires':['editor-para-base']});