Home | History | Annotate | Download | only in chromevox

Lines Matching defs:unshift

13 goog.bindJs_=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}};goog.bind=function(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?goog.bind=goog.bindNative_:goog.bind=goog.bindJs_;return goog.bind.apply(null,arguments)};
20 goog.MODIFY_FUNCTION_PROTOTYPES&&(Function.prototype.bind=Function.prototype.bind||function(a,b){if(1<arguments.length){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,a);return goog.bind.apply(null,c)}return goog.bind(this,a)},Function.prototype.partial=function(a){var b=Array.prototype.slice.call(arguments);b.unshift(this,null);return goog.bind.apply(null,b)},Function.prototype.inherits=function(a){goog.inherits(this,a)},Function.prototype.mixin=function(a){goog.mixin(this.prototype,
47 goog.string.toTitleCase=function(a,b){var c=goog.isString(b)?goog.string.regExpEscape(b):"\\s",c=c?"|["+c+"]+":"",c=new RegExp("(^"+c+")([a-z])","g");return a.replace(c,function(a,b,c){return b+c.toUpperCase()})};goog.string.parseInt=function(a){isFinite(a)&&(a=String(a));return goog.isString(a)?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN};goog.string.splitLimit=function(a,b,c){a=a.split(b);for(var d=[];0<c&&a.length;)d.push(a.shift()),c--;a.length&&d.push(a.join(b));return d};goog.asserts={};goog.asserts.ENABLE_ASSERTS=goog.DEBUG;goog.asserts.AssertionError=function(a,b){b.unshift(a);goog.debug.Error.call(this,goog.string.subs.apply(null,b));b.shift()};goog.inherits(goog.asserts.AssertionError,goog.debug.Error);goog.asserts.AssertionError.prototype.name="AssertionError";goog.asserts.DEFAULT_ERROR_HANDLER=function(a){throw a;};goog.asserts.errorHandler_=goog.asserts.DEFAULT_ERROR_HANDLER;
75 goog.array.rotate=function(a,b){goog.asserts.assert(null!=a.length);a.length&&(b%=a.length,0<b?goog.array.ARRAY_PROTOTYPE_.unshift.apply(a,a.splice(-b,b)):0>b&&goog.array.ARRAY_PROTOTYPE_.push.apply(a,a.splice(0,-b)));return a};goog.array.moveItem=function(a,b,c){goog.asserts.assert(0<=b&&b<a.length);goog.asserts.assert(0<=c&&c<a.length);b=goog.array.ARRAY_PROTOTYPE_.splice.call(a,b,1);goog.array.ARRAY_PROTOTYPE_.splice.call(a,c,0,b[0])};
79 goog.math.longestCommonSubsequence=function(a,b,c,d){c=c||function(a,b){return a==b};d=d||function(b){return a[b]};for(var e=a.length,f=b.length,g=[],h=0;h<e+1;h++)g[h]=[],g[h][0]=0;for(var k=0;k<f+1;k++)g[0][k]=0;for(h=1;h<=e;h++)for(k=1;k<=f;k++)c(a[h-1],b[k-1])?g[h][k]=g[h-1][k-1]+1:g[h][k]=Math.max(g[h-1][k],g[h][k-1]);for(var l=[],h=e,k=f;0<h&&0<k;)c(a[h-1],b[k-1])?(l.unshift(d(h-1,k-1)),h--,k--):g[h-1][k]>g[h][k-1]?h--:k--;return l};
350 goog.i18n.currency.getCurrencyPattern_=function(a,b){var c=["#,##0"],d=a&goog.i18n.currency.PRECISION_MASK_;if(0<d){c.push(".");for(var e=0;e<d;e++)c.push("0")}0==(a&goog.i18n.currency.POSITION_FLAG_)?(c.unshift(a&goog.i18n.currency.SPACE_FLAG_?"' ":"'"),c.unshift(b),c.unshift("'")):c.push(a&goog.i18n.currency.SPACE_FLAG_?" '":"'",b,"'");return c.join("")};
997 cvox.SemanticTree.Node.prototype.querySelectorAll=function(a){for(var b=[],c=0,d;d=this.childNodes[c];c++)b=b.concat(d.querySelectorAll(a));a(this)&&b.unshift(this);return b};cvox.SemanticTree.prototype.xml=function(a){var b=new DOMParser,b=b.parseFromString("<stree></stree>","text/xml");a=this.root.xml(b,a);b.childNodes[0].appendChild(a);return b.childNodes[0]};
1015 cvox.SemanticTree.prototype.makeOperationsTree_=function(a,b,c,d){d=d||[];if(0==a.length)return d.unshift(c),b.type==cvox.SemanticAttr.Type.INFIXOP?(d=this.makePostfixNode_(b.childNodes.pop(),d),b.appendChild_(d),b):this.makePostfixNode_(b,d);a=cvox.SemanticTree.sliceNodes_(a,cvox.SemanticTree.attrPred_("type","OPERATOR"));if(0==a.head.length)return d.push(a.div),this.makeOperationsTree_(a.tail,b,c,d);d=this.makePrefixNode_(this.makeImplicitNode_(a.head),d);b=this.appendOperand_(b,c,d);return a.div?
1019 cvox.SemanticTree.prototype.processFences_=function(a,b,c,d){if(0==a.length&&0==c.length)return d[0];var e=cvox.SemanticTree.attrPred_("role","OPEN");if(0==a.length){for(a=d.shift();0<c.length;){if(e(c[0]))b=c.shift(),cvox.SemanticTree.fenceToPunct_(b),a.push(b);else{c=cvox.SemanticTree.sliceNodes_(c,e);var f=c.head.length-1,g=this.processNeutralFences_(c.head,d.slice(0,f));d=d.slice(f);a.push.apply(a,g);c.div&&c.tail.unshift(c.div);c=c.tail}a.push.apply(a,d.shift())}return a}f=c[c.length-1];g=a[0].role;
1022 cvox.SemanticTree.prototype.processNeutralFences_=function(a,b){if(0==a.length)return a;if(1==a.length)return cvox.SemanticTree.fenceToPunct_(a[0]),a;var c=a.shift(),d=cvox.SemanticTree.sliceNodes_(a,function(a){return a.textContent==c.textContent});if(!d.div){cvox.SemanticTree.fenceToPunct_(c);var e=b.shift();e.unshift(c);return e.concat(this.processNeutralFences_(a,b))}var f=this.combineFencedContent_(c,d.div,d.head,b);return 0<d.tail.length?(e=f.shift(),d=this.processNeutralFences_(d.tail,f),e.concat(d)):
1023 f[0]};cvox.SemanticTree.prototype.combineFencedContent_=function(a,b,c,d){if(0==c.length)return a=this.makeHorizontalFencedNode_(a,b,d.shift()),d.unshift(a),d;var e=d.shift(),f=c.length-1,g=d.slice(0,f);d=d.slice(f);f=d.shift();c=this.processNeutralFences_(c,g);e.push.apply(e,c);e.push.apply(e,f);a=this.makeHorizontalFencedNode_(a,b,e);0<d.length?d[0].unshift(a):d=[[a]];return d};
1033 cvox.SemanticTree.prototype.getFunctionArgs_=function(a,b,c){switch(c){case "integral":return b=this.getIntegralArgs_(b),c=this.processRow_(b.integrand),a=this.makeIntegralNode_(a,c,b.intvar),b.rest.unshift(a),b.rest;case "prefix":if(b[0]&&b[0].type==cvox.SemanticAttr.Type.FENCED)return a=this.makeFunctionNode_(a,b.shift()),b.unshift(a),b;case "bigop":b=cvox.SemanticTree.sliceNodes_(b,cvox.SemanticTree.prefixFunctionBoundary_);var d=this.processRow_(b.head);a="prefix"==c?this.makeFunctionNode_(a,
1034 d):this.makeBigOpNode_(a,d);b.div&&b.tail.unshift(b.div);b.tail.unshift(a);return b.tail;case "simple":if(0==b.length)return[a];c=b[0];if(c.type==cvox.SemanticAttr.Type.FENCED&&c.role!=cvox.SemanticAttr.Role.NEUTRAL&&this.simpleFunctionHeuristic_(c))return a=this.makeFunctionNode_(a,b.shift()),b.unshift(a),b;b.unshift(a);return b}};
1066 cvox.BaseRuleStore.prototype.defineRule=function(a,b,c,d,e){try{var f=cvox.SpeechRule.Action.fromString(c),g=Array.prototype.slice.call(arguments,4),h=new cvox.SpeechRule.Precondition(d,g),g={};g[cvox.SpeechRule.DynamicCstrAttrib.STYLE]=b;var k=new cvox.SpeechRule(a,g,h,f)}catch(l){if("RuleError"==l.name)return console.log("Rule Error ",d,"("+b+"):",l.message),null;throw l;}this.addRule(k);return k};cvox.BaseRuleStore.prototype.addRule=function(a){this.speechRules_.unshift(a)};
1420 cvox.TableShifter.prototype.makeMoreGranular=function(){cvox.TableShifter.superClass_.makeMoreGranular.call(this);this.currentWalker_=this.columnWalker_};cvox.TableShifter.create=function(a){a=cvox.DomUtil.getAncestors(a.start.node);return cvox.DomPredicates.tablePredicate(a)&&!cvox.DomPredicates.captionPredicate(a)?new cvox.TableShifter:null};cvox.NavigationHistory=function(){this.reset_()};cvox.NavigationHistory.MAX_HISTORY_LEN_=30;cvox.NavigationHistory.prototype.reset_=function(){var a=document.body;this.history_=[a];this.arrivedValid_=!0};cvox.NavigationHistory.prototype.update=function(a){var b=this.history_[0];a&&a!=b&&this.history_.unshift(a);this.history_.length>cvox.NavigationHistory.MAX_HISTORY_LEN_&&this.history_.pop();this.arrivedValid_=this.isValidNode_(a)};