Home | History | Annotate | Download | only in chromevox

Lines Matching refs:collapseWhitespace

87 goog.string.caseInsensitiveEquals=function(a,b){return a.toLowerCase()==b.toLowerCase()};goog.string.subs=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")};goog.string.collapseWhitespace=function(a){return a.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")};goog.string.isEmpty=function(a){return/^[\s\xa0]*$/.test(a)};goog.string.isEmptySafe=function(a){return goog.string.isEmpty(goog.string.makeSafe(a))};
754 cvox.DomUtil.collapseWhitespace=function(a){return a.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")};
756 !0,c);0==d.length&&a&&a.id&&(a=document.querySelector('label[for="'+a.id+'"]'))&&(d=cvox.DomUtil.getName(a,b,c))}return cvox.DomUtil.collapseWhitespace(d)};cvox.DomUtil.getNearestAncestorLabel_=function(a){for(var b="";a&&"LABEL"!=a.tagName;)a=a.parentElement;a&&!a.hasAttribute("for")&&(b=cvox.DomUtil.getName(a,!0,!1));return b};
760 b:b):0<e.length?e:0==cvox.DomUtil.collapseWhitespace(a.textContent).length&&a.hasAttribute&&a.hasAttribute("title")?a.getAttribute("title"):!b||cvox.AriaUtil.isCompositeControl(a)?"":cvox.DomUtil.hasChildrenBasedName_(a,d)?cvox.DomUtil.getNameFromChildren(a,c,d):""};
765 d++;if(b&&c){for(var d=a,e=0;d&&!cvox.DomUtil.isDescendantOfNode(b,d);)d=d.parentNode,e++;d=a;for(a=0;d&&!cvox.DomUtil.isDescendantOfNode(c,d);)d=d.parentNode,a++;b=a<e?c:b}else b=b||c;return b?cvox.DomUtil.collapseWhitespace(cvox.DomUtil.getValue(b)+" "+cvox.DomUtil.getName(b)):""};
766 cvox.DomUtil.getValue=function(a){var b=cvox.AriaUtil.getActiveDescendant(a);if(b)return cvox.DomUtil.collapseWhitespace(cvox.DomUtil.getValue(b)+" "+cvox.DomUtil.getName(b));if(a.constructor==HTMLSelectElement){var b="",c=a.selectedOptions?a.selectedOptions[0]:null;a=a.selectedOptions?a.selectedOptions[a.selectedOptions.length-1]:null;c&&a&&c!=a?b=cvox.ChromeVox.msgs.getMsg("selected_options_value",[c.text,a.text]):c&&(b=c.text+"");return b}if(a.constructor==HTMLTextAreaElement)return a.value;if(a.constructor==
789 cvox.DomUtil.getControlValueAndStateString=function(a){var b=cvox.DomUtil.getSurroundingControl(a);return b?cvox.DomUtil.collapseWhitespace(cvox.DomUtil.getValue(a)+" "+cvox.DomUtil.getName(a)+" "+cvox.DomUtil.getState(a,!0)):cvox.DomUtil.collapseWhitespace(cvox.DomUtil.getValue(a)+" "+cvox.DomUtil.getState(a,!0))};cvox.DomUtil.isInternalLink=function(a){return 1==a.nodeType&&(a=a.getAttribute("href"))&&-1!=a.indexOf("#")?(a=a.split("#")[0],""==a||a==window.location.pathname):!1};
893 cvox.BrailleUtil.getName=function(a){return a?cvox.DomUtil.getName(a).trim():""};cvox.BrailleUtil.getRoleMsg=function(a){if(!a)return"";(a=cvox.DomUtil.getRoleMsg(a,cvox.VERBOSITY_VERBOSE))&&(a=cvox.DomUtil.collapseWhitespace(a));a&&0<a.length&&cvox.ChromeVox.msgs.getMsg(a+"_brl")&&(a+="_brl");return a};cvox.BrailleUtil.getRole=function(a){return a?(a=cvox.BrailleUtil.getRoleMsg(a))?cvox.ChromeVox.msgs.getMsg(a):"":""};
1045 cvox.HistoryEvent.prototype.outputJs=function(){var a="this.waitForCalm(this.userCommand, '"+this.userCommand_+"')";return a=0<this.spoken_.length?a+("\n .waitForCalm(this.assertSpoken, '"+cvox.DomUtil.collapseWhitespace(this.spoken_.join(" "))+"');\n"):a+";\n"};cvox.History=function(){this.recording_=!1;this.events_=[];this.styleDiv_=this.listDiv_=this.mainDiv_=this.currentEvent_=null;this.nodeBreadcrumb_=cvox.NodeBreadcrumb.getInstance()};goog.addSingletonGetter(cvox.History);
1233 cvox.DescriptionUtil.getControlDescription=function(a,b){var c=[a];if(b&&0<b.length)c=b;else{var d=cvox.DomUtil.getSurroundingControl(a);d&&(c=[d,a])}c=cvox.DescriptionUtil.getDescriptionFromAncestors(c,!0,cvox.VERBOSITY_VERBOSE);if(d){var e=cvox.DomUtil.getName(d);0==e.length&&(e=cvox.DomUtil.getControlLabelHeuristics(d),0<e.length&&(c.context=e+" "+c.context))}else e=cvox.DomUtil.getName(a),0==e.length&&(e=cvox.DomUtil.getControlLabelHeuristics(a),0<e.length&&(c.text=cvox.DomUtil.collapseWhitespace(e))),
1234 d=cvox.DomUtil.getValue(a),0<d.length&&(c.userValue=cvox.DomUtil.collapseWhitespace(d));return c};
1236 q.length&&(0<e.length||0<h.length&&1<p.childElementCount?e=q+" "+cvox.DomUtil.getState(p,!1)+" "+e:h=0<h.length?h+(" "+q+" "+cvox.DomUtil.getState(p,!0)):q+" "+cvox.DomUtil.getState(p,!0));p=cvox.EarconUtil.getEarcon(p);null!=p&&-1==k.indexOf(p)&&k.push(p)}}return new cvox.NavDescription({context:cvox.DomUtil.collapseWhitespace(e),text:cvox.DomUtil.collapseWhitespace(f),userValue:cvox.DomUtil.collapseWhitespace(g),annotation:cvox.DomUtil.collapseWhitespace(h),earcons:k,personality:l,hint:cvox.DomUtil.collapseWhitespace(n)})};
1348 cvox.TableWalker.prototype.getRowHeaderText_=function(a){var b="",c=this.tt.getCellRowHeaders();if(0==c.length)return c=this.tt.getCellAt([a[0],0]),b+=cvox.DomUtil.collapseWhitespace(cvox.DomUtil.getValue(c)+" "+cvox.DomUtil.getName(c)),cvox.ChromeVox.msgs.getMsg("row_header")+b;for(a=0;a<c.length;++a)b+=cvox.DomUtil.collapseWhitespace(cvox.DomUtil.getValue(c[a])+" "+cvox.DomUtil.getName(c[a]));return""==b?cvox.ChromeVox.msgs.getMsg("empty_row_header"):cvox.ChromeVox.msgs.getMsg("row_header")+b};
1349 cvox.TableWalker.prototype.getColHeaderText_=function(a){var b="",c=this.tt.getCellColHeaders();if(0==c.length)return c=this.tt.getCellAt([0,a[1]]),b+=cvox.DomUtil.collapseWhitespace(cvox.DomUtil.getValue(c)+" "+cvox.DomUtil.getName(c)),cvox.ChromeVox.msgs.getMsg("column_header")+b;for(a=0;a<c.length;++a)b+=cvox.DomUtil.collapseWhitespace(cvox.DomUtil.getValue(c[a])+" "+cvox.DomUtil.getName(c[a]));return""==b?cvox.ChromeVox.msgs.getMsg("empty_row_header"):cvox.ChromeVox.msgs.getMsg("column_header")+
1375 cvox.GroupUtil.isLeafNode=function(a){if("LABEL"==a.tagName)return cvox.DomUtil.isLeafNode(a);if(cvox.DomUtil.isLeafNode(a))return!0;if(!cvox.DomUtil.isSemanticElt(a))for(var b=a.querySelectorAll(cvox.GroupUtil.BREAKOUT_SELECTOR_),c=0;c<b.length;++c)if(cvox.DomUtil.hasContent(b[c]))return!1;if(cvox.AriaUtil.isCompositeControl(a)&&!cvox.DomUtil.isFocusable(a))return!1;a=cvox.DomUtil.collapseWhitespace(cvox.DomUtil.getValue(a)+" "+cvox.DomUtil.getName(a));return a.length>cvox.GroupUtil.MAX_CHARCOUNT_||
1442 c[d].text.toLowerCase(),f=e.indexOf(a);-1!=f&&e.length>a.length&&(c[d].text=cvox.DomUtil.collapseWhitespace(e.substring(0,f))+", "+a+", "+e.substring(f+a.length),c[d].text=cvox.DomUtil.collapseWhitespace(c[d].text));if(-1!=f)return c}cvox.ChromeVox.navigationManager.setReversed(b)}while(cvox.ChromeVox.navigationManager.navigate(!0,cvox.NavigationShifter.GRANULARITIES.OBJECT))};cvox.SearchWidget.prototype.beginSearch_=function(a){var b=this.getNextResult_(a);this.outputSearchResult_(b,a);this.onNavigate()};
1500 c<cvox.LiveRegions.INITIAL_SILENCE_MS){c="";for(e=0;e<a.length;e++)c+=a[e].text,c+=a[e].userValue;if(""==cvox.DomUtil.collapseWhitespace(c))return}e=document.webkitHidden?cvox.LiveRegions.HIDDEN_DOC_MAX_DISCARD_DUPS_MS:cvox.LiveRegions.MAX_DISCARD_DUPS_MS;c=new Date;for(var f in cvox.LiveRegions.lastAnnouncedMap)c-cvox.LiveRegions.lastAnnouncedMap[f]>e&&delete cvox.LiveRegions.lastAnnouncedMap[f];f=a.reduce(function(a,b){return a+"|"+b.text},"");cvox.LiveRegions.lastAnnouncedMap[f]||(cvox.LiveRegions.lastAnnouncedMap[f]=
1505 if("alert"!=cvox.AriaUtil.getRoleAttribute(a)&&g<cvox.LiveRegionsDeprecated.INITIAL_SILENCE_MS)return cvox.LiveRegionsDeprecated.previousRegionValue[d]=f,!1;if("alert"==cvox.AriaUtil.getRoleAttribute(a)&&g<cvox.LiveRegionsDeprecated.INITIAL_SILENCE_MS){for(var h="",g=0;g<f.length;g++)h+=f[g].text,h+=f[g].userValue;if(""==cvox.DomUtil.collapseWhitespace(h))return cvox.LiveRegionsDeprecated.previousRegionValue[d]=f,!1}for(var k={},g=0;g<e.length;g++)k[e[g].toString()]=!0;for(var l={},g=0;g<f.length;g++)l[f[g].toString()]=