Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: chrome/third_party/chromevox/chromeVoxChromePageScript.js

Issue 302063005: Fix crash when calling getMsg with no options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/common/braille_util.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var goog=goog||{};goog.global=this;goog.isDef=function(a){return void 0!==a};goo g.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||!c.execS cript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&g oog.isDef(b)?c[d]=b:c=c[d]?c[d]:c[d]={}};goog.define=function(a,b){var c=b;goog. exportPath_(a,c)};goog.DEBUG=!1;goog.LOCALE="en";goog.TRUSTED_SITE=!0;goog.STRIC T_MODE_COMPATIBLE=!1;goog.provide=function(a){goog.exportPath_(a)}; 1 var goog=goog||{};goog.global=this;goog.isDef=function(a){return void 0!==a};goo g.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||!c.execS cript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&g oog.isDef(b)?c[d]=b:c=c[d]?c[d]:c[d]={}};goog.define=function(a,b){var c=b;goog. exportPath_(a,c)};goog.DEBUG=!1;goog.LOCALE="en";goog.TRUSTED_SITE=!0;goog.STRIC T_MODE_COMPATIBLE=!1;goog.provide=function(a){goog.exportPath_(a)};
2 goog.setTestOnly=function(a){if(!goog.DEBUG)throw a=a||"",Error("Importing test- only code into non-debug environment"+a?": "+a:".");};goog.forwardDeclare=functi on(){};goog.getObjectByName=function(a,b){for(var c=a.split("."),d=b||goog.globa l,e;e=c.shift();)if(goog.isDefAndNotNull(d[e]))d=d[e];else return null;return d} ;goog.globalize=function(a,b){var c=b||goog.global,d;for(d in a)c[d]=a[d]}; 2 goog.setTestOnly=function(a){if(!goog.DEBUG)throw a=a||"",Error("Importing test- only code into non-debug environment"+a?": "+a:".");};goog.forwardDeclare=functi on(){};goog.getObjectByName=function(a,b){for(var c=a.split("."),d=b||goog.globa l,e;e=c.shift();)if(goog.isDefAndNotNull(d[e]))d=d[e];else return null;return d} ;goog.globalize=function(a,b){var c=b||goog.global,d;for(d in a)c[d]=a[d]};
3 goog.addDependency=function(a,b,c){if(goog.DEPENDENCIES_ENABLED){var d;a=a.repla ce(/\\/g,"/");for(var e=goog.dependencies_,f=0;d=b[f];f++)e.nameToPath[d]=a,a in e.pathToNames||(e.pathToNames[a]={}),e.pathToNames[a][d]=!0;for(d=0;b=c[d];d++) a in e.requires||(e.requires[a]={}),e.requires[a][b]=!0}};goog.useStrictRequires =!1;goog.ENABLE_DEBUG_LOADER=!0;goog.require=function(){};goog.basePath="";goog. nullFunction=function(){};goog.identityFunction=function(a){return a}; 3 goog.addDependency=function(a,b,c){if(goog.DEPENDENCIES_ENABLED){var d;a=a.repla ce(/\\/g,"/");for(var e=goog.dependencies_,f=0;d=b[f];f++)e.nameToPath[d]=a,a in e.pathToNames||(e.pathToNames[a]={}),e.pathToNames[a][d]=!0;for(d=0;b=c[d];d++) a in e.requires||(e.requires[a]={}),e.requires[a][b]=!0}};goog.useStrictRequires =!1;goog.ENABLE_DEBUG_LOADER=!0;goog.require=function(){};goog.basePath="";goog. nullFunction=function(){};goog.identityFunction=function(a){return a};
4 goog.abstractMethod=function(){throw Error("unimplemented abstract method");};go og.addSingletonGetter=function(a){a.getInstance=function(){if(a.instance_)return a.instance_;goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingleto ns_.length]=a);return a.instance_=new a}};goog.instantiatedSingletons_=[];goog.D EPENDENCIES_ENABLED=!1; 4 goog.abstractMethod=function(){throw Error("unimplemented abstract method");};go og.addSingletonGetter=function(a){a.getInstance=function(){if(a.instance_)return a.instance_;goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingleto ns_.length]=a);return a.instance_=new a}};goog.instantiatedSingletons_=[];goog.D EPENDENCIES_ENABLED=!1;
5 goog.DEPENDENCIES_ENABLED&&(goog.included_={},goog.dependencies_={pathToNames:{} ,nameToPath:{},requires:{},visited:{},written:{}},goog.inHtmlDocument_=function( ){var a=goog.global.document;return"undefined"!=typeof a&&"write"in a},goog.find BasePath_=function(){if(goog.global.CLOSURE_BASE_PATH)goog.basePath=goog.global. CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var a=goog.global.document, a=a.getElementsByTagName("script"),b=a.length-1;0<=b;--b){var c=a[b].src,d=c.las tIndexOf("?"),d=-1==d? 5 goog.DEPENDENCIES_ENABLED&&(goog.included_={},goog.dependencies_={pathToNames:{} ,nameToPath:{},requires:{},visited:{},written:{}},goog.inHtmlDocument_=function( ){var a=goog.global.document;return"undefined"!=typeof a&&"write"in a},goog.find BasePath_=function(){if(goog.global.CLOSURE_BASE_PATH)goog.basePath=goog.global. CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var a=goog.global.document, a=a.getElementsByTagName("script"),b=a.length-1;0<=b;--b){var c=a[b].src,d=c.las tIndexOf("?"),d=-1==d?
6 c.length:d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}} ,goog.importScript_=function(a){var b=goog.global.CLOSURE_IMPORT_SCRIPT||goog.wr iteScriptTag_;!goog.dependencies_.written[a]&&b(a)&&(goog.dependencies_.written[ a]=!0)},goog.writeScriptTag_=function(a){if(goog.inHtmlDocument_()){var b=goog.g lobal.document;if("complete"==b.readyState){if(b=/\bdeps.js$/.test(a))return!1;t hrow Error('Cannot write "'+a+'" after document load');}b.write('<script type="t ext/javascript" src="'+ 6 c.length:d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}} ,goog.importScript_=function(a){var b=goog.global.CLOSURE_IMPORT_SCRIPT||goog.wr iteScriptTag_;!goog.dependencies_.written[a]&&b(a)&&(goog.dependencies_.written[ a]=!0)},goog.writeScriptTag_=function(a){if(goog.inHtmlDocument_()){var b=goog.g lobal.document;if("complete"==b.readyState){if(b=/\bdeps.js$/.test(a))return!1;t hrow Error('Cannot write "'+a+'" after document load');}b.write('<script type="t ext/javascript" src="'+
7 a+'">\x3c/script>');return!0}return!1},goog.writeScripts_=function(){function a( e){if(!(e in d.written)){if(!(e in d.visited)&&(d.visited[e]=!0,e in d.requires) )for(var g in d.requires[e])if(!goog.isProvided_(g))if(g in d.nameToPath)a(d.nam eToPath[g]);else throw Error("Undefined nameToPath for "+g);e in c||(c[e]=!0,b.p ush(e))}}var b=[],c={},d=goog.dependencies_,e;for(e in goog.included_)d.written[ e]||a(e);for(e=0;e<b.length;e++)if(b[e])goog.importScript_(goog.basePath+b[e]);e lse throw Error("Undefined script input"); 7 a+'">\x3c/script>');return!0}return!1},goog.writeScripts_=function(){function a( e){if(!(e in d.written)){if(!(e in d.visited)&&(d.visited[e]=!0,e in d.requires) )for(var g in d.requires[e])if(!goog.isProvided_(g))if(g in d.nameToPath)a(d.nam eToPath[g]);else throw Error("Undefined nameToPath for "+g);e in c||(c[e]=!0,b.p ush(e))}}var b=[],c={},d=goog.dependencies_,e;for(e in goog.included_)d.written[ e]||a(e);for(e=0;e<b.length;e++)if(b[e])goog.importScript_(goog.basePath+b[e]);e lse throw Error("Undefined script input");
8 },goog.getPathFromDeps_=function(a){return a in goog.dependencies_.nameToPath?go og.dependencies_.nameToPath[a]:null},goog.findBasePath_(),goog.global.CLOSURE_NO _DEPS||goog.importScript_(goog.basePath+"deps.js")); 8 },goog.getPathFromDeps_=function(a){return a in goog.dependencies_.nameToPath?go og.dependencies_.nameToPath[a]:null},goog.findBasePath_(),goog.global.CLOSURE_NO _DEPS||goog.importScript_(goog.basePath+"deps.js"));
9 goog.typeOf=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Arra y)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString. call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"= =typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIs Enumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function ]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&! a.propertyIsEnumerable("call"))return"function"}else return"null"; 9 goog.typeOf=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Arra y)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString. call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"= =typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIs Enumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function ]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&! a.propertyIsEnumerable("call"))return"function"}else return"null";
10 else if("function"==b&&"undefined"==typeof a.call)return"object";return b};goog. isNull=function(a){return null===a};goog.isDefAndNotNull=function(a){return null !=a};goog.isArray=function(a){return"array"==goog.typeOf(a)};goog.isArrayLike=fu nction(a){var b=goog.typeOf(a);return"array"==b||"object"==b&&"number"==typeof a .length};goog.isDateLike=function(a){return goog.isObject(a)&&"function"==typeof a.getFullYear};goog.isString=function(a){return"string"==typeof a}; 10 else if("function"==b&&"undefined"==typeof a.call)return"object";return b};goog. isNull=function(a){return null===a};goog.isDefAndNotNull=function(a){return null !=a};goog.isArray=function(a){return"array"==goog.typeOf(a)};goog.isArrayLike=fu nction(a){var b=goog.typeOf(a);return"array"==b||"object"==b&&"number"==typeof a .length};goog.isDateLike=function(a){return goog.isObject(a)&&"function"==typeof a.getFullYear};goog.isString=function(a){return"string"==typeof a};
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 cvox.Interframe.sendMessageToIFrame=function(a,b){if(cvox.Interframe.allowAccess ToIframeContentWindow&&b.contentWindow)cvox.Interframe.sendMessageToWindow(a,b.c ontentWindow);else{var c=cvox.Interframe.IF_MSG_PREFIX+cvox.ChromeVoxJSON.string ify(a,null,null),d=document.createElement("script");d.type="text/javascript";if( b.hasAttribute("id")&&document.getElementById(b.id)==b)d.innerHTML="document.get ElementById(decodeURI('"+encodeURI(b.id)+"')).contentWindow.postMessage(decodeUR I('"+encodeURI(c)+"'), '*');"; 1030 cvox.Interframe.sendMessageToIFrame=function(a,b){if(cvox.Interframe.allowAccess ToIframeContentWindow&&b.contentWindow)cvox.Interframe.sendMessageToWindow(a,b.c ontentWindow);else{var c=cvox.Interframe.IF_MSG_PREFIX+cvox.ChromeVoxJSON.string ify(a,null,null),d=document.createElement("script");d.type="text/javascript";if( b.hasAttribute("id")&&document.getElementById(b.id)==b)d.innerHTML="document.get ElementById(decodeURI('"+encodeURI(b.id)+"')).contentWindow.postMessage(decodeUR I('"+encodeURI(c)+"'), '*');";
1031 else{var e="cvox_iframe"+a.id;""===b.className?b.className=e:-1==b.className.ind exOf(e)&&(b.className+=" "+e);d.innerHTML="document.getElementsByClassName(decod eURI('"+encodeURI(e)+"'))[0].contentWindow.postMessage(decodeURI('"+encodeURI(c) +"'), '*');"}document.head.appendChild(d);window.setTimeout(function(){document. head.removeChild(d)},1E3)}}; 1031 else{var e="cvox_iframe"+a.id;""===b.className?b.className=e:-1==b.className.ind exOf(e)&&(b.className+=" "+e);d.innerHTML="document.getElementsByClassName(decod eURI('"+encodeURI(e)+"'))[0].contentWindow.postMessage(decodeURI('"+encodeURI(c) +"'), '*');"}document.head.appendChild(d);window.setTimeout(function(){document. head.removeChild(d)},1E3)}};
1032 cvox.Interframe.sendMessageToParentWindow=function(a){cvox.Interframe.isIframe() &&(a.sourceId=cvox.Interframe.id,window.parent?cvox.Interframe.sendMessageToWind ow(a,window.parent):(a=cvox.Interframe.IF_MSG_PREFIX+cvox.ChromeVoxJSON.stringif y(a,null,null),window.location.href="javascript:window.parent.postMessage('"+enc odeURI(a)+"', '*');"))};cvox.Interframe.sendIdToIFrame=function(a,b){var c={comm and:cvox.Interframe.SET_ID,id:a};cvox.Interframe.sendMessageToIFrame(c,b)}; 1032 cvox.Interframe.sendMessageToParentWindow=function(a){cvox.Interframe.isIframe() &&(a.sourceId=cvox.Interframe.id,window.parent?cvox.Interframe.sendMessageToWind ow(a,window.parent):(a=cvox.Interframe.IF_MSG_PREFIX+cvox.ChromeVoxJSON.stringif y(a,null,null),window.location.href="javascript:window.parent.postMessage('"+enc odeURI(a)+"', '*');"))};cvox.Interframe.sendIdToIFrame=function(a,b){var c={comm and:cvox.Interframe.SET_ID,id:a};cvox.Interframe.sendMessageToIFrame(c,b)};
1033 cvox.Interframe.isIframe=function(){return window!=window.parent};cvox.Interfram e.init();cvox.PageSelection=function(a){this.sel_=a.clone();this.sel_.select();t his.wasBegin_=!0}; 1033 cvox.Interframe.isIframe=function(){return window!=window.parent};cvox.Interfram e.init();cvox.PageSelection=function(a){this.sel_=a.clone();this.sel_.select();t his.wasBegin_=!0};
1034 cvox.PageSelection.prototype.getDescription=function(a,b,c){var d=[];this.sel_.i sReversed()!=c.isReversed()?(d=a.getDescription(c,b),d[0].annotation=cvox.Chrome Vox.msgs.getMsg("describe_unselected"),d[0].pushEarcon(cvox.AbstractEarcons.SELE CTION_REVERSE)):(d=a.getDescription(b,c),d[0].annotation=cvox.ChromeVox.msgs.get Msg("describe_selected"),d[0].pushEarcon(cvox.AbstractEarcons.SELECTION),!this.w asBegin_&&this.sel_.absEquals(c.clone().normalize())&&(a=a.getDescription(c,b),a [0].annotation=cvox.ChromeVox.msgs.getMsg("describe_unselected"), 1034 cvox.PageSelection.prototype.getDescription=function(a,b,c){var d=[];this.sel_.i sReversed()!=c.isReversed()?(d=a.getDescription(c,b),d[0].annotation=cvox.Chrome Vox.msgs.getMsg("describe_unselected"),d[0].pushEarcon(cvox.AbstractEarcons.SELE CTION_REVERSE)):(d=a.getDescription(b,c),d[0].annotation=cvox.ChromeVox.msgs.get Msg("describe_selected"),d[0].pushEarcon(cvox.AbstractEarcons.SELECTION),!this.w asBegin_&&this.sel_.absEquals(c.clone().normalize())&&(a=a.getDescription(c,b),a [0].annotation=cvox.ChromeVox.msgs.getMsg("describe_unselected"),
1035 a[0].pushEarcon(cvox.AbstractEarcons.SELECTION_REVERSE),a[0].pushEarcon(cvox.Abs tractEarcons.WRAP),d=a.concat(d)));return d};cvox.PageSelection.prototype.getFul lDescription=function(){return[new cvox.NavDescription({text:window.getSelection ().toString(),context:cvox.ChromeVox.msgs.getMsg("selection_is")})]}; 1035 a[0].pushEarcon(cvox.AbstractEarcons.SELECTION_REVERSE),a[0].pushEarcon(cvox.Abs tractEarcons.WRAP),d=a.concat(d)));return d};cvox.PageSelection.prototype.getFul lDescription=function(){return[new cvox.NavDescription({text:window.getSelection ().toString(),context:cvox.ChromeVox.msgs.getMsg("selection_is")})]};
1036 cvox.PageSelection.prototype.extend=function(a){this.sel_.directedBefore(a)?this .sel_.end=this.sel_.isReversed()==a.isReversed()?a.end.clone():a.start.clone():t his.sel_=a.clone();this.sel_.select();this.wasBegin_=!1;return!this.sel_.absEqua ls(a)};cvox.BrailleUtil={};cvox.BrailleUtil.ITEM_SEPARATOR=" ";cvox.BrailleUtil. CONTAINER="tag_h1_brl tag_h2_brl tag_h3_brl tag_h4_brl tag_h5_brl tag_h6_brl".sp lit(" "); 1036 cvox.PageSelection.prototype.extend=function(a){this.sel_.directedBefore(a)?this .sel_.end=this.sel_.isReversed()==a.isReversed()?a.end.clone():a.start.clone():t his.sel_=a.clone();this.sel_.select();this.wasBegin_=!1;return!this.sel_.absEqua ls(a)};cvox.BrailleUtil={};cvox.BrailleUtil.ITEM_SEPARATOR=" ";cvox.BrailleUtil. CONTAINER="tag_h1_brl tag_h2_brl tag_h3_brl tag_h4_brl tag_h5_brl tag_h6_brl".sp lit(" ");
1037 cvox.BrailleUtil.TEMPLATE={base:"c n v r s",aria_role_alert:"r: n",aria_role_but ton:"[n]",aria_role_textbox:"n: v r",input_type_button:"[n]",input_type_checkbox :"n (s)",input_type_email:"n: v r",input_type_number:"n: v r",input_type_passwor d:"n: v r",input_type_search:"n: v r",input_type_submit:"[n]",input_type_text:"n : v r",input_type_tel:"n: v r",input_type_url:"n: v r",tag_button:"[n]",tag_text area:"n: v r"};cvox.BrailleUtil.ValueSpan=function(a){this.offset=a}; 1037 cvox.BrailleUtil.TEMPLATE={base:"c n v r s",aria_role_alert:"r: n",aria_role_but ton:"[n]",aria_role_textbox:"n: v r",input_type_button:"[n]",input_type_checkbox :"n (s)",input_type_email:"n: v r",input_type_number:"n: v r",input_type_passwor d:"n: v r",input_type_search:"n: v r",input_type_submit:"[n]",input_type_text:"n : v r",input_type_tel:"n: v r",input_type_url:"n: v r",tag_button:"[n]",tag_text area:"n: v r"};cvox.BrailleUtil.ValueSpan=function(a){this.offset=a};
1038 cvox.BrailleUtil.ValueSpan.fromJson=function(a){return new cvox.BrailleUtil.Valu eSpan(a.offset)};cvox.BrailleUtil.ValueSpan.prototype.toJson=function(){return t his};cvox.Spannable.registerSerializableSpan(cvox.BrailleUtil.ValueSpan,"cvox.Br ailleUtil.ValueSpan",cvox.BrailleUtil.ValueSpan.fromJson,cvox.BrailleUtil.ValueS pan.prototype.toJson);cvox.BrailleUtil.ValueSelectionSpan=function(){};cvox.Span nable.registerStatelessSerializableSpan(cvox.BrailleUtil.ValueSelectionSpan,"cvo x.BrailleUtil.ValueSelectionSpan"); 1038 cvox.BrailleUtil.ValueSpan.fromJson=function(a){return new cvox.BrailleUtil.Valu eSpan(a.offset)};cvox.BrailleUtil.ValueSpan.prototype.toJson=function(){return t his};cvox.Spannable.registerSerializableSpan(cvox.BrailleUtil.ValueSpan,"cvox.Br ailleUtil.ValueSpan",cvox.BrailleUtil.ValueSpan.fromJson,cvox.BrailleUtil.ValueS pan.prototype.toJson);cvox.BrailleUtil.ValueSelectionSpan=function(){};cvox.Span nable.registerStatelessSerializableSpan(cvox.BrailleUtil.ValueSelectionSpan,"cvo x.BrailleUtil.ValueSelectionSpan");
1039 cvox.BrailleUtil.getName=function(a){return a?cvox.DomUtil.getName(a).trim():""} ;cvox.BrailleUtil.getRoleMsg=function(a){if(!a)return"";(a=cvox.DomUtil.getRoleM sg(a,cvox.VERBOSITY_VERBOSE))&&(a=cvox.DomUtil.collapseWhitespace(a));a&&0<a.len gth&&cvox.ChromeVox.msgs.getMsg(a+"_brl")&&(a+="_brl");return a};cvox.BrailleUti l.getRole=function(a){return a?(a=cvox.BrailleUtil.getRoleMsg(a))?cvox.ChromeVox .msgs.getMsg(a):"":""}; 1039 cvox.BrailleUtil.getName=function(a){return a?cvox.DomUtil.getName(a).trim():""} ;cvox.BrailleUtil.getRoleMsg=function(a){if(!a)return"";(a=cvox.DomUtil.getRoleM sg(a,cvox.VERBOSITY_VERBOSE))&&(a=cvox.DomUtil.collapseWhitespace(a));a&&0<a.len gth&&cvox.ChromeVox.msgs.getMsg(a+"_brl")&&(a+="_brl");return a};cvox.BrailleUti l.getRole=function(a){return a?(a=cvox.BrailleUtil.getRoleMsg(a))?cvox.ChromeVox .msgs.getMsg(a):"":""};
1040 cvox.BrailleUtil.getState=function(a){return a?cvox.NodeStateUtil.expand(cvox.Do mUtil.getStateMsgs(a,!0).map(function(a){cvox.ChromeVox.msgs.getMsg(a[0]+"_brl") &&(a[0]+="_brl");return a})):""};cvox.BrailleUtil.getContainer=function(a,b){if( !a||!b)return"";for(var c=cvox.DomUtil.getUniqueAncestors(a,b),d=0,e;e=c[d];d++) if((e=cvox.BrailleUtil.getRoleMsg(e))&&-1!=cvox.BrailleUtil.CONTAINER.indexOf(e) )return cvox.ChromeVox.msgs.getMsg(e);return""}; 1040 cvox.BrailleUtil.getState=function(a){return a?cvox.NodeStateUtil.expand(cvox.Do mUtil.getStateMsgs(a,!0).map(function(a){var c=["dummy","dummy","dummy"];cvox.Ch romeVox.msgs.getMsg(a[0]+"_brl",c)&&(a[0]+="_brl");return a})):""};cvox.BrailleU til.getContainer=function(a,b){if(!a||!b)return"";for(var c=cvox.DomUtil.getUniq ueAncestors(a,b),d=0,e;e=c[d];d++)if((e=cvox.BrailleUtil.getRoleMsg(e))&&-1!=cvo x.BrailleUtil.CONTAINER.indexOf(e))return cvox.ChromeVox.msgs.getMsg(e);return"" };
1041 cvox.BrailleUtil.getValue=function(a){if(!a)return new cvox.Spannable;var b=new cvox.BrailleUtil.ValueSpan(0);if(cvox.DomUtil.isInputTypeText(a)){var c=a.value; "password"===a.type&&(c=c.replace(/./g,"*"));b=new cvox.Spannable(c,b);if(a===do cument.activeElement&&cvox.DomUtil.doesInputSupportSelection(a)){var d=goog.math .clamp(a.selectionStart,0,b.getLength());a=goog.math.clamp(a.selectionEnd,0,b.ge tLength());b.setSpan(new cvox.BrailleUtil.ValueSelectionSpan,Math.min(d,a),Math. max(d,a))}return b}if(a instanceof 1041 cvox.BrailleUtil.getValue=function(a){if(!a)return new cvox.Spannable;var b=new cvox.BrailleUtil.ValueSpan(0);if(cvox.DomUtil.isInputTypeText(a)){var c=a.value; "password"===a.type&&(c=c.replace(/./g,"*"));b=new cvox.Spannable(c,b);if(a===do cument.activeElement&&cvox.DomUtil.doesInputSupportSelection(a)){var d=goog.math .clamp(a.selectionStart,0,b.getLength());a=goog.math.clamp(a.selectionEnd,0,b.ge tLength());b.setSpan(new cvox.BrailleUtil.ValueSelectionSpan,Math.min(d,a),Math. max(d,a))}return b}if(a instanceof
1042 HTMLTextAreaElement){d=new cvox.EditableTextAreaShadow;d.update(a);var e=d.getLi neIndex(a.selectionEnd),c=d.getLineStart(e),d=d.getLineEnd(e),d=a.value.substrin g(c,d);b.offset=c;b=new cvox.Spannable(d,b);a===document.activeElement&&(d=goog. math.clamp(a.selectionStart-c,0,b.getLength()),a=goog.math.clamp(a.selectionEnd- c,0,b.getLength()),b.setSpan(new cvox.BrailleUtil.ValueSelectionSpan,Math.min(d, a),Math.max(d,a)));return b}return new cvox.Spannable(cvox.DomUtil.getValue(a),b )}; 1042 HTMLTextAreaElement){d=new cvox.EditableTextAreaShadow;d.update(a);var e=d.getLi neIndex(a.selectionEnd),c=d.getLineStart(e),d=d.getLineEnd(e),d=a.value.substrin g(c,d);b.offset=c;b=new cvox.Spannable(d,b);a===document.activeElement&&(d=goog. math.clamp(a.selectionStart-c,0,b.getLength()),a=goog.math.clamp(a.selectionEnd- c,0,b.getLength()),b.setSpan(new cvox.BrailleUtil.ValueSelectionSpan,Math.min(d, a),Math.max(d,a)));return b}return new cvox.Spannable(cvox.DomUtil.getValue(a),b )};
1043 cvox.BrailleUtil.getTemplated=function(a,b,c){c=c?c:{};var d=c.roleMsg||(b?cvox. DomUtil.getRoleMsg(b,cvox.VERBOSITY_VERBOSE):""),e=c.role;!e&&c.roleMsg&&(e=cvox .ChromeVox.msgs.getMsg(c.roleMsg+"_brl")||cvox.ChromeVox.msgs.getMsg(c.roleMsg)) ;for(var e=e||cvox.BrailleUtil.getRole(b),d=cvox.BrailleUtil.TEMPLATE[d]||cvox.B railleUtil.TEMPLATE.base,f=new cvox.Spannable,g=function(d){switch(d){case "n":r eturn c.name||cvox.BrailleUtil.getName(b);case "r":return e;case "s":return c.st ate||cvox.BrailleUtil.getState(b); 1043 cvox.BrailleUtil.getTemplated=function(a,b,c){c=c?c:{};var d=c.roleMsg||(b?cvox. DomUtil.getRoleMsg(b,cvox.VERBOSITY_VERBOSE):""),e=c.role;!e&&c.roleMsg&&(e=cvox .ChromeVox.msgs.getMsg(c.roleMsg+"_brl")||cvox.ChromeVox.msgs.getMsg(c.roleMsg)) ;for(var e=e||cvox.BrailleUtil.getRole(b),d=cvox.BrailleUtil.TEMPLATE[d]||cvox.B railleUtil.TEMPLATE.base,f=new cvox.Spannable,g=function(d){switch(d){case "n":r eturn c.name||cvox.BrailleUtil.getName(b);case "r":return e;case "s":return c.st ate||cvox.BrailleUtil.getState(b);
1044 case "c":return c.container||cvox.BrailleUtil.getContainer(a,b);case "v":return c.value||cvox.BrailleUtil.getValue(b);default:return d}},h=0;h<d.length;h++){var k=g(d[h]);f.append(k);k.toString()||" "!=d[h+1]||h++}return f.trimRight()};cvox .BrailleUtil.createValue=function(a,b,c,d){a=new cvox.Spannable(a,new cvox.Brail leUtil.ValueSpan(d||0));goog.isDef(b)&&(c=goog.isDef(c)?c:b,b>c&&(d=b,b=c,c=d),a .setSpan(new cvox.BrailleUtil.ValueSelectionSpan,b,c));return a}; 1044 case "c":return c.container||cvox.BrailleUtil.getContainer(a,b);case "v":return c.value||cvox.BrailleUtil.getValue(b);default:return d}},h=0;h<d.length;h++){var k=g(d[h]);f.append(k);k.toString()||" "!=d[h+1]||h++}return f.trimRight()};cvox .BrailleUtil.createValue=function(a,b,c,d){a=new cvox.Spannable(a,new cvox.Brail leUtil.ValueSpan(d||0));goog.isDef(b)&&(c=goog.isDef(c)?c:b,b>c&&(d=b,b=c,c=d),a .setSpan(new cvox.BrailleUtil.ValueSelectionSpan,b,c));return a};
1045 cvox.BrailleUtil.click=function(a,b){var c=a.text.getSpans(b||0),d=c.filter(func tion(a){return a instanceof Node})[0];d&&(cvox.Focuser.setFocus(d),goog.isDef(b) &&(cvox.DomUtil.isInputTypeText(d)||d instanceof HTMLTextAreaElement)&&(c=c.filt er(function(a){return a instanceof cvox.BrailleUtil.ValueSpan})[0]))&&(c=b-a.tex t.getSpanStart(c)+c.offset,cvox.ChromeVoxEventWatcher.setUpTextHandler(),d.selec tionStart=d.selectionEnd=c,cvox.ChromeVoxEventWatcher.handleTextChanged(!0));cvo x.DomUtil.clickElem(d|| 1045 cvox.BrailleUtil.click=function(a,b){var c=a.text.getSpans(b||0),d=c.filter(func tion(a){return a instanceof Node})[0];d&&(cvox.Focuser.setFocus(d),goog.isDef(b) &&(cvox.DomUtil.isInputTypeText(d)||d instanceof HTMLTextAreaElement)&&(c=c.filt er(function(a){return a instanceof cvox.BrailleUtil.ValueSpan})[0]))&&(c=b-a.tex t.getSpanStart(c)+c.offset,cvox.ChromeVoxEventWatcher.setUpTextHandler(),d.selec tionStart=d.selectionEnd=c,cvox.ChromeVoxEventWatcher.handleTextChanged(!0));cvo x.DomUtil.clickElem(d||
1046 cvox.ChromeVox.navigationManager.getCurrentNode(),!1,!1)};cvox.MathmlStoreUtil={ };cvox.MathmlStoreUtil.matchMathjaxToMathml=function(a){var b=cvox.TraverseMath. getInstance().activeMathmlHost;return b.querySelector("#"+a.id)};cvox.MathmlStor eUtil.retrieveMathjaxExtender=function(a){return(a=cvox.MathmlStoreUtil.matchMat hjaxToMathml(a))?[a]:[]};cvox.MathmlStoreUtil.retrieveMathjaxLeaf=function(a){re turn(a=cvox.MathmlStoreUtil.matchMathjaxToMathml(a))?[a]:[]}; 1046 cvox.ChromeVox.navigationManager.getCurrentNode(),!1,!1)};cvox.MathmlStoreUtil={ };cvox.MathmlStoreUtil.matchMathjaxToMathml=function(a){var b=cvox.TraverseMath. getInstance().activeMathmlHost;return b.querySelector("#"+a.id)};cvox.MathmlStor eUtil.retrieveMathjaxExtender=function(a){return(a=cvox.MathmlStoreUtil.matchMat hjaxToMathml(a))?[a]:[]};cvox.MathmlStoreUtil.retrieveMathjaxLeaf=function(a){re turn(a=cvox.MathmlStoreUtil.matchMathjaxToMathml(a))?[a]:[]};
1047 cvox.MathmlStoreUtil.checkMathjaxTag=function(a,b){var c=cvox.MathmlStoreUtil.ma tchMathjaxToMathml(a);return c&&c.tagName.toUpperCase()==b?[c]:[]};cvox.MathmlSt oreUtil.checkMathjaxMunder=function(a){return cvox.MathmlStoreUtil.checkMathjaxT ag(a,"MUNDER")};cvox.MathmlStoreUtil.checkMathjaxMover=function(a){return cvox.M athmlStoreUtil.checkMathjaxTag(a,"MOVER")};cvox.MathmlStoreUtil.checkMathjaxMsub =function(a){return cvox.MathmlStoreUtil.checkMathjaxTag(a,"MSUB")}; 1047 cvox.MathmlStoreUtil.checkMathjaxTag=function(a,b){var c=cvox.MathmlStoreUtil.ma tchMathjaxToMathml(a);return c&&c.tagName.toUpperCase()==b?[c]:[]};cvox.MathmlSt oreUtil.checkMathjaxMunder=function(a){return cvox.MathmlStoreUtil.checkMathjaxT ag(a,"MUNDER")};cvox.MathmlStoreUtil.checkMathjaxMover=function(a){return cvox.M athmlStoreUtil.checkMathjaxTag(a,"MOVER")};cvox.MathmlStoreUtil.checkMathjaxMsub =function(a){return cvox.MathmlStoreUtil.checkMathjaxTag(a,"MSUB")};
1048 cvox.MathmlStoreUtil.checkMathjaxMsup=function(a){return cvox.MathmlStoreUtil.ch eckMathjaxTag(a,"MSUP")};cvox.MathmlStoreUtil.nextSeparatorFunction=function(a){ if(a){if(a.match(/^\s+$/))return null;var b=a.replace(/\s/g,"").split("").filter (function(a){return a})}else b=[","];return function(){return 1<b.length?b.shift ():b[0]}};cvox.MathmlStoreUtil.mfencedSeparators=function(a,b){var c=cvox.Mathml StoreUtil.nextSeparatorFunction(b);return function(){return c?c():""}}; 1048 cvox.MathmlStoreUtil.checkMathjaxMsup=function(a){return cvox.MathmlStoreUtil.ch eckMathjaxTag(a,"MSUP")};cvox.MathmlStoreUtil.nextSeparatorFunction=function(a){ if(a){if(a.match(/^\s+$/))return null;var b=a.replace(/\s/g,"").split("").filter (function(a){return a})}else b=[","];return function(){return 1<b.length?b.shift ():b[0]}};cvox.MathmlStoreUtil.mfencedSeparators=function(a,b){var c=cvox.Mathml StoreUtil.nextSeparatorFunction(b);return function(){return c?c():""}};
1049 cvox.MathmlStoreUtil.contentIterator=function(a,b){var c=0<a.length?cvox.XpathUt il.evalXPath("../../content/*",a[0]):[];return function(){var a=c.shift();return b+(a?a.textContent:"")}};cvox.StoreUtil={};cvox.StoreUtil.nodeCounter=function( a,b){var c=a.length,d=0,e=b;b||(e="");return function(){d<c&&(d+=1);return e+" " +d}};cvox.MathmlStoreRules=function(){cvox.MathmlStoreRules.initCustomFunctions_ ();cvox.MathmlStoreRules.initDefaultRules_();cvox.MathmlStoreRules.initMathjaxRu les_();cvox.MathmlStoreRules.initAliases_();cvox.MathmlStoreRules.initSpecializa tionRules_();cvox.MathmlStoreRules.initSemanticRules_()};goog.addSingletonGetter (cvox.MathmlStoreRules);cvox.MathmlStoreRules.mathStore=cvox.MathmlStore.getInst ance();cvox.MathmlStoreRules.mathStore.initialize=cvox.MathmlStoreRules.getInsta nce; 1049 cvox.MathmlStoreUtil.contentIterator=function(a,b){var c=0<a.length?cvox.XpathUt il.evalXPath("../../content/*",a[0]):[];return function(){var a=c.shift();return b+(a?a.textContent:"")}};cvox.StoreUtil={};cvox.StoreUtil.nodeCounter=function( a,b){var c=a.length,d=0,e=b;b||(e="");return function(){d<c&&(d+=1);return e+" " +d}};cvox.MathmlStoreRules=function(){cvox.MathmlStoreRules.initCustomFunctions_ ();cvox.MathmlStoreRules.initDefaultRules_();cvox.MathmlStoreRules.initMathjaxRu les_();cvox.MathmlStoreRules.initAliases_();cvox.MathmlStoreRules.initSpecializa tionRules_();cvox.MathmlStoreRules.initSemanticRules_()};goog.addSingletonGetter (cvox.MathmlStoreRules);cvox.MathmlStoreRules.mathStore=cvox.MathmlStore.getInst ance();cvox.MathmlStoreRules.mathStore.initialize=cvox.MathmlStoreRules.getInsta nce;
1050 cvox.MathmlStoreRules.defineDefaultMathmlRule_=goog.bind(cvox.MathmlStoreRules.m athStore.defineDefaultMathmlRule,cvox.MathmlStoreRules.mathStore);cvox.MathmlSto reRules.defineRule_=goog.bind(cvox.MathmlStoreRules.mathStore.defineRule,cvox.Ma thmlStoreRules.mathStore);cvox.MathmlStoreRules.defineRuleAlias_=goog.bind(cvox. MathmlStoreRules.mathStore.defineRuleAlias,cvox.MathmlStoreRules.mathStore); 1050 cvox.MathmlStoreRules.defineDefaultMathmlRule_=goog.bind(cvox.MathmlStoreRules.m athStore.defineDefaultMathmlRule,cvox.MathmlStoreRules.mathStore);cvox.MathmlSto reRules.defineRule_=goog.bind(cvox.MathmlStoreRules.mathStore.defineRule,cvox.Ma thmlStoreRules.mathStore);cvox.MathmlStoreRules.defineRuleAlias_=goog.bind(cvox. MathmlStoreRules.mathStore.defineRuleAlias,cvox.MathmlStoreRules.mathStore);
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 cvox.ChromeMathJax.prototype.dispatchMessage=function(a){var b,c=[];switch(a.cmd ){case "NodeMml":b=this.convertMarkupToDom;c=["mathml","elementId"];break;case " Active":b=this.applyBoolean,c=["status"]}if(!b)throw"Unknown MathJax call: "+a.c md;var d=this.retrieveCallback_(a.id),e=a.args;d&&b&&b.apply(this,[d].concat(c.m ap(function(a){return e[a]})))};cvox.ChromeMathJax.prototype.applyBoolean=functi on(a,b){a(b)}; 1564 cvox.ChromeMathJax.prototype.dispatchMessage=function(a){var b,c=[];switch(a.cmd ){case "NodeMml":b=this.convertMarkupToDom;c=["mathml","elementId"];break;case " Active":b=this.applyBoolean,c=["status"]}if(!b)throw"Unknown MathJax call: "+a.c md;var d=this.retrieveCallback_(a.id),e=a.args;d&&b&&b.apply(this,[d].concat(c.m ap(function(a){return e[a]})))};cvox.ChromeMathJax.prototype.applyBoolean=functi on(a,b){a(b)};
1565 cvox.ChromeMathJax.prototype.isMathjaxActive=function(a){var b=0,c=goog.bind(fun ction(){b++;try{this.postMsg("Active",function(d){d?a(d):5>b&&setTimeout(c,1E3)} )}catch(d){if(5>b)setTimeout(c,1E3);else throw d;}},this);c()};cvox.ChromeMathJa x.prototype.getAllJax=function(a){this.postMsg("AllJax",a)};cvox.ChromeMathJax.p rototype.registerSignal=function(a,b){this.postMsg("RegSig",a,{sig:b})}; 1565 cvox.ChromeMathJax.prototype.isMathjaxActive=function(a){var b=0,c=goog.bind(fun ction(){b++;try{this.postMsg("Active",function(d){d?a(d):5>b&&setTimeout(c,1E3)} )}catch(d){if(5>b)setTimeout(c,1E3);else throw d;}},this);c()};cvox.ChromeMathJa x.prototype.getAllJax=function(a){this.postMsg("AllJax",a)};cvox.ChromeMathJax.p rototype.registerSignal=function(a,b){this.postMsg("RegSig",a,{sig:b})};
1566 cvox.ChromeMathJax.prototype.injectScripts=function(){var a=0,b=goog.bind(functi on(){a++;this.port?this.postMsg("InjectScripts",function(){}):10>a&&setTimeout(b ,500)},this);b()};cvox.ChromeMathJax.prototype.configMediaWiki=function(){this.p ostMsg("ConfWikipedia",function(){})};cvox.ChromeMathJax.prototype.getTex=functi on(a,b){var c=b.alt||b.title;if(c){var d="cvoxId-"+this.texNodeId_++;b.setAttrib ute("cvoxId",d);this.postMsg("TexToMml",a,{alt:c,id:d})}}; 1566 cvox.ChromeMathJax.prototype.injectScripts=function(){var a=0,b=goog.bind(functi on(){a++;this.port?this.postMsg("InjectScripts",function(){}):10>a&&setTimeout(b ,500)},this);b()};cvox.ChromeMathJax.prototype.configMediaWiki=function(){this.p ostMsg("ConfWikipedia",function(){})};cvox.ChromeMathJax.prototype.getTex=functi on(a,b){var c=b.alt||b.title;if(c){var d="cvoxId-"+this.texNodeId_++;b.setAttrib ute("cvoxId",d);this.postMsg("TexToMml",a,{alt:c,id:d})}};
1567 cvox.ChromeMathJax.prototype.getAsciiMath=function(a,b){var c=b.alt||b.title;if( c){var d="cvoxId-"+this.texNodeId_++;b.setAttribute("cvoxId",d);this.postMsg("As ciiMathToMml",a,{alt:c,id:d})}};cvox.HostFactory.mathJaxConstructor=cvox.ChromeM athJax;cvox.ChromeMsgs=function(){};goog.inherits(cvox.ChromeMsgs,cvox.AbstractM sgs);cvox.ChromeMsgs.NAMESPACE_="chromevox_";cvox.ChromeMsgs.prototype.getMsg=fu nction(a,b){var c=chrome.i18n.getMessage(cvox.ChromeMsgs.NAMESPACE_+a,b);if(void 0==c||""==c)throw Error("Invalid ChromeVox message id: "+a);return c};cvox.Chro meMsgs.prototype.getNumber=function(a){return""+a};cvox.HostFactory.msgsConstruc tor=cvox.ChromeMsgs;cvox.ChromeTtsBase=function(){cvox.AbstractTts.call(this);th is.propertyDefault.pitch=1;this.propertyMin.pitch=.2;this.propertyMax.pitch=2;th is.propertyDefault.rate=1;this.propertyMin.rate=.2;this.propertyMax.rate=5;this. propertyDefault.volume=1;this.propertyMin.volume=.2;this.propertyMax.volume=1};g oog.inherits(cvox.ChromeTtsBase,cvox.AbstractTts);cvox.ChromeTts=function(){cvox .ChromeTtsBase.call(this);this.addBridgeListener()};goog.inherits(cvox.ChromeTts ,cvox.ChromeTtsBase);cvox.ChromeTts.callId=1;cvox.ChromeTts.functionMap={};cvox. ChromeTts.prototype.speak=function(a,b,c){c||(c={});cvox.ChromeTts.superClass_.s peak.call(this,a,b,c);cvox.ExtensionBridge.send(this.createMessageForProperties_ (a,b,c))};cvox.ChromeTts.prototype.isSpeaking=function(){cvox.ChromeTts.superCla ss_.isSpeaking.call(this);return!1}; 1567 cvox.ChromeMathJax.prototype.getAsciiMath=function(a,b){var c=b.alt||b.title;if( c){var d="cvoxId-"+this.texNodeId_++;b.setAttribute("cvoxId",d);this.postMsg("As ciiMathToMml",a,{alt:c,id:d})}};cvox.HostFactory.mathJaxConstructor=cvox.ChromeM athJax;cvox.ChromeMsgs=function(){};goog.inherits(cvox.ChromeMsgs,cvox.AbstractM sgs);cvox.ChromeMsgs.NAMESPACE_="chromevox_";cvox.ChromeMsgs.prototype.getMsg=fu nction(a,b){var c=chrome.i18n.getMessage(cvox.ChromeMsgs.NAMESPACE_+a,b);if(void 0==c||""==c)throw Error("Invalid ChromeVox message id: "+a);return c};cvox.Chro meMsgs.prototype.getNumber=function(a){return""+a};cvox.HostFactory.msgsConstruc tor=cvox.ChromeMsgs;cvox.ChromeTtsBase=function(){cvox.AbstractTts.call(this);th is.propertyDefault.pitch=1;this.propertyMin.pitch=.2;this.propertyMax.pitch=2;th is.propertyDefault.rate=1;this.propertyMin.rate=.2;this.propertyMax.rate=5;this. propertyDefault.volume=1;this.propertyMin.volume=.2;this.propertyMax.volume=1};g oog.inherits(cvox.ChromeTtsBase,cvox.AbstractTts);cvox.ChromeTts=function(){cvox .ChromeTtsBase.call(this);this.addBridgeListener()};goog.inherits(cvox.ChromeTts ,cvox.ChromeTtsBase);cvox.ChromeTts.callId=1;cvox.ChromeTts.functionMap={};cvox. ChromeTts.prototype.speak=function(a,b,c){c||(c={});cvox.ChromeTts.superClass_.s peak.call(this,a,b,c);cvox.ExtensionBridge.send(this.createMessageForProperties_ (a,b,c))};cvox.ChromeTts.prototype.isSpeaking=function(){cvox.ChromeTts.superCla ss_.isSpeaking.call(this);return!1};
1568 cvox.ChromeTts.prototype.stop=function(){cvox.ChromeTts.superClass_.stop.call(th is);cvox.ExtensionBridge.send({target:"TTS",action:"stop"})};cvox.ChromeTts.prot otype.increaseOrDecreaseProperty=function(a,b){cvox.ExtensionBridge.send({target :"TTS",action:"increaseOrDecrease",property:a,increase:b})};cvox.ChromeTts.proto type.addBridgeListener=function(){cvox.ExtensionBridge.addMessageListener(functi on(a){var b=a.message;"TTS_CALLBACK"==b&&(a=a.id,b=cvox.ChromeTts.functionMap[a] ,void 0!=b&&(b(),delete cvox.ChromeTts.functionMap[a]))})}; 1568 cvox.ChromeTts.prototype.stop=function(){cvox.ChromeTts.superClass_.stop.call(th is);cvox.ExtensionBridge.send({target:"TTS",action:"stop"})};cvox.ChromeTts.prot otype.increaseOrDecreaseProperty=function(a,b){cvox.ExtensionBridge.send({target :"TTS",action:"increaseOrDecrease",property:a,increase:b})};cvox.ChromeTts.proto type.addBridgeListener=function(){cvox.ExtensionBridge.addMessageListener(functi on(a){var b=a.message;"TTS_CALLBACK"==b&&(a=a.id,b=cvox.ChromeTts.functionMap[a] ,void 0!=b&&(b(),delete cvox.ChromeTts.functionMap[a]))})};
1569 cvox.ChromeTts.prototype.createMessageForProperties_=function(a,b,c){a={target:" TTS",action:"speak",text:a,queueMode:b,properties:c};void 0!=c.startCallback&&(c vox.ChromeTts.functionMap[cvox.ChromeTts.callId]=c.startCallback,a.startCallback Id=cvox.ChromeTts.callId++);void 0!=c.endCallback&&(cvox.ChromeTts.functionMap[c vox.ChromeTts.callId]=c.endCallback,a.endCallbackId=cvox.ChromeTts.callId++);ret urn a};cvox.HostFactory.ttsConstructor=cvox.ChromeTts;cvox.Serializer=function() {};cvox.Serializer.prototype.storeOn=function(a){cvox.ChromeVox.storeOn(a);cvox. ChromeVoxEventWatcher.storeOn(a)};cvox.Serializer.prototype.readFrom=function(a) {cvox.ChromeVox.readFrom(a);cvox.ChromeVoxEventWatcher.readFrom(a)};cvox.InitGlo bals=function(){}; 1569 cvox.ChromeTts.prototype.createMessageForProperties_=function(a,b,c){a={target:" TTS",action:"speak",text:a,queueMode:b,properties:c};void 0!=c.startCallback&&(c vox.ChromeTts.functionMap[cvox.ChromeTts.callId]=c.startCallback,a.startCallback Id=cvox.ChromeTts.callId++);void 0!=c.endCallback&&(cvox.ChromeTts.functionMap[c vox.ChromeTts.callId]=c.endCallback,a.endCallbackId=cvox.ChromeTts.callId++);ret urn a};cvox.HostFactory.ttsConstructor=cvox.ChromeTts;cvox.Serializer=function() {};cvox.Serializer.prototype.storeOn=function(a){cvox.ChromeVox.storeOn(a);cvox. ChromeVoxEventWatcher.storeOn(a)};cvox.Serializer.prototype.readFrom=function(a) {cvox.ChromeVox.readFrom(a);cvox.ChromeVoxEventWatcher.readFrom(a)};cvox.InitGlo bals=function(){};
1570 cvox.InitGlobals.initGlobals=function(){cvox.ChromeVox.host||(cvox.ChromeVox.hos t=cvox.HostFactory.getHost());cvox.ChromeVox.tts=(new cvox.CompositeTts).add(cvo x.HostFactory.getTts()).add(cvox.History.getInstance()).add(cvox.ConsoleTts.getI nstance());cvox.ChromeVox.braille||(cvox.ChromeVox.braille=cvox.HostFactory.getB raille());cvox.ChromeVox.mathJax=cvox.HostFactory.getMathJax();cvox.ChromeVox.ea rcons=cvox.HostFactory.getEarcons();cvox.ChromeVox.msgs=cvox.HostFactory.getMsgs ();cvox.ChromeVox.isActive= 1570 cvox.InitGlobals.initGlobals=function(){cvox.ChromeVox.host||(cvox.ChromeVox.hos t=cvox.HostFactory.getHost());cvox.ChromeVox.tts=(new cvox.CompositeTts).add(cvo x.HostFactory.getTts()).add(cvox.History.getInstance()).add(cvox.ConsoleTts.getI nstance());cvox.ChromeVox.braille||(cvox.ChromeVox.braille=cvox.HostFactory.getB raille());cvox.ChromeVox.mathJax=cvox.HostFactory.getMathJax();cvox.ChromeVox.ea rcons=cvox.HostFactory.getEarcons();cvox.ChromeVox.msgs=cvox.HostFactory.getMsgs ();cvox.ChromeVox.isActive=
1571 !0;cvox.ChromeVox.navigationManager=new cvox.NavigationManager;cvox.ChromeVox.na vigationManager.updateIndicator();cvox.ChromeVox.syncToNode=cvox.ApiImplementati on.syncToNode;cvox.ChromeVox.speakNode=cvox.ApiImplementation.speakNode;cvox.Chr omeVox.serializer=new cvox.Serializer;cvox.ChromeVox.host.init();cvox.ChromeVoxE ventWatcher.init(window);cvox.ChromeVox.executeUserCommand=function(a){cvox.Chro meVoxUserCommands.commands[a]()};cvox.ChromeVox.host.onPageLoad()};cvox.ChromeVo xInit={};cvox.ChromeVox.initTimeout_=100;cvox.ChromeVox.recallInit_=function(a){ window.console.log(a+" Will try again in "+cvox.ChromeVox.initTimeout_+"ms");win dow.setTimeout(cvox.ChromeVox.initDocument,cvox.ChromeVox.initTimeout_);cvox.Chr omeVox.initTimeout_*=2}; 1571 !0;cvox.ChromeVox.navigationManager=new cvox.NavigationManager;cvox.ChromeVox.na vigationManager.updateIndicator();cvox.ChromeVox.syncToNode=cvox.ApiImplementati on.syncToNode;cvox.ChromeVox.speakNode=cvox.ApiImplementation.speakNode;cvox.Chr omeVox.serializer=new cvox.Serializer;cvox.ChromeVox.host.init();cvox.ChromeVoxE ventWatcher.init(window);cvox.ChromeVox.executeUserCommand=function(a){cvox.Chro meVoxUserCommands.commands[a]()};cvox.ChromeVox.host.onPageLoad()};cvox.ChromeVo xInit={};cvox.ChromeVox.initTimeout_=100;cvox.ChromeVox.recallInit_=function(a){ window.console.log(a+" Will try again in "+cvox.ChromeVox.initTimeout_+"ms");win dow.setTimeout(cvox.ChromeVox.initDocument,cvox.ChromeVox.initTimeout_);cvox.Chr omeVox.initTimeout_*=2};
1572 cvox.ChromeVox.initDocument=function(){document.body?(cvox.ChromeVox.host=cvox.H ostFactory.getHost(),cvox.ChromeVox.host.ttsLoaded()?(window.console.log("Starti ng ChromeVox."),cvox.InitGlobals.initGlobals(),window.disableChromeVox=function( ){cvox.ChromeVox.host.killChromeVox()}):cvox.ChromeVox.recallInit_("ChromeVox no t starting; waiting for TTS. "+document.location.href+".")):cvox.ChromeVox.recal lInit_("ChromeVox not starting on unloaded page: "+document.location.href+".")}; 1572 cvox.ChromeVox.initDocument=function(){document.body?(cvox.ChromeVox.host=cvox.H ostFactory.getHost(),cvox.ChromeVox.host.ttsLoaded()?(window.console.log("Starti ng ChromeVox."),cvox.InitGlobals.initGlobals(),window.disableChromeVox=function( ){cvox.ChromeVox.host.killChromeVox()}):cvox.ChromeVox.recallInit_("ChromeVox no t starting; waiting for TTS. "+document.location.href+".")):cvox.ChromeVox.recal lInit_("ChromeVox not starting on unloaded page: "+document.location.href+".")};
1573 cvox.ChromeVox.reinit=function(){cvox.ChromeVox.host.reinit();cvox.ChromeVox.ini tDocument()};window.CLOSURE_USE_EXT_MESSAGES=!0;cvox.ChromeVox.initDocument(); 1573 cvox.ChromeVox.reinit=function(){cvox.ChromeVox.host.reinit();cvox.ChromeVox.ini tDocument()};window.CLOSURE_USE_EXT_MESSAGES=!0;cvox.ChromeVox.initDocument();
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/common/braille_util.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698