Chromium Code Reviews| 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'); |
| 11 goog.provide('cvox.FormSpan'); | |
| 11 goog.provide('cvox.ValueSelectionSpan'); | 12 goog.provide('cvox.ValueSelectionSpan'); |
| 12 goog.provide('cvox.ValueSpan'); | 13 goog.provide('cvox.ValueSpan'); |
| 13 | 14 |
| 15 goog.require('cvox.LibLouis.FormType'); | |
| 14 goog.require('Spannable'); | 16 goog.require('Spannable'); |
| 15 | 17 |
| 16 /** | 18 /** |
| 17 * Attached to the value region of a braille spannable. | 19 * Attached to the value region of a braille spannable. |
| 18 * @param {number} offset The offset of the span into the value. | 20 * @param {number} offset The offset of the span into the value. |
| 19 * @constructor | 21 * @constructor |
| 20 */ | 22 */ |
| 21 cvox.ValueSpan = function(offset) { | 23 cvox.ValueSpan = function(offset) { |
| 22 /** | 24 /** |
| 23 * The offset of the span into the value. | 25 * The offset of the span into the value. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 /** | 67 /** |
| 66 * Causes raw cells to be added when translating from text to braille. | 68 * Causes raw cells to be added when translating from text to braille. |
| 67 * This is supported by the {@code cvox.ExpandingBrailleTranslator} | 69 * This is supported by the {@code cvox.ExpandingBrailleTranslator} |
| 68 * class. | 70 * class. |
| 69 * @constructor | 71 * @constructor |
| 70 */ | 72 */ |
| 71 cvox.ExtraCellsSpan = function() { | 73 cvox.ExtraCellsSpan = function() { |
| 72 /** @type {ArrayBuffer} */ | 74 /** @type {ArrayBuffer} */ |
| 73 this.cells = new Uint8Array(0).buffer; | 75 this.cells = new Uint8Array(0).buffer; |
| 74 }; | 76 }; |
| 77 | |
| 78 | |
| 79 /** | |
| 80 * Indicates a text form during translation in Liblouis. | |
| 81 * @param {cvox.LibLouis.FormType} formType | |
| 82 * @constructor | |
| 83 */ | |
| 84 cvox.FormSpan = function(formType) { | |
|
dmazzoni
2017/06/27 21:21:52
The word "form" has other meanings. formType or ty
David Tseng
2017/06/27 23:52:41
The spans are really only useful for liblouis, but
| |
| 85 /** @type {cvox.LibLouis.FormType} */ | |
| 86 this.formType = formType; | |
| 87 }; | |
| OLD | NEW |