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

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

Issue 2383173002: Fix reading of password values. (Closed)
Patch Set: Bullets everywhere Created 4 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/host/interface/abstract_tts.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 goog.provide('cvox.ChromeVoxEditableTextBase'); 5 goog.provide('cvox.ChromeVoxEditableTextBase');
6 goog.provide('cvox.TextChangeEvent'); 6 goog.provide('cvox.TextChangeEvent');
7 goog.provide('cvox.TypingEcho'); 7 goog.provide('cvox.TypingEcho');
8 8
9 goog.require('cvox.AbstractTts'); 9 goog.require('cvox.AbstractTts');
10 goog.require('cvox.ChromeVox'); 10 goog.require('cvox.ChromeVox');
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 * stays the same. 334 * stays the same.
335 * @param {cvox.TextChangeEvent} evt The text change event. 335 * @param {cvox.TextChangeEvent} evt The text change event.
336 */ 336 */
337 cvox.ChromeVoxEditableTextBase.prototype.describeSelectionChanged = 337 cvox.ChromeVoxEditableTextBase.prototype.describeSelectionChanged =
338 function(evt) { 338 function(evt) {
339 // TODO(deboer): Factor this into two function: 339 // TODO(deboer): Factor this into two function:
340 // - one to determine the selection event 340 // - one to determine the selection event
341 // - one to speak 341 // - one to speak
342 342
343 if (this.isPassword) { 343 if (this.isPassword) {
344 this.speak((new goog.i18n.MessageFormat(Msgs.getMsg('dot')) 344 this.speak((new goog.i18n.MessageFormat(Msgs.getMsg('bullet'))
345 .format({'COUNT': 1})), evt.triggeredByUser); 345 .format({'COUNT': 1})), evt.triggeredByUser);
346 return; 346 return;
347 } 347 }
348 if (evt.start == evt.end) { 348 if (evt.start == evt.end) {
349 // It's currently a cursor. 349 // It's currently a cursor.
350 if (this.start != this.end) { 350 if (this.start != this.end) {
351 // It was previously a selection, so just announce 'unselected'. 351 // It was previously a selection, so just announce 'unselected'.
352 this.speak(Msgs.getMsg('Unselected'), evt.triggeredByUser); 352 this.speak(Msgs.getMsg('Unselected'), evt.triggeredByUser);
353 } else if (this.getLineIndex(this.start) != 353 } else if (this.getLineIndex(this.start) !=
354 this.getLineIndex(evt.start)) { 354 this.getLineIndex(evt.start)) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 /** 430 /**
431 * Describe a change where the text changes. 431 * Describe a change where the text changes.
432 * @param {cvox.TextChangeEvent} evt The text change event. 432 * @param {cvox.TextChangeEvent} evt The text change event.
433 */ 433 */
434 cvox.ChromeVoxEditableTextBase.prototype.describeTextChanged = function(evt) { 434 cvox.ChromeVoxEditableTextBase.prototype.describeTextChanged = function(evt) {
435 var personality = {}; 435 var personality = {};
436 if (evt.value.length < this.value.length) { 436 if (evt.value.length < this.value.length) {
437 personality = cvox.AbstractTts.PERSONALITY_DELETED; 437 personality = cvox.AbstractTts.PERSONALITY_DELETED;
438 } 438 }
439 if (this.isPassword) { 439 if (this.isPassword) {
440 this.speak((new goog.i18n.MessageFormat(Msgs.getMsg('dot')) 440 this.speak((new goog.i18n.MessageFormat(Msgs.getMsg('bullet'))
441 .format({'COUNT': 1})), evt.triggeredByUser, personality); 441 .format({'COUNT': 1})), evt.triggeredByUser, personality);
442 return; 442 return;
443 } 443 }
444 444
445 var value = this.value; 445 var value = this.value;
446 var len = value.length; 446 var len = value.length;
447 var newLen = evt.value.length; 447 var newLen = evt.value.length;
448 var autocompleteSuffix = ''; 448 var autocompleteSuffix = '';
449 // Make a copy of evtValue and evtEnd to avoid changing anything in 449 // Make a copy of evtValue and evtEnd to avoid changing anything in
450 // the event itself. 450 // the event itself.
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 716
717 /** 717 /**
718 * Moves the cursor backward by one paragraph. 718 * Moves the cursor backward by one paragraph.
719 * @return {boolean} True if the action was handled. 719 * @return {boolean} True if the action was handled.
720 */ 720 */
721 cvox.ChromeVoxEditableTextBase.prototype.moveCursorToPreviousParagraph = 721 cvox.ChromeVoxEditableTextBase.prototype.moveCursorToPreviousParagraph =
722 function() { return false; }; 722 function() { return false; };
723 723
724 724
725 /******************************************/ 725 /******************************************/
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/host/interface/abstract_tts.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698