OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 Objects used in spannables as annotations for ARIA values | 6 * @fileoverview Objects used in spannables as annotations for ARIA values |
7 * and selections. | 7 * and selections. |
8 */ | 8 */ |
9 | 9 |
10 goog.provide('cvox.ExtraCellsSpan'); | 10 goog.provide('cvox.ExtraCellsSpan'); |
(...skipping 29 matching lines...) Expand all Loading... |
40 /** | 40 /** |
41 * Converts this object to a json serializable object. | 41 * Converts this object to a json serializable object. |
42 * @return {!Object} The JSON representation. | 42 * @return {!Object} The JSON representation. |
43 */ | 43 */ |
44 cvox.ValueSpan.prototype.toJson = function() { | 44 cvox.ValueSpan.prototype.toJson = function() { |
45 return this; | 45 return this; |
46 }; | 46 }; |
47 | 47 |
48 | 48 |
49 Spannable.registerSerializableSpan( | 49 Spannable.registerSerializableSpan( |
50 cvox.ValueSpan, | 50 cvox.ValueSpan, 'cvox.ValueSpan', cvox.ValueSpan.fromJson, |
51 'cvox.ValueSpan', | |
52 cvox.ValueSpan.fromJson, | |
53 cvox.ValueSpan.prototype.toJson); | 51 cvox.ValueSpan.prototype.toJson); |
54 | 52 |
55 | 53 |
56 /** | 54 /** |
57 * Attached to the selected text within a value. | 55 * Attached to the selected text within a value. |
58 * @constructor | 56 * @constructor |
59 */ | 57 */ |
60 cvox.ValueSelectionSpan = function() { | 58 cvox.ValueSelectionSpan = function() {}; |
61 }; | |
62 | 59 |
63 | 60 |
64 Spannable.registerStatelessSerializableSpan( | 61 Spannable.registerStatelessSerializableSpan( |
65 cvox.ValueSelectionSpan, 'cvox.ValueSelectionSpan'); | 62 cvox.ValueSelectionSpan, 'cvox.ValueSelectionSpan'); |
66 | 63 |
67 | 64 |
68 /** | 65 /** |
69 * Causes raw cells to be added when translating from text to braille. | 66 * Causes raw cells to be added when translating from text to braille. |
70 * This is supported by the {@code cvox.ExpandingBrailleTranslator} | 67 * This is supported by the {@code cvox.ExpandingBrailleTranslator} |
71 * class. | 68 * class. |
72 * @constructor | 69 * @constructor |
73 */ | 70 */ |
74 cvox.ExtraCellsSpan = function() { | 71 cvox.ExtraCellsSpan = function() { |
75 /** @type {ArrayBuffer} */ | 72 /** @type {ArrayBuffer} */ |
76 this.cells = new Uint8Array(0).buffer; | 73 this.cells = new Uint8Array(0).buffer; |
77 }; | 74 }; |
OLD | NEW |