OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview A JavaScript class for walking lines. | 6 * @fileoverview A JavaScript class for walking lines. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 goog.provide('cvox.StructuralLineWalker'); | 10 goog.provide('cvox.StructuralLineWalker'); |
(...skipping 10 matching lines...) Expand all Loading... |
21 goog.base(this); | 21 goog.base(this); |
22 this.grain = cvox.TraverseContent.kLine; | 22 this.grain = cvox.TraverseContent.kLine; |
23 }; | 23 }; |
24 goog.inherits(cvox.StructuralLineWalker, cvox.AbstractSelectionWalker); | 24 goog.inherits(cvox.StructuralLineWalker, cvox.AbstractSelectionWalker); |
25 | 25 |
26 | 26 |
27 /** | 27 /** |
28 * @override | 28 * @override |
29 */ | 29 */ |
30 cvox.StructuralLineWalker.prototype.getGranularityMsg = function() { | 30 cvox.StructuralLineWalker.prototype.getGranularityMsg = function() { |
31 return cvox.ChromeVox.msgs.getMsg('structural_line'); | 31 return Msgs.getMsg('structural_line'); |
32 }; | 32 }; |
33 | 33 |
34 | 34 |
35 /** | 35 /** |
36 * @override | 36 * @override |
37 */ | 37 */ |
38 cvox.StructuralLineWalker.prototype.getDescription = function(prevSel, sel) { | 38 cvox.StructuralLineWalker.prototype.getDescription = function(prevSel, sel) { |
39 var desc = goog.base(this, 'getDescription', prevSel, sel); | 39 var desc = goog.base(this, 'getDescription', prevSel, sel); |
40 desc[0].text = cvox.DomUtil.getPrefixText( | 40 desc[0].text = cvox.DomUtil.getPrefixText( |
41 sel.absStart().node, sel.absStart().index) + desc[0].text; | 41 sel.absStart().node, sel.absStart().index) + desc[0].text; |
(...skipping 27 matching lines...) Expand all Loading... |
69 var spannable = | 69 var spannable = |
70 cvox.BrailleUtil.getTemplated(prevNode, objNode, {name: name}); | 70 cvox.BrailleUtil.getTemplated(prevNode, objNode, {name: name}); |
71 spannable.setSpan(objNode, 0, spannable.getLength()); | 71 spannable.setSpan(objNode, 0, spannable.getLength()); |
72 braille.text = spannable; | 72 braille.text = spannable; |
73 | 73 |
74 // Remove any selections. | 74 // Remove any selections. |
75 braille.startIndex = 0; | 75 braille.startIndex = 0; |
76 braille.endIndex = 0; | 76 braille.endIndex = 0; |
77 return braille; | 77 return braille; |
78 }; | 78 }; |
OLD | NEW |