Chromium Code Reviews| 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 Constants used throughout ChromeVox. | 6 * @fileoverview Constants used throughout ChromeVox. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 goog.provide('constants'); | 9 goog.provide('constants'); |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * Possible directions to perform tree traversals. | 12 * Possible directions to perform tree traversals. |
| 13 * @enum {string} | 13 * @enum {string} |
| 14 */ | 14 */ |
| 15 constants.Dir = { | 15 constants.Dir = { |
| 16 /** Search from left to right. */ | 16 /** Search from left to right. */ |
| 17 FORWARD: 'forward', | 17 FORWARD: 'forward', |
| 18 | 18 |
| 19 /** Search from right to left. */ | 19 /** Search from right to left. */ |
| 20 BACKWARD: 'backward' | 20 BACKWARD: 'backward' |
| 21 }; | 21 }; |
| 22 | |
| 23 /** | |
| 24 * If a node contains more characters than this, it should not be treated | |
| 25 * as a leaf node. | |
| 26 * | |
| 27 * This number was determined by looking at the average number of | |
| 28 * characters in a paragraph: | |
| 29 * http://www.fullondesign.co.uk/design/usability/ | |
|
dmazzoni
2016/12/07 06:40:51
This link doesn't work for me. I tried appending t
David Tseng
2016/12/07 17:11:30
Removed.
| |
| 30 * 285-how-many-characters-per-a-page-is-normal.htm | |
| 31 * and then trying it out on a few popular websites (CNN, BBC, | |
| 32 * Google Search, etc.) and making sure it made sense. | |
| 33 * @type {number} | |
| 34 * @const | |
| 35 */ | |
| 36 constants.MAX_CHARCOUNT = 1500; | |
|
dmazzoni
2016/12/07 06:40:50
How about constants.LEAF_MAX_CHARCOUNT just so it'
David Tseng
2016/12/07 17:11:30
This was taken pretty much verbatim from group uti
| |
| OLD | NEW |