Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/common/braille_text_handler.js

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 goog.provide('cvox.BrailleTextHandler'); 5 goog.provide('cvox.BrailleTextHandler');
6 6
7 goog.require('cvox.BrailleInterface'); 7 goog.require('cvox.BrailleInterface');
8 goog.require('cvox.BrailleUtil'); 8 goog.require('cvox.BrailleUtil');
9 goog.require('cvox.ChromeVox'); 9 goog.require('cvox.ChromeVox');
10 goog.require('cvox.NavBraille'); 10 goog.require('cvox.NavBraille');
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 * fields). 42 * fields).
43 */ 43 */
44 cvox.BrailleTextHandler.prototype.changed = function( 44 cvox.BrailleTextHandler.prototype.changed = function(
45 line, start, end, multiline, element, lineStart) { 45 line, start, end, multiline, element, lineStart) {
46 var content; 46 var content;
47 if (multiline) { 47 if (multiline) {
48 var spannable = cvox.BrailleUtil.createValue(line, start, end, lineStart); 48 var spannable = cvox.BrailleUtil.createValue(line, start, end, lineStart);
49 if (element) { 49 if (element) {
50 spannable.setSpan(element, 0, line.length); 50 spannable.setSpan(element, 0, line.length);
51 } 51 }
52 content = new cvox.NavBraille({text: spannable, 52 content = new cvox.NavBraille(
53 startIndex: start, 53 {text: spannable, startIndex: start, endIndex: end});
54 endIndex: end});
55 } else { 54 } else {
56 if (cvox.ChromeVox.navigationManager) { 55 if (cvox.ChromeVox.navigationManager) {
57 content = cvox.ChromeVox.navigationManager.getBraille(); 56 content = cvox.ChromeVox.navigationManager.getBraille();
58 } 57 }
59 } 58 }
60 if (content) { 59 if (content) {
61 this.braille_.write(content); 60 this.braille_.write(content);
62 } 61 }
63 }; 62 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698