Lines Matching defs:getNodeText
677 cvox.SelectionUtil.getRangeText=function(a){return a?a.cloneContents().textContent.replace(/\s+/g," "):""};cvox.TraverseUtil=function(){};cvox.TraverseUtil.getNodeText=function(a){return a.constructor==Text?a.data:""};cvox.TraverseUtil.treatAsLeafNode=function(a){return 0==a.childNodes.length||"SELECT"==a.nodeName||"listbox"==a.getAttribute("role")||"OBJECT"==a.nodeName};cvox.TraverseUtil.isWhitespace=function(a){return" "==a||"\n"==a||"\r"==a||"\t"==a};
679 cvox.TraverseUtil.forwardsChar=function(a,b,c){for(;;){var d=null;if(!cvox.TraverseUtil.treatAsLeafNode(a.node))for(var e=a.index;e<a.node.childNodes.length;e++){var f=a.node.childNodes[e];if(cvox.TraverseUtil.isHidden(f))f instanceof HTMLElement&&b.push(f);else if(cvox.DomUtil.isVisible(f,{checkAncestors:!1})){d=f;break}}if(d)a.node=d,a.index=0,a.text=cvox.TraverseUtil.getNodeText(a.node),a.node instanceof HTMLElement&&b.push(a.node);else{if(a.index<a.text.length)return a.text[a.index++];for(;null!=
680 a.node;){d=null;for(f=a.node.nextSibling;null!=f;f=f.nextSibling)if(cvox.TraverseUtil.isHidden(f))f instanceof HTMLElement&&b.push(f);else if(cvox.DomUtil.isVisible(f,{checkAncestors:!1})){d=f;break}if(d){a.node instanceof HTMLElement&&c.push(a.node);a.node=d;a.text=cvox.TraverseUtil.getNodeText(d);a.index=0;a.node instanceof HTMLElement&&b.push(a.node);break}if(a.node.parentNode&&a.node.parentNode.constructor!=HTMLBodyElement)a.node instanceof HTMLElement&&c.push(a.node),a.node=a.node.parentNode,
682 cvox.TraverseUtil.backwardsChar=function(a,b,c){for(;;){var d=null;if(!cvox.TraverseUtil.treatAsLeafNode(a.node))for(var e=a.index-1;0<=e;e--){var f=a.node.childNodes[e];if(cvox.TraverseUtil.isHidden(f))f instanceof HTMLElement&&b.push(f);else if(cvox.DomUtil.isVisible(f,{checkAncestors:!1})){d=f;break}}if(d)a.node=d,a.text=cvox.TraverseUtil.getNodeText(a.node),a.index=a.text.length?a.text.length:a.node.childNodes.length,a.node instanceof HTMLElement&&b.push(a.node);else{if(0<a.text.length&&0<a.index)return a.text[--a.index];
683 for(;;){d=null;for(f=a.node.previousSibling;null!=f;f=f.previousSibling)if(cvox.TraverseUtil.isHidden(f))f instanceof HTMLElement&&b.push(f);else if(cvox.DomUtil.isVisible(f,{checkAncestors:!1})){d=f;break}if(d){a.node instanceof HTMLElement&&c.push(a.node);a.node=d;a.text=cvox.TraverseUtil.getNodeText(d);a.index=a.text.length?a.text.length:a.node.childNodes.length;a.node instanceof HTMLElement&&b.push(a.node);break}if(a.node.parentNode&&a.node.parentNode.constructor!=HTMLBodyElement)a.node instanceof
699 cvox.CursorSelection.prototype.clone=function(){return new cvox.CursorSelection(this.start,this.end,this.isReversed_)};cvox.CursorSelection.prototype.select=function(){var a=window.getSelection();a.removeAllRanges();this.normalize();a.addRange(this.getRange())};cvox.CursorSelection.fromNode=function(a){if(!a)return null;var b=cvox.TraverseUtil.getNodeText(a);return new cvox.CursorSelection(new cvox.Cursor(a,0,b),new cvox.Cursor(a,0,b))};cvox.CursorSelection.fromBody=function(){return cvox.CursorSelection.fromNode(document.body)};
700 cvox.CursorSelection.prototype.getText=function(){return this.start.equals(this.end)?cvox.TraverseUtil.getNodeText(this.start.node):cvox.SelectionUtil.getRangeText(this.getRange())};cvox.CursorSelection.prototype.getRange=function(){var a=document.createRange();this.isReversed_?(a.setStart(this.end.node,this.end.index),a.setEnd(this.start.node,this.start.index)):(a.setStart(this.start.node,this.start.index),a.setEnd(this.end.node,this.end.index));return a};
1277 cvox.NavigationHistory.prototype.clean_=function(){for(var a=!1,b=this.history_.length-1;0<=b;b--){var c=this.isValidNode_(this.history_[b]);c||(this.history_.splice(b,1),a=!0)}return a};cvox.NavigationHistory.prototype.isValidNode_=function(a){return cvox.DomUtil.isAttachedToDocument(a)&&cvox.DomUtil.isVisible(a)?!0:!1};cvox.TraverseContent=function(a){this.currentDomObj=null!=a?a:document.body;var b=document.createRange();try{b.selectNode(this.currentDomObj),this.startCursor_=new cvox.Cursor(b.startContainer,b.startOffset,cvox.TraverseUtil.getNodeText(b.startContainer)),this.endCursor_=new cvox.Cursor(b.endContainer,b.endOffset,cvox.TraverseUtil.getNodeText(b.endContainer))}catch(c){window.console.log("Error: Unselectable node:"),window.console.log(a)}};goog.addSingletonGetter(cvox.TraverseContent);
1294 cvox.AbstractSelectionWalker.prototype.getDescription=function(a,b){var c=cvox.DescriptionUtil.getDescriptionFromAncestors(cvox.DomUtil.getUniqueAncestors(a.end.node,b.start.node),!0,cvox.ChromeVox.verbosity);c.text=b.getText()||c.text;return[c]};cvox.AbstractSelectionWalker.prototype.getBraille=function(a,b){var c=b.absStart().node,d=cvox.TraverseUtil.getNodeText(c),e=new cvox.Spannable(d);e.setSpan(c,0,d.length);return new cvox.NavBraille({text:e,startIndex:b.absStart().index,endIndex:b.absEnd().index})};cvox.CharacterWalker=function(){cvox.AbstractSelectionWalker.call(this);this.grain=cvox.TraverseContent.kCharacter};goog.inherits(cvox.CharacterWalker,cvox.AbstractSelectionWalker);cvox.CharacterWalker.prototype.getDescription=function(a,b){var c=cvox.CharacterWalker.superClass_.getDescription.call(this,a,b);c.forEach(function(a){a.personality||(a.personality={});a.personality.phoneticCharacters=!0});return c};cvox.CharacterWalker.prototype.getGranularityMsg=function(){return cvox.ChromeVox.msgs.getMsg("character_granularity")};cvox.GroupUtil={};cvox.GroupUtil.MAX_CHARCOUNT_=1500;cvox.GroupUtil.BREAKOUT_SELECTOR_='blockquote,button,code,form,frame,h1,h2,h3,h4,h5,h6,hr,iframe,input,object,ol,p,pre,select,table,tr,ul,math,span.math,[role~="alert alertdialog button checkbox combobox dialog log marquee menubar progressbar radio radiogroup scrollbar slider spinbutton status tab tabpanel textbox toolbar tooltip treeitem article document group heading img list math region row separator"]';