Lines Matching refs:node

25  * node (the end of the selection) is not on a text node.
35 // Ending with a text node, which is incorrect. Keep extending forward.
52 * node (the end of the selection) is not on a text node.
65 // Ending with a text node, which is incorrect. Keep extending backward.
83 * node (the end of the selection) is either:
84 * - not on a text node
85 * - on a text node that ends with a period or a space
99 // The focus node is of type text, check end for period
106 // Text node ends with period.
110 // Text node ends with space.
113 // Text node does not end with period or space. Extend forward.
125 // Focus node is not text node, no further cleaning required.
156 * Calculates the horizontal and vertical position of a node
157 * @param {Node} targetNode The node.
158 * @return {Array} The coordinates [top, left] of the node.
209 * @param {!Node} node The element for which to compute the position.
213 cvox.SelectionUtil.findPos_ = function(node) {
216 if (node.offsetParent) {
218 curLeft += node.offsetLeft;
219 curTop += node.offsetTop;
220 } while (node = node.offsetParent);
226 * Scrolls node in its parent node such the given node is visible.
227 * @param {Node} focusNode The node.
230 // First, walk up the DOM until we find a node with a bounding rectangle.
239 var node = focusNode;
240 var parentNode = node.parentElement;
241 while (node != document.body && parentNode) {
242 node.scrollTop = node.offsetTop;
243 node.scrollLeft = node.offsetLeft;
244 node = parentNode;
245 parentNode = node.parentElement;
300 * Determine whether a node's text content is entirely whitespace.
311 * @param {Node} node A node implementing the |CharacterData| interface (i.e.,
312 * a |Text|, |Comment|, or |CDATASection| node.
313 * @return {boolean} True if all of the text content of |node| is whitespace,
316 cvox.SelectionUtil.isAllWs = function(node) {
318 return !(/[^\t\n\r ]/.test(node.data));
324 * Determine if a node should be ignored by the iterator functions.
326 * @param {Node} node An object implementing the DOM1 |Node| interface.
327 * @return {boolean} True if the node is:
328 * 1) A |Text| node that is all whitespace
329 * 2) A |Comment| node
333 cvox.SelectionUtil.isIgnorable = function(node) {
334 return (node.nodeType == 8) || // A comment node
335 ((node.nodeType == 3) &&
336 cvox.SelectionUtil.isAllWs(node)); // a text node, all ws
343 * of all DOM nodes that gives the sibling node, the node that is
345 * reference node.)
347 * @param {Node} sib The reference node.
351 * 2) null if no such node exists.
367 * @param {Node} sib The reference node.
371 * 2) null if no such node exists.
387 * directly in the reference node.)
389 * @param {Node} par The reference node.
393 * 2) null if no such node exists.
411 * @param {Node} par The reference node.
415 * 2) null if no such node exists.
432 * |data| is a property of text nodes that gives the text of the node.)
434 * @param {Node} txt The text node whose data should be returned.
435 * @return {string} A string giving the contents of the text node with
452 * Returns true if the selection has content from at least one node
457 * @return {boolean} True if the selection has content from at least one node
485 * Selects text within a text node.
487 * Note that the input node MUST be of type TEXT; otherwise, the offset
491 * @param {Node} textNode The text node to select text within.
505 * Selects all the text in a given node.
507 * @param {Node} node The target node.
509 cvox.SelectionUtil.selectAllTextInNode = function(node) {
511 newRange.setStart(node, 0);
512 newRange.setEndAfter(node);
520 * selects the beginning of the given node.
522 * @param {Node} node The target node.
524 cvox.SelectionUtil.collapseToStart = function(node) {
529 cursorNode = node;
541 * selects the end of the given node.
543 * @param {Node} node The target node.
545 cvox.SelectionUtil.collapseToEnd = function(node) {
550 cursorNode = node;
576 for (var i = 0, node; node = leafNodes[i]; i++) {
577 text = text + ' ' + cvox.DomUtil.getName(node);