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

Side by Side Diff: chrome/browser/resources/options/password_manager_list.js

Issue 1415333009: [Password Manager] Recovers implied focus traverse on chrome://settings/passwords (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_550270
Patch Set: Created 5 years, 1 month 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('options.passwordManager', function() { 5 cr.define('options.passwordManager', function() {
6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
7 /** @const */ var DeletableItemList = options.DeletableItemList; 7 /** @const */ var DeletableItemList = options.DeletableItemList;
8 /** @const */ var DeletableItem = options.DeletableItem; 8 /** @const */ var DeletableItem = options.DeletableItem;
9 /** @const */ var List = cr.ui.List; 9 /** @const */ var List = cr.ui.List;
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 urlDiv.setAttribute( 74 urlDiv.setAttribute(
75 'title', getTitleForPasswordOrigin(this.url, this.isUrlSecure)); 75 'title', getTitleForPasswordOrigin(this.url, this.isUrlSecure));
76 var urlLink = this.ownerDocument.createElement('a'); 76 var urlLink = this.ownerDocument.createElement('a');
77 urlLink.href = this.url; 77 urlLink.href = this.url;
78 urlLink.setAttribute('target', '_blank'); 78 urlLink.setAttribute('target', '_blank');
79 urlLink.textContent = this.shownUrl.split('').reverse().join(''); 79 urlLink.textContent = this.shownUrl.split('').reverse().join('');
80 urlDiv.appendChild(urlLink); 80 urlDiv.appendChild(urlLink);
81 urlDiv.style.backgroundImage = getFaviconImageSet( 81 urlDiv.style.backgroundImage = getFaviconImageSet(
82 'origin/' + this.url, 16); 82 'origin/' + this.url, 16);
83 this.contentElement.appendChild(urlDiv); 83 this.contentElement.appendChild(urlDiv);
84 this.urlLink = urlLink;
84 85
85 // The stored username. 86 // The stored username.
86 var usernameDiv = this.ownerDocument.createElement('div'); 87 var usernameDiv = this.ownerDocument.createElement('div');
87 usernameDiv.className = 'name'; 88 usernameDiv.className = 'name';
88 usernameDiv.title = this.username; 89 usernameDiv.title = this.username;
89 this.contentElement.appendChild(usernameDiv); 90 this.contentElement.appendChild(usernameDiv);
90 var usernameInput = this.ownerDocument.createElement('input'); 91 var usernameInput = this.ownerDocument.createElement('input');
91 usernameInput.type = 'text'; 92 usernameInput.type = 'text';
92 usernameInput.className = 'inactive-item'; 93 usernameInput.className = 'inactive-item';
93 usernameInput.readOnly = true; 94 usernameInput.readOnly = true;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 167 }
167 }, 168 },
168 169
169 /** 170 /**
170 * Set the focusability of this row. 171 * Set the focusability of this row.
171 * @param {boolean} focusable 172 * @param {boolean} focusable
172 * @private 173 * @private
173 */ 174 */
174 setFocusable_: function(focusable) { 175 setFocusable_: function(focusable) {
175 var tabIndex = focusable ? 0 : -1; 176 var tabIndex = focusable ? 0 : -1;
176 this.passwordField.tabIndex = this.closeButtonElement.tabIndex = tabIndex; 177 this.urlLink.tabIndex = tabIndex;
178 this.usernameField.tabIndex = tabIndex;
179 this.passwordField.tabIndex = tabIndex;
180 this.closeButtonElement.tabIndex = tabIndex;
177 }, 181 },
178 182
179 /** 183 /**
180 * Reveals the plain text password of this entry. 184 * Reveals the plain text password of this entry.
181 */ 185 */
182 showPassword: function(password) { 186 showPassword: function(password) {
183 this.passwordField.value = password; 187 this.passwordField.value = password;
184 this.passwordField.type = 'text'; 188 this.passwordField.type = 'text';
185 189
186 var button = this.passwordShowButton; 190 var button = this.passwordShowButton;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 urlDiv.classList.add('left-elided-url'); 325 urlDiv.classList.add('left-elided-url');
322 urlDiv.setAttribute( 326 urlDiv.setAttribute(
323 'title', getTitleForPasswordOrigin(this.url, this.isUrlSecure)); 327 'title', getTitleForPasswordOrigin(this.url, this.isUrlSecure));
324 var urlLink = this.ownerDocument.createElement('a'); 328 var urlLink = this.ownerDocument.createElement('a');
325 urlLink.href = this.url; 329 urlLink.href = this.url;
326 urlLink.textContent = this.shownUrl.split('').reverse().join(''); 330 urlLink.textContent = this.shownUrl.split('').reverse().join('');
327 urlLink.setAttribute('target', '_blank'); 331 urlLink.setAttribute('target', '_blank');
328 urlDiv.appendChild(urlLink); 332 urlDiv.appendChild(urlLink);
329 urlDiv.style.backgroundImage = getFaviconImageSet( 333 urlDiv.style.backgroundImage = getFaviconImageSet(
330 'origin/' + this.url, 16); 334 'origin/' + this.url, 16);
335 urlLink.tabIndex = -1;
331 this.contentElement.appendChild(urlDiv); 336 this.contentElement.appendChild(urlDiv);
332 }, 337 },
333 338
334 /** 339 /**
335 * Get the url for the entry. 340 * Get the url for the entry.
336 * @type {string} 341 * @type {string}
337 */ 342 */
338 get url() { 343 get url() {
339 return this.dataItem[ORIGIN_FIELD]; 344 return this.dataItem[ORIGIN_FIELD];
340 }, 345 },
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 PasswordExceptionsList: PasswordExceptionsList, 486 PasswordExceptionsList: PasswordExceptionsList,
482 ORIGIN_FIELD: ORIGIN_FIELD, 487 ORIGIN_FIELD: ORIGIN_FIELD,
483 SHOWN_URL_FIELD: SHOWN_URL_FIELD, 488 SHOWN_URL_FIELD: SHOWN_URL_FIELD,
484 IS_SECURE_FIELD: IS_SECURE_FIELD, 489 IS_SECURE_FIELD: IS_SECURE_FIELD,
485 USERNAME_FIELD: USERNAME_FIELD, 490 USERNAME_FIELD: USERNAME_FIELD,
486 PASSWORD_FIELD: PASSWORD_FIELD, 491 PASSWORD_FIELD: PASSWORD_FIELD,
487 FEDERATION_FIELD: FEDERATION_FIELD, 492 FEDERATION_FIELD: FEDERATION_FIELD,
488 ORIGINAL_INDEX_FIELD: ORIGINAL_INDEX_FIELD 493 ORIGINAL_INDEX_FIELD: ORIGINAL_INDEX_FIELD
489 }; 494 };
490 }); 495 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698